PPTP VPN [решено]

Автор 3ax, 18 марта 2013, 13:00:17

« назад - далее »

0 Пользователи и 3 гостей просматривают эту тему.

3ax

Возникла проблема - если создать vpn (pptp) через NM, то vpn соединяется и инет работает, но если вручную создавать (/etc/ppp/peers/), то соединяется, но инета нет, хотя параметры одинаковые. Подскажите где рыть.

easy

Цитата: 3ax от 18 марта 2013, 13:00:17Подскажите где рыть.
в /etc/resolv.conf

3ax

Цитата: easy от 18 марта 2013, 14:24:15
Цитата: 3ax от 18 марта 2013, 13:00:17Подскажите где рыть.
в /etc/resolv.conf
# Generated by NetworkManager
nameserver 10.49.0.1
nameserver 192.168.1.1

?

easy

Цитата: 3ax от 18 марта 2013, 19:55:35?
а если вручную vpn создавать (/etc/ppp/peers/)?

3ax

Цитата: easy от 18 марта 2013, 20:09:34
Цитата: 3ax от 18 марта 2013, 19:55:35?
а если вручную vpn создавать (/etc/ppp/peers/)?
В смысле?
Само соединение
remotename multi
linkname multi
#ipparam tunnel
pty "pptp vpn.lan --nolaunchpppd"
name zaharov
password xxxx
usepeerdns
nodeflate
nobsdcomp
refuse-eap
refuse-pap
mtu 1400
mru 1400
lcp-echo-failure 10
maxfail 0
holdoff 15

