spacepaste

  1.  
  2. Сервер:
  3. nechto@darkthing:~$ sudo iptables -A POSTROUTING -t nat -s 192.168.1.0/24 -j MASQUERADE
  4. nechto@darkthing:~$ sudo iptables -L
  5. Chain INPUT (policy ACCEPT)
  6. target prot opt source destination
  7. Chain FORWARD (policy ACCEPT)
  8. target prot opt source destination
  9. Chain OUTPUT (policy ACCEPT)
  10. target prot opt source destination
  11. nechto@darkthing:~$ sudo route -n
  12. Kernel IP routing table
  13. Destination Gateway Genmask Flags Metric Ref Use Iface
  14. 77.50.1.59 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
  15. 77.50.0.101 10.9.95.1 255.255.255.255 UGH 0 0 0 eth0
  16. 77.50.0.100 10.9.95.1 255.255.255.255 UGH 0 0 0 eth0
  17. 89.222.178.128 10.9.95.1 255.255.255.128 UG 0 0 0 eth0
  18. 10.9.95.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
  19. 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
  20. 192.168.16.0 10.9.95.1 255.255.248.0 UG 0 0 0 eth0
  21. 10.192.0.0 10.9.95.1 255.255.0.0 UG 0 0 0 eth0
  22. 10.68.0.0 10.9.95.1 255.255.0.0 UG 0 0 0 eth0
  23. 77.50.0.0 10.9.95.1 255.255.0.0 UG 0 0 0 eth0
  24. 10.9.0.0 10.9.95.1 255.255.0.0 UG 0 0 0 eth0
  25. 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
  26. nechto@darkthing:~$ traceroute tracker.starlink.ru
  27. traceroute to tracker.starlink.ru (77.50.0.26), 30 hops max, 40 byte packets
  28. 1 10.9.95.1 (10.9.95.1) 1.410 ms 1.571 ms 1.758 ms
  29. 2 helicopter.net.starlink.ru (77.50.1.130) 0.410 ms 0.443 ms 0.515 ms
  30. 3 tracker.starlink.ru (77.50.0.26) 0.455 ms 0.433 ms 0.417 ms
  31. nechto@darkthing:~$
  32. Клиент:
  33. thing@thing-desktop:~$ sudo route -n
  34. Таблица маршутизации ядра протокола IP
  35. Destination Gateway Genmask Flags Metric Ref Use Iface
  36. 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
  37. 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
  38. 0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eth0
  39. thing@thing-desktop:~$ traceroute tracker.starlink.ru
  40. traceroute to tracker.starlink.ru (77.50.0.26), 30 hops max, 60 byte packets
  41. 1 192.168.1.1 (192.168.1.1) 0.153 ms 0.143 ms 0.133 ms
  42. 2 * * *
  43. 3 * * *
  44. 4 * * *
  45. 5 * * *
  46. 6 * * *
  47. 7 *^C
  48. thing@thing-desktop:~$ traceroute ya.ru
  49. traceroute to ya.ru (93.158.134.3), 30 hops max, 60 byte packets
  50. 1 192.168.1.1 (192.168.1.1) 0.104 ms 0.091 ms 0.082 ms
  51. 2 pptp-gw.net.starlink.ru (77.50.1.59) 3.819 ms 3.807 ms 3.797 ms
  52. 3 * * *
  53. 4 msk-ix-m9.yandex.net (193.232.244.93) 3.740 ms 3.731 ms 3.721 ms
  54. 5 www.yandex.ru (93.158.134.3) 3.736 ms 3.726 ms 3.681 ms
  55. thing@thing-desktop:~$
  56.