Redirect / Rewrite destination IP address using iptables

9 0

Just a quick one on how to alter the destination of an outbound connection IP using iptables. I imagine a few tweaks would allow this to work in the sense of redirecting through a proxy etc too.

iptables -t nat -I OUTPUT --dest 93.184.220.20 -p tcp --dport 80 -j DNAT --to-dest 93.184.220.21

This one will specifically change which IP your machine actually uses for EdgeCast’s CDN, but you can easily change the original IP (–dest) and the new destination IP (–to-dest)


Cohan

Techie. Nerdy. That guy. Check out the nerd streams on Thursdays for more!

I also have a personal website over at Cohan Robinson

Related Post

Video Games and Nostalgia

Posted by - 3rd February 2014 0
Video games conjure a startling power when it comes to certain events in your life. I, for one, remember waking…

Leave a comment

Your email address will not be published. Required fields are marked *