Vyatta – IPIP tunnel

set interfaces tunnel tun0
set interfaces tunnel tun0 address 192.168.127.1/24
set interfaces tunnel tun0 description "Gre Tunnel to SamiHome"
set interfaces tunnel tun0 encapsulation ipip
set interfaces tunnel tun0 local-ip 93.155.130.11
set interfaces tunnel tun0 remote-ip 10.18.6.162

ЗАБЕЛЕЖКА:
Тъи като 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
         address 192.168.127.2
         netmask 255.255.255.0
         up ifconfig tun1 multicast
         pre-up iptunnel add tun1 mode ipip remote 93.155.130.11 local 10.18.6.162 ttl 255
         pointopoint 192.168.127.1
         post-down iptunnel del tun1
vyatta@vyatta# show interfaces tunnel
 tun0 {
     address 192.168.127.1/24
     description "Gre Tunnel to SamiHome"
     encapsulation ipip
     local-ip 93.155.130.11
     remote-ip 10.18.6.162
 }
[edit]
 
vyatta@vyatta# ping 192.168.127.2
PING 192.168.127.2 (192.168.127.2) 56(84) bytes of data.
64 bytes from 192.168.127.2: icmp_seq=1 ttl=64 time=3.91 ms
64 bytes from 192.168.127.2: icmp_seq=2 ttl=64 time=3.86 ms
64 bytes from 192.168.127.2: icmp_seq=3 ttl=64 time=3.91 ms
64 bytes from 192.168.127.2: icmp_seq=4 ttl=64 time=0.312 ms
64 bytes from 192.168.127.2: icmp_seq=5 ttl=64 time=3.93 ms
^C
--- 192.168.127.2 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
[edit]

Leave a Reply

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