Vyatta – Gre Tunnel

set interfaces tunnel tun0
set interfaces tunnel tun0 address
set interfaces tunnel tun0 description "Gre Tunnel to SamiHome"
set interfaces tunnel tun0 encapsulation gre
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 gre remote local ttl 255
         post-down iptunnel del tun1
vyatta@vyatta# show interfaces tunnel
 tun0 {
     description "Gre Tunnel to SamiHome"
     encapsulation gre
vyatta@vyatta# ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=64 time=2.67 ms
64 bytes from icmp_seq=2 ttl=64 time=0.247 ms
64 bytes from icmp_seq=3 ttl=64 time=3.96 ms
64 bytes from icmp_seq=4 ttl=64 time=0.517 ms
--- ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3055ms
rtt min/avg/max/mdev = 0.247/1.852/3.966/1.542 ms

Leave a Reply

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