Hi, I'm using iptables-1.2.6a-2 in RedHat 8.0 router, gateway and firewall. I can not configure to implement the case: Ex: - External IP of gateway is 126.96.36.199, this host is also listening at port 80 (Apache WebServer) and portal 8080 (Tomcat). - Internal IP of gateway is 192.168.2.1 - An other internal host is 192.168.2.2, this host is listening at port 80 (IIS WebServer).
I want a user can go to http://188.8.131.52:81 to access the internal host 192.168.2.2 that IIS is running. I have tried to use "PREROUTING" such as
/sbin/iptables -A PREROUTING -t nat -d 184.108.40.206 -p tcp --dport 81 -j DNAT --to 192.168.2.2:80
but url "http://220.127.116.11:81" does not work. If I try "REROUTING" to 192.168.2.1 such as: /sbin/iptables -A PREROUTING -t nat -d 18.104.22.168 -p tcp --dport 81 -j DNAT --to 192.168.2.1:8080