Исходные данные провайдера:
Код: Выделить всё
IP карточки: 10.30.4.199
Основной шлюз: 10.30.0.254
DNS: 172.16.2.2
сервер vpn.mannet.ru (172.16.2.10)Сеть на карточке поднята:
Код: Выделить всё
[root@localhost rager]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:1D:60:48:C3:6E
inet addr:10.30.4.199 Bcast:10.30.255.255 Mask:255.255.0.0
inet6 addr: fe80::21d:60ff:fe48:c36e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6120 errors:0 dropped:0 overruns:0 frame:0
TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:465444 (454.5 KiB) TX bytes:5636 (5.5 KiB)
Interrupt:19Добавляю в таблицу маршрутизации маршруты на VPN и DNS
Код: Выделить всё
[root@localhost rager]# route add -host 172.16.2.2 gw 10.30.0.254
[root@localhost rager]# route add -host 172.16.2.10 gw 10.30.0.254
[root@localhost rager]# route del default
[root@localhost rager]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.2.2 10.30.0.254 255.255.255.255 UGH 0 0 0 eth0
172.16.2.10 10.30.0.254 255.255.255.255 UGH 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 5 0 0 eth0
10.30.0.0 0.0.0.0 255.255.0.0 U 5 0 0 eth0Пингую vpn и dns сервера — пингуются нормально.
Настраиваю VPN .
Содержимое /etc/ppp/peers/mannet
Код: Выделить всё
pty "pptp vpn.mannet.ru --nolaunchpppd"
user МойЛогин
password "МойПасс"
nodeflate
nobsdcomp
noauthПоднимаю соединение
Код: Выделить всё
[root@localhost rager]# pppd call mannet debug nodetach
using channel 1
Using interface ppp0
Connect: ppp0 <--> /dev/pts/2
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xa9491b9e> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <accomp> <pcomp> <mru 1500> <magic 0x70fa6060> <auth chap MS-v2>]
sent [LCP ConfAck id=0x1 <accomp> <pcomp> <mru 1500> <magic 0x70fa6060> <auth chap MS-v2>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xa9491b9e> <pcomp> <accomp>]
rcvd [CHAP Challenge id=0x1 <bb1e68a3d4429c5dec5311862dcceb07>, name = ""]
sent [CHAP Response id=0x1 <841a27aade39afe5f5feb5a77813b6fbbf3818ebb79b27ecb1d078e8125a49e0075545713e93
6113933646d6df2cbf43b7>, name = "mn03826"]
rcvd [CHAP Success id=0x1 "S=4918C7C82F717A3E9018F7D1A0B103D6B0DA6B93"]
CHAP authentication succeeded
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0>]
rcvd [IPCP ConfReq id=0x1 <addr 10.0.0.1> <compress VJ 0f 00>]
sent [IPCP ConfAck id=0x1 <addr 10.0.0.1> <compress VJ 0f 00>]
rcvd [IPCP ConfNak id=0x1 <addr 172.19.10.241>]
sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 172.19.10.241>]
rcvd [IPCP ConfAck id=0x2 <compress VJ 0f 01> <addr 172.19.10.241>]
local IP address 172.19.10.241
remote IP address 10.0.0.1
Script /etc/ppp/ip-up started (pid 9041)
Script /etc/ppp/ip-up finished (pid 9041), status = 0x0Удаленный сервер выдается такой же, как и в Виндах (10.0.0.1)
Код: Выделить всё
eth0 Link encap:Ethernet HWaddr 00:1D:60:48:C3:6E
inet addr:10.30.4.199 Bcast:10.30.255.255 Mask:255.255.0.0
inet6 addr: fe80::21d:60ff:fe48:c36e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:27391 errors:0 dropped:0 overruns:0 frame:0
TX packets:79 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2209281 (2.1 MiB) TX bytes:9268 (9.0 KiB)
Interrupt:19
ppp0 Link encap:Point-to-Point Protocol
inet addr:172.19.10.241 P-t-P:10.0.0.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:42 (42.0 b) TX bytes:48 (48.0 b)Прописываю маршрут до удаленного сервера-шлюза:
Код: Выделить всё
[root@localhost rager]# route add default gw 10.0.0.1
[root@localhost rager]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
172.16.2.2 10.30.0.254 255.255.255.255 UGH 0 0 0 eth0
172.16.2.10 10.30.0.254 255.255.255.255 UGH 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 5 0 0 eth0
10.30.0.0 0.0.0.0 255.255.0.0 U 5 0 0 eth0
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 ppp0Пробую пинговать любой сайт — пишет «unknown host»
Пингую 10.0.0.1 — пишет «From 172.19.10.241 icmp_seq=1 Destination Host Unreachable»
При этом vpn.mannet.ru 172.16.2.10, DNS-сервер 172.16.2.2 и основной шлюз 10.30.0.254 пингуются по-прежнему.