Skip to content

Instantly share code, notes, and snippets.

@didip
Created November 5, 2015 17:23
Show Gist options
  • Save didip/533a3a76abba0b6404d9 to your computer and use it in GitHub Desktop.
Save didip/533a3a76abba0b6404d9 to your computer and use it in GitHub Desktop.
Redirect outbound traffic to another ip:port
sudo iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination IP:80
@PinGwynn
Copy link

PinGwynn commented Jun 2, 2017

Thank you. I'm totally forget about nat output rules. It helps me a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment