Linux下用iptunnel實現***通信
環境:
外網IP: 122.42.42.10
虛擬網卡:10.0.0.1
外網IP: 122.42.36.10
虛擬網卡:10.0.8.1
/sbin/iptunnel add tun0 mode ipip local 122.42.42.10 remote 122.42.36.10 ttl 64
/sbin/ifconfig tun0 10.0.0.1 pointopoint 10.0.8.1 netmask 255.255.255.255
/sbin/iptunnel add tun0 mode ipip local 122.42.36.10 remote 122.42.42.10 ttl 64
/sbin/ifconfig tun0 10.0.8.1 pointopoint 10.0.0.1 netmask 255.255.255.255
iptables -I INPUT -s 192.168.0.1 -p 47 -j ACCEPT