Created
January 29, 2015 08:06
-
-
Save bearice/1cbd09ab01f9bc4d3c8b to your computer and use it in GitHub Desktop.
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
公网机器: | |
ip tunnel add tunnel0 remote {对方内网地址} local {本机内网地址} mode ipip | |
ifconfig tunnel0 192.168.123.1/24 | |
ifconfig tunnel0 up | |
iptables -t nat -A POSTROUTING -s 192.168.123.0/24 -j MASQUERADE | |
内网机器: | |
ip tunnel add tunnel0 remote {对方内网地址} local {本机内网地址} mode ipip | |
ifconfig tunnel0 192.168.123.2/24 | |
ifconfig tunnel0 up | |
route add default dev tunnel0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment