Created
July 20, 2012 09:19
-
-
Save ctavan/3149813 to your computer and use it in GitHub Desktop.
Forward port 80 traffic to different host
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TARGET=192.168.2.10 | |
sysctl net.ipv4.ip_forward=1 | |
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination $TARGET:80 | |
iptables -t nat -A POSTROUTING -j MASQUERADE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment