Created
January 28, 2015 07:39
-
-
Save yuuichi-fujioka/d10eff2b2fb2ba69855f to your computer and use it in GitHub Desktop.
port forwarding with iptables in the same network segment.
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
*nat | |
:PREROUTING ACCEPT [1:60] | |
:INPUT ACCEPT [1:60] | |
:OUTPUT ACCEPT [8:635] | |
:POSTROUTING ACCEPT [8:635] | |
-A PREROUTING -p tcp --dport 10022 -d 192.168.0.100 -j DNAT --to-destination 192.168.0.142:22 | |
-A POSTROUTING -j MASQUERADE | |
COMMIT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment