RedirectIP

This is a guide on how to redirect outgoing traffic from ipaddress1 to ipaddress2. Without any further commands, this rule will not persist after a reboot. This was necessary when Purdue's firewall seemed to be blocking Google's 8.8.8.8 DNS server, and Adélie Linux's live CD could not be remounted read-write, so I needed to redirect 8.8.8.8 traffic to 8.8.4.4 on the host machine.

# sysctl net.ipv4.ip_forward=1
# iptables -t nat -A OUTPUT -d <ipaddress1> -j DNAT --to-destination <ipaddress2>
1

1 http://superuser.com/a/681707

linux


Last modified on 12 Dec 2016 at 05:28:55 PM EST ET