Created
March 16, 2018 15:23
-
-
Save sankars/7663cbb3ab36326cdef2edde0d69ae1f to your computer and use it in GitHub Desktop.
Port forwarding in AWS
This file contains hidden or 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
sudo sysctl -w net.ipv4.ip_forward=1 ## make it permanent. /etc/sysctl.conf | |
sudo iptables -t nat -A PREROUTING -p tcp --dport 8001 -j DNAT --to-destination 172.20.19.192:10000 | |
sudo iptables -t nat -A POSTROUTING -j MASQUERADE | |
sudo service iptables save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment