try this iptables -t nat -A PREROUTING -p tcp --dport 81 -i ethX -j DNAT --to 192.168.2.2:80 where ethX refers to the interface for 203.162.4.1 (ould be eth0,eth1 or whatever it correspondes to on your system). Regards Tunde --- Le Ngoc Thach <lnthach@xxxxxxxxxx> wrote: > > > 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 203.162.4.1, 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://203.162.4.1: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 203.162.4.1 -p tcp --dport 81 -j > DNAT --to 192.168.2.2:80 > > (View my configuration iptable in attachment). > > but url "http://203.162.4.1:81" does not work. If I try "REROUTING" to > 192.168.2.1 such as: > /sbin/iptables -A PREROUTING -t nat -d 203.162.4.1 -p tcp --dport 81 -j > DNAT --to 192.168.2.1:8080 > > It's OK. Then, http://203.162.4.1:81 is TomCat HomePage. > > What is woring? Please help me! > > Thanks! > > > > > ATTACHMENT part 2 application/x-java-applet name=iptable __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- Psyche-list mailing list Psyche-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/psyche-list