Vyatta – IPIP tunnel

set interfaces tunnel tun0
set interfaces tunnel tun0 address
set interfaces tunnel tun0 description "Gre Tunnel to SamiHome"
set interfaces tunnel tun0 encapsulation ipip
set interfaces tunnel tun0 local-ip
set interfaces tunnel tun0 remote-ip

Тъи като vyatta все още не поддържа TCPMSS могат да възникнат някой проблеми ако има NAT. Поради тази причина може да се наложи да добавим този ред:

vyatta@core2# sudo su
core2:/home/vyatta# iptables -t mangle -A POSTROUTING -p tcp --tcp-flags SYN,RST SYN -o tun0 -j TCPMSS --clamp-mss-to-pmtu

А този ред може да се добави и в /etc/rc.local за да се изпълнява всеки път при стартиране на системата.

Debian – а това е конфигурациата на втората машина …

 auto tun1
 iface tun1 inet static
         up ifconfig tun1 multicast
         pre-up iptunnel add tun1 mode ipip remote local ttl 255
         post-down iptunnel del tun1
vyatta@vyatta# show interfaces tunnel
 tun0 {
     description "Gre Tunnel to SamiHome"
     encapsulation ipip
vyatta@vyatta# ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=64 time=3.91 ms
64 bytes from icmp_seq=2 ttl=64 time=3.86 ms
64 bytes from icmp_seq=3 ttl=64 time=3.91 ms
64 bytes from icmp_seq=4 ttl=64 time=0.312 ms
64 bytes from icmp_seq=5 ttl=64 time=3.93 ms
--- ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4027ms
rtt min/avg/max/mdev = 0.312/3.188/3.934/1.440 ms

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.