Bruno Nunes wrote:
this is what the dns server does: intranet.xxxxxxxxx.com.br --> AAA.AAA.AAA.AAA requests to intranet... goes to AAA....A (the router) this is what i want: AAA.AAA.AAA.AAA (router) --> BBB.BBB.BBB.BBB (webserver) BBB...B is an IP address inside a private network like 192.168.1.x AAA...A is a worldwide ip address like 139.82.x.x How can I do this redirection with iptables?
It's called Network Address Translation. (man iptables) iptables -t nat -A PREROUTING -d AAA.AAA.AAA.AAA \ -p tcp -m tcp --dport 80 \ -j DNAT --to-destination BBB.BBB.BBB.BBB
thanks! bruno