Not Just Paranoid

Another site by Pete Maynard

iptables reroute to another IP

This is how I re-routed all traffic through port 25565 to another IP address.

echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p tcp --dport 25565 -j DNAT --to-destination <IP>
iptables -t nat -A POSTROUTING -j MASQUERADE

To clear what you just did:

iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X

For more information on iptables: Linux Home Networking, debuntu. Good luck.

22 Jan 2011 | Tags ( ip redirection iptables )

Website Last Updated on 4 Oct 2024 (CC BY-SA 4.0)

This site uses JQuery and nanogallery2 hosted by jsdelivr.net
for the Flickr photo feed and GoatCounter for user insights.