I am using SME Server 7.1 (2.6.9 Kernel) as a gateway, and I have set up multiple IP addresses on one external facing network card, and I have one internal facing network card. I would like to forward ports on to various servers on my network, i.e. X.X.X.17:80 goes to 192.168.0.1:80, X.X.X.18:80 goes to 192.168.0.2:80.
In my /etc/rc.d/init.d/masq file, I have the following entries:
/sbin/iptables --table nat --new-chain PortForwarding_$$
/sbin/iptables --table nat --append PortForwarding_$$ --protocol tcp -d X.X.X.18/32 --destination-port 80 -j DNAT --to-destination 192.168.0.2:80
adjust_tcp_in 80 ACCEPT ForwardedTCP_$$ 192.168.0.2/32
From what I understand, this should forward all incomming requests to X.X.X.18:80 to 192.168.0.2:80, but when I try to access this web site, it times out.
Can anyone explain what I am doing wrong, or how to go about doing this?
Many Thanks in advance.