Redirect / Rewrite destination IP address using iptables

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)



Sign up for emails about the things

You're signing up to a rather infrequent mail list where I let you know about the new things going on.
All the messages have an unsub link in them and I'm never going to sell, trade, or otherwise hand over your contact information to anyone.
You'll not be signed up to any new lists either, because I hate it when places do that to me too