Skip to content

Instantly share code, notes, and snippets.

@gin1314
Created August 3, 2015 10:28
linux: example of enabling IP forwarding and redirection
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment