I am trying to forward a single port from the outside box (linux) to
the inside box (win2k3 server). The service on the inside machine is a
webserver on a nonstandard port.
I have tried these iptables lines and they have failed me.
iptables -t nat -A PREROUTING -p tcp -i eth0 -d 65.xx.xx.xx --dport 188
-j DNAT --to 192.168.1.xxx:188
iptables -A FORWARD -p tcp -i eth0 -d 192.168.1.xxx --dport 188 -j
ACCEPT
My setup.
internt <---> 65.*.*.* eth0 <linux box> 192.168.1.1 eth0:0 <--->
192.168.1.* <win2k3 server>
>From the linux machine I can request pages from the 192.168.1.* address
just fine
http://192.168.1.*:188 I want to be able to access the pages
via 65.*.*.*:188
the only other rules I use are:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE