Created
January 10, 2018 14:02
-
-
Save corerman/ae5aa50a0f98c70068d8351049431fe7 to your computer and use it in GitHub Desktop.
iptables转发:根据ip进行转发
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
iptables -t nat -A PREROUTING -d 1.2.3.4 -p tcp --dport 3389 -j DNAT --to 192.168.1.1:3389 | |
类似这个的。 | |
1.2.3.4是你的外网IP 192.168.1.1是你想映射到外网的内网服务器。 | |
如果vps有多个ip,可以实现ip之间端口转发 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment