Last active
November 6, 2018 04:20
-
-
Save ernado/5e06d137179e6b4253accaf342f9b901 to your computer and use it in GitHub Desktop.
Forward ports on Ubuntu with iptables
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
# Forward TCP 3389 on enp4s0 to 192.168.122.119 | |
iptables -A PREROUTING -t nat -i enp4s0 -p tcp --dport 3389 -j DNAT --to 192.168.122.119:3389 | |
iptables -I FORWARD 1 -d 192.168.122.119/32 -p tcp -m tcp --dport 3389 -j ACCEPT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment