內网 公网
test1 192.168.0.1 X.X.X.X
test2 192.168.2.5 X.X.X.X
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ https://blog.csdn.net/XiaoXiao__cc/article/details/81559628 +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
test1执行
(test2公网) (test1公网)
ip tunnel del ipip0 mode ipip remote X.X.X.X local X.X.X.X ttl 255
ip tunnel add ipip0 mode ipip remote X.X.X.X local X.X.X.X ttl 255
ip link set ipip0 up
ip addr add 192.168.253.8 peer 192.168.253.9 dev ipip0
ip route add 192.168.2.5 dev ipip0 via 192.168.253.9
(test2内网)
test2执行
(test1公网) (test2公网)
ip tunnel del ipip0 mode ipip remote X.X.X.X local X.X.X.X ttl 255
ip tunnel add ipip0 mode ipip remote X.X.X.X local X.X.X.X ttl 255
ip link set ipip0 up
ip addr add 192.168.253.9 peer 192.168.253.8 dev ipip0
ip route add 192.168.0.1 dev ipip0 via 192.168.253.8
(test1内网)