I use a Linux machine as WLAN Router with the help of
There's also an Apache web server installed on the same machine.
Now I want to redirect all the traffic which comes through port 80 from wlan0 to the the Apache webserver.
iptables -t mangle -N internet iptables -t mangle -A PREROUTING -i wlan0 -p tcp -m tcp --dport 80 -j internet iptables -t mangle -A internet -j MARK --set-mark 99 iptables -t nat -A PREROUTING -i wlan0 -p tcp -m mark --mark 99 -m tcp --dport 80 -j DNAT --to-destination 192.168.0.1
This was the solution I've found. I've adjusted the IP and the interface, but it didn't work. Any ideas?