подскажите есть два шлюза
Создаю туннель
на одном прописал
шлюз А
iface tun1 inet manual
up ip tunnel add tun1 mode gre remote 109.*.*.* local 81.*.*.*
up ifconfig tun1 10.0.0.3 netmask 255.255.255.252 pointopoint 10.0.0.4 mtu 1500
up ip route add 192.168.11.0/255.255.255.0 dev tun1
down ip tunnel del tun1
шлюз Б
iface tun1 inet manual
up ip tunnel add tun1 mode gre remote 81.*.*.* local 109.*.*.*
up ifconfig tun1 10.0.0.4 netmask 255.255.255.252 pointopoint 10.0.0.3 mtu 1500
up ip route add 192.168.0.0/255.255.255.0 dev tun1
down ip tunnel del tun1
Тесты:
на шлюзе А
ping 10.0.0.3
PING 10.0.0.3 (10.0.0.3) 56(84) bytes of data.
64 bytes from 10.0.0.3: icmp_seq=1 ttl=64 time=0.070 ms
64 bytes from 10.0.0.3: icmp_seq=2 ttl=64 time=0.033 ms
64 bytes from 10.0.0.3: icmp_seq=3 ttl=64 time=0.031 ms
64 bytes from 10.0.0.3: icmp_seq=4 ttl=64 time=0.026 ms
ping 10.0.0.4
PING 10.0.0.4 (10.0.0.4) 56(84) bytes of data.
From 81.*.*.* icmp_seq=1 Packet filtered
From 81.*.*.* icmp_seq=2 Packet filtered
На шлюзе Б
ping 10.0.0.4
PING 10.0.0.4 (10.0.0.4) 56(84) bytes of data.
64 bytes from 10.0.0.4: icmp_seq=1 ttl=64 time=0.034 ms
64 bytes from 10.0.0.4: icmp_seq=2 ttl=64 time=0.023 ms
64 bytes from 10.0.0.4: icmp_seq=3 ttl=64 time=0.026 ms
ping 10.0.0.3
Do you want to ping broadcast? Then -b