[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

iptables nat forwarding



Hi,
Could someone please tell me why this command won't forward any www calls to 192.168.1.1 (firewall + gateway) to 192.168.1.2 (apache server).

iptables -t nat -A PREROUTING -p TCP --dport 80 -j DNAT --to-destination 192.168.1.2:80


What I can't figure is why that doesn't work, when the following command does work to forward all external ssh requests from the gateway, to the apache machine.

iptables -t nat -A PREROUTING -p TCP -i ippp0 --dport 22 -j DNAT --to-destination 192.168.1.2:22

Thanks,

Hereward

-- 

GPG Public Key @
----: http://www.zadok.uklinux.net/ :----
"Love is Hate. War is Peace. Windows is Stable?"
"I can bend minds with my spoon"
"Life is short and hard, kind of like a bodybuilding elf"



Reply to: