Linux创建gre隧道

ubuntu
写入网卡/etc/network/interfaces

ubuntu通用

auto tun0
iface tun0 inet static
address <local tunnel IP>
netmask <tunnel subnet mask>
pre-up iptunnel add tun1 mode gre local <local IP> remote <remote IP> ttl 255
up ifconfig tun1 multicast
pointopoint <remote tunnel IP>
post-down iptunnel del tun1

Centos类方法
约定:
hostA IP:公网 100.xx.xx.101 内网10.0.0.1
hostB IP:公网192.xx.xx.101 内网10.0.0.2

阅读剩余部分...