- Сервер:
- nechto@darkthing:~$ sudo iptables -A POSTROUTING -t nat -s 192.168.1.0/24 -j MASQUERADE
- nechto@darkthing:~$ sudo iptables -L
- Chain INPUT (policy ACCEPT)
- target prot opt source destination
- Chain FORWARD (policy ACCEPT)
- target prot opt source destination
- Chain OUTPUT (policy ACCEPT)
- target prot opt source destination
- nechto@darkthing:~$ sudo route -n
- Kernel IP routing table
- Destination Gateway Genmask Flags Metric Ref Use Iface
- 77.50.1.59 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
- 77.50.0.101 10.9.95.1 255.255.255.255 UGH 0 0 0 eth0
- 77.50.0.100 10.9.95.1 255.255.255.255 UGH 0 0 0 eth0
- 89.222.178.128 10.9.95.1 255.255.255.128 UG 0 0 0 eth0
- 10.9.95.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
- 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
- 192.168.16.0 10.9.95.1 255.255.248.0 UG 0 0 0 eth0
- 10.192.0.0 10.9.95.1 255.255.0.0 UG 0 0 0 eth0
- 10.68.0.0 10.9.95.1 255.255.0.0 UG 0 0 0 eth0
- 77.50.0.0 10.9.95.1 255.255.0.0 UG 0 0 0 eth0
- 10.9.0.0 10.9.95.1 255.255.0.0 UG 0 0 0 eth0
- 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
- nechto@darkthing:~$ traceroute tracker.starlink.ru
- traceroute to tracker.starlink.ru (77.50.0.26), 30 hops max, 40 byte packets
- 1 10.9.95.1 (10.9.95.1) 1.410 ms 1.571 ms 1.758 ms
- 2 helicopter.net.starlink.ru (77.50.1.130) 0.410 ms 0.443 ms 0.515 ms
- 3 tracker.starlink.ru (77.50.0.26) 0.455 ms 0.433 ms 0.417 ms
- nechto@darkthing:~$
- Клиент:
- thing@thing-desktop:~$ sudo route -n
- Таблица маршутизации ядра протокола IP
- Destination Gateway Genmask Flags Metric Ref Use Iface
- 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
- 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
- 0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eth0
- thing@thing-desktop:~$ traceroute tracker.starlink.ru
- traceroute to tracker.starlink.ru (77.50.0.26), 30 hops max, 60 byte packets
- 1 192.168.1.1 (192.168.1.1) 0.153 ms 0.143 ms 0.133 ms
- 2 * * *
- 3 * * *
- 4 * * *
- 5 * * *
- 6 * * *
- 7 *^C
- thing@thing-desktop:~$ traceroute ya.ru
- traceroute to ya.ru (93.158.134.3), 30 hops max, 60 byte packets
- 1 192.168.1.1 (192.168.1.1) 0.104 ms 0.091 ms 0.082 ms
- 2 pptp-gw.net.starlink.ru (77.50.1.59) 3.819 ms 3.807 ms 3.797 ms
- 3 * * *
- 4 msk-ix-m9.yandex.net (193.232.244.93) 3.740 ms 3.731 ms 3.721 ms
- 5 www.yandex.ru (93.158.134.3) 3.736 ms 3.726 ms 3.681 ms
- thing@thing-desktop:~$