echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p tcp –dport 80 -j DNAT –to-destination xx.xx.xx.xx:80
iptables -t nat -A POSTROUTING -j MASQUERADE
redirecting network traffic to a new IP using iptables
Leave a reply
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p tcp –dport 80 -j DNAT –to-destination xx.xx.xx.xx:80
iptables -t nat -A POSTROUTING -j MASQUERADE