hi there!
Something is wrong. I am not able to forward my ports to some others server's different port. My idea is, i am using a gateway, which has two NIC. ( eth0 X.X.12.106; eth1 X.X.12.108 ). etho is connected with internet. i have a webserver running behind my gateway which IP is X.X.12.109.
All i need is, my webserver will run on a different port. suppose 90 ( instead of 80 ). so, when some one will try for
www.abc.com ( X.X.12.109 ), my gateway server will automatically redirect them to ( X.X.12.109:90 ).
i have used the following method. but due to some reason it failed.
/sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 -d 69.88.12.109 --dport 80 -j DNAT --to 69.88.12.109:90
/sbin/iptables -t nat -A PREROUTING -p tcp -i eth1 -d 69.88.12.109 --dport 80 -j DNAT --to 69.88.12.109:90
Can anybody help me?
thanx in advance.