Вот что пишет в syslog
Mar 18 19:00:50 Server pppd[20334]: pppd 2.4.5 started by root, uid 0
Mar 18 19:00:50 Server pppd[20334]: Using interface ppp0
Mar 18 19:00:50 Server pppd[20334]: Connect: ppp0 <--> /dev/pts/0
Mar 18 19:00:50 Server NetworkManager[1313]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Mar 18 19:00:50 Server NetworkManager[1313]:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Mar 18 19:00:50 Server modem-manager: (net/ppp0): could not get port's parent device
Mar 18 19:00:50 Server pptp[20337]: anon log[main:pptp.c:314]: The synchronous pptp option is NOT activated
Mar 18 19:00:50 Server pptp[20344]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
Mar 18 19:00:50 Server pptp[20344]: anon log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply
Mar 18 19:00:50 Server pptp[20344]: anon log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established.
Mar 18 19:00:51 Server pptp[20344]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
Mar 18 19:00:51 Server pptp[20344]: anon log[ctrlp_disp:pptp_ctrl.c:858]: Received Outgoing Call Reply.
Mar 18 19:00:51 Server pptp[20344]: anon log[ctrlp_disp:pptp_ctrl.c:897]: Outgoing call established (call ID 0, peer's call ID 21888).
Mar 18 19:00:54 Server pppd[20334]: CHAP authentication succeeded
Mar 18 19:00:54 Server pppd[20334]: CHAP authentication succeeded
Mar 18 19:00:54 Server pppd[20334]: local  IP address 195.58.251.73
Mar 18 19:00:54 Server pppd[20334]: remote IP address 172.16.100.1
Mar 18 19:00:54 Server pppd[20334]: primary   DNS address 10.49.0.1
Mar 18 19:00:54 Server pppd[20334]: secondary DNS address 10.49.0.1
Mar 18 19:00:56 Server dnsmasq[2837]: reading /etc/resolv.conf
Mar 18 19:00:56 Server dnsmasq[2837]: using nameserver 10.49.0.1#53
Mar 18 19:00:56 Server dnsmasq[2837]: using nameserver 10.49.0.1#53

вот подключение через NM
Mar 18 19:04:16 Server NetworkManager[1313]: <info> Starting VPN service 'org.freedesktop.NetworkManager.pptp'...
Mar 18 19:04:16 Server NetworkManager[1313]: <info> VPN service 'org.freedesktop.NetworkManager.pptp' started (org.freedesktop.NetworkManager.pptp), PID 20410
Mar 18 19:04:16 Server NetworkManager[1313]: <info> VPN service 'org.freedesktop.NetworkManager.pptp' appeared, activating connections
Mar 18 19:04:16 Server NetworkManager[1313]: <info> VPN plugin state changed: 1
Mar 18 19:04:16 Server NetworkManager[1313]: <info> VPN plugin state changed: 3
Mar 18 19:04:16 Server NetworkManager[1313]: <info> VPN connection 'mult' (Connect) reply received.
Mar 18 19:04:16 Server pppd[20412]: Plugin /usr/lib/pppd/2.4.5/nm-pptp-pppd-plugin.so loaded.
Mar 18 19:04:16 Server pppd[20412]: pppd 2.4.5 started by root, uid 0
Mar 18 19:04:16 Server pppd[20412]: Using interface ppp0
Mar 18 19:04:16 Server pppd[20412]: Connect: ppp0 <--> /dev/pts/0
Mar 18 19:04:16 Server pptp[20415]: nm-pptp-service-20410 log[main:pptp.c:314]: The synchronous pptp option is NOT activated
Mar 18 19:04:16 Server NetworkManager[1313]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Mar 18 19:04:16 Server NetworkManager[1313]:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Mar 18 19:04:16 Server modem-manager: (net/ppp0): could not get port's parent device
Mar 18 19:04:16 Server pptp[20423]: nm-pptp-service-20410 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
Mar 18 19:04:16 Server pptp[20423]: nm-pptp-service-20410 log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply
Mar 18 19:04:16 Server pptp[20423]: nm-pptp-service-20410 log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established.
Mar 18 19:04:17 Server pptp[20423]: nm-pptp-service-20410 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
Mar 18 19:04:17 Server pptp[20423]: nm-pptp-service-20410 log[ctrlp_disp:pptp_ctrl.c:858]: Received Outgoing Call Reply.
Mar 18 19:04:17 Server pptp[20423]: nm-pptp-service-20410 log[ctrlp_disp:pptp_ctrl.c:897]: Outgoing call established (call ID 0, peer's call ID 22784).
Mar 18 19:04:20 Server pppd[20412]: CHAP authentication succeeded
Mar 18 19:04:20 Server pppd[20412]: CHAP authentication succeeded
Mar 18 19:04:20 Server pppd[20412]: local  IP address 195.58.251.73
Mar 18 19:04:20 Server pppd[20412]: remote IP address 172.16.100.1
Mar 18 19:04:20 Server pppd[20412]: primary   DNS address 10.49.0.1
Mar 18 19:04:20 Server pppd[20412]: secondary DNS address 10.49.0.1
Mar 18 19:04:20 Server NetworkManager[1313]: <info> VPN connection 'mult' (IP Config Get) reply received.
Mar 18 19:04:20 Server NetworkManager[1313]: nm_ip4_config_add_nameserver: assertion `nameserver != s' failed
Mar 18 19:04:20 Server NetworkManager[1313]: <info> VPN Gateway: 10.49.0.1
Mar 18 19:04:20 Server NetworkManager[1313]: <info> Tunnel Device: ppp0
Mar 18 19:04:20 Server NetworkManager[1313]: <info> Internal IP4 Address: 195.58.251.73
Mar 18 19:04:20 Server NetworkManager[1313]: <info> Internal IP4 Prefix: 32
Mar 18 19:04:20 Server NetworkManager[1313]: <info> Internal IP4 Point-to-Point Address: 172.16.100.1
Mar 18 19:04:20 Server NetworkManager[1313]: <info> Maximum Segment Size (MSS): 0
Mar 18 19:04:20 Server NetworkManager[1313]: <info> Internal IP4 DNS: 10.49.0.1
Mar 18 19:04:20 Server NetworkManager[1313]: <info> DNS Domain: '(none)'
Mar 18 19:04:20 Server dnsmasq[2837]: reading /etc/resolv.conf
Mar 18 19:04:20 Server dnsmasq[2837]: using nameserver 10.49.0.1#53
Mar 18 19:04:20 Server dnsmasq[2837]: using nameserver 10.49.0.1#53
Mar 18 19:04:21 Server NetworkManager[1313]: <info> VPN connection 'mult' (IP Config Get) complete.
Mar 18 19:04:21 Server NetworkManager[1313]: <info> Policy set 'mult' (ppp0) as default for IPv4 routing and DNS.
Mar 18 19:04:21 Server NetworkManager[1313]: <info> VPN plugin state changed: 4
Mar 18 19:04:22 Server dnsmasq[2837]: reading /etc/resolv.conf
Mar 18 19:04:22 Server dnsmasq[2837]: using nameserver 192.168.1.1#53
Mar 18 19:04:22 Server dnsmasq[2837]: using nameserver 10.49.0.1#53


easy

И что значит-"инета нет"
После подключения ч/з ppp:
nslookup www.ru
nslookup www.ru 8.8.8.8
sudo route
ping www.ru -c4

3ax

#6
Цитата: easy от 18 марта 2013, 21:54:48
И что значит-"инета нет"
После подключения ч/з ppp:
nslookup www.ru
nslookup www.ru 8.8.8.8
sudo route
ping www.ru -c4


root@Server:~# nslookup www.ru
Server: 10.49.0.1
Address: 10.49.0.1#53

Non-authoritative answer:
Name: www.ru
Address: 194.87.0.50

root@Server:~# nslookup www.ru 8.8.8.8
;; connection timed out; no servers could be reached

root@Server:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.49.0.1       10.49.0.1       255.255.255.255 UGH   0      0        0 eth0
10.49.0.1       *               255.255.255.255 UH    0      0        0 eth0
172.16.100.1    *               255.255.255.255 UH    0      0        0 ppp0
10.49.0.0       *               255.255.255.0   U     1      0        0 eth0
192.168.1.0     *               255.255.255.0   U     1      0        0 eth1
default         10.49.0.1       0.0.0.0         UG    0      0        0 eth0
root@Server:~# ping www.ru -c4
PING www.ru (194.87.0.50) 56(84) bytes of data.

--- www.ru ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3023ms



Проблема решена с помощью
route del default
route add default dev ppp0

Спасибо.

315th

Цитата: 3ax от 20 марта 2013, 05:19:59Проблема решена с помощью
В общих случаях она решается по-другому.
Debian GNU/Linux 7.11 (wheezy) - CLI
ICH7; D525MV; r8169; Linux 4.14.32-atomd525mv-imq-ja1 (i686); Intel Atom D525 1.8 GHz