#До соединения
[root@kvmserver ~]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.16.80.0     *               255.255.252.0   U     0      0        0 eth1
link-local      *               255.255.0.0     U     1002   0        0 eth0
link-local      *               255.255.0.0     U     1003   0        0 eth1
10.8.0.0        *               255.255.0.0     U     0      0        0 eth0
# Соединение
pptpsetup --create VPN --server 217.9.84.171 --username <username> --password <password> --start
route add default ppp0
route add -net 172.16.0.0 netmask 255.255.0.0 gw 172.16.80.1
# После соединения
[root@kvmserver ~]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
217.9.89.1      *               255.255.255.255 UH    0      0        0 ppp0
217.9.84.171    172.16.80.1     255.255.255.255 UGH   0      0        0 eth1
172.16.80.0     *               255.255.252.0   U     0      0        0 eth1
172.16.0.0      172.16.80.1     255.255.0.0     UG    0      0        0 eth1
link-local      *               255.255.0.0     U     1002   0        0 eth0
link-local      *               255.255.0.0     U     1003   0        0 eth1
10.8.0.0        *               255.255.0.0     U     0      0        0 eth0
default         *               0.0.0.0         U     0      0        0 ppp0
# Отключиться от соединения
killall pppd
  • Нет меток