Both my home and workplace networks are the same (subnet 10.0.0.x).
When I configure a VPN connection on my Windows 7 machine (PPTP), I can ping any server that is located at my workplace without any static routes involved.
On the other hand, when configuring the same VPN connection on my Ubuntu 14.04 machine, I can't make any connection with the remote network util a static route is created for a specific host on the other network through the tunnel.
I was trying to figure out what was happening on Windows and found the following:
There is a second Default Gateway that leads all traffic to the tunnel, here's the
route print
output:Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 10.0.0.138 10.0.0.9 4255 0.0.0.0 0.0.0.0 On-link 192.168.88.102 31 10.0.0.0 255.255.255.0 On-link 10.0.0.9 4511 10.0.0.9 255.255.255.255 On-link 10.0.0.9 4511 10.0.0.255 255.255.255.255 On-link 10.0.0.9 4511 127.0.0.0 255.0.0.0 On-link 127.0.0.1 4531 127.0.0.1 255.255.255.255 On-link 127.0.0.1 4531 127.255.255.255 255.255.255.255 On-link 127.0.0.1 4531 192.168.88.102 255.255.255.255 On-link 192.168.88.102 286 x.x.x.x 255.255.255.255 10.0.0.138 10.0.0.9 4256 224.0.0.0 240.0.0.0 On-link 127.0.0.1 4531 224.0.0.0 240.0.0.0 On-link 10.0.0.9 4514 224.0.0.0 240.0.0.0 On-link 192.168.88.102 31 255.255.255.255 255.255.255.255 On-link 127.0.0.1 4531 255.255.255.255 255.255.255.255 On-link 10.0.0.9 4511 255.255.255.255 255.255.255.255 On-link 192.168.88.102 286
192.168.88.102
is my IP over the tunnel,
10.0.0.9
is my local IP,
10.0.0.138
is my router,
and x.x.x.x
is the VPN server public IP.
tracert
output:
for the first time:
tracert -d 10.0.0.83
Tracing route to 10.0.0.83 over a maximum of 30 hops
1 10.0.0.9 reports: Destination host unreachable.
Trace complete.
and for the second time:
tracert -d 10.0.0.83
Tracing route to 10.0.0.83 over a maximum of 30 hops
1 42 ms 33 ms 53 ms 192.168.88.1
2 35 ms 31 ms 33 ms 10.0.0.83
Trace complete.
- relevant
arp
output:
remote address:
arp -a | findstr 10.0.0.83
10.0.0.83 static
local address:
arp -a | findstr 10.0.0.14
10.0.0.14 b8-27-eb-37-38-a4 dynamic
while on Ubuntu the default routing list is:
Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 10.0.0.138 0.0.0.0 UG 0 0 0 wlan0 10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0 192.168.88.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0 x.x.x.x 10.0.0.138 255.255.255.255 UGH 0 0 0 wlan0 x.x.x.x 10.0.0.138 255.255.255.255 UGH 0 0 0 wlan0
Adding another default gateway didn't do the trick.
What is the explanation for this behavior and how can I make this happen in Ubuntu?
EDIT:
I'm using the built-in VPN client of Ubuntu (NetworkManager) which is running under root
according to syslog
. Also, tried adding static routes in the IPv4 Settings configuration panel of the VPN plugin which seemed successful in adding them to the routing table but not acting as Windows does.
Here's the Ubuntu /var/log/syslog
from the moment the connection is initiated:
May 29 16:49:56 hostname wpa_supplicant[823]: wlan0: CTRL-EVENT-SCAN-STARTED
May 29 16:49:57 hostname wpa_supplicant[823]: nl80211: send_and_recv->nl_recvmsgs failed: -33
May 29 16:50:15 hostname NetworkManager[757]: <info> Starting VPN service 'pptp'...
May 29 16:50:15 hostname NetworkManager[757]: <info> VPN service 'pptp' started (org.freedesktop.NetworkManager.pptp), PID 5123
May 29 16:50:15 hostname NetworkManager[757]: <info> VPN service 'pptp' appeared; activating connections
May 29 16:50:15 hostname NetworkManager[757]: <info> VPN plugin state changed: starting (3)
May 29 16:50:15 hostname pppd[5127]: Plugin /usr/lib/pppd/2.4.5/nm-pptp-pppd-plugin.so loaded.
May 29 16:50:15 hostname NetworkManager[757]: <info> VPN connection 'VPN1' (Connect) reply received.
May 29 16:50:15 hostname pppd[5127]: pppd 2.4.5 started by root, uid 0
May 29 16:50:15 hostname pppd[5127]: Using interface ppp0
May 29 16:50:15 hostname pppd[5127]: Connect: ppp0 <--> /dev/pts/7
May 29 16:50:15 hostname NetworkManager[757]: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
May 29 16:50:15 hostname NetworkManager[757]: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
May 29 16:50:15 hostname NetworkManager[757]: <warn> /sys/devices/virtual/net/ppp0: couldn't determine device driver; ignoring...
May 29 16:50:15 hostname pptp[5132]: nm-pptp-service-5123 log[main:pptp.c:314]: The synchronous pptp option is NOT activated
May 29 16:50:15 hostname pptp[5147]: nm-pptp-service-5123 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
May 29 16:50:15 hostname pptp[5147]: nm-pptp-service-5123 log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply
May 29 16:50:15 hostname pptp[5147]: nm-pptp-service-5123 log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established.
May 29 16:50:16 hostname pptp[5147]: nm-pptp-service-5123 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
May 29 16:50:16 hostname pptp[5147]: nm-pptp-service-5123 log[ctrlp_disp:pptp_ctrl.c:858]: Received Outgoing Call Reply.
May 29 16:50:16 hostname pptp[5147]: nm-pptp-service-5123 log[ctrlp_disp:pptp_ctrl.c:897]: Outgoing call established (call ID 0, peer's call ID 61002).
May 29 16:50:16 hostname pppd[5127]: CHAP authentication succeeded
May 29 16:50:16 hostname pppd[5127]: MPPE 128-bit stateless compression enabled
May 29 16:50:18 hostname pppd[5127]: local IP address 192.168.88.102
May 29 16:50:18 hostname pppd[5127]: remote IP address 192.168.88.1
May 29 16:50:18 hostname pppd[5127]: primary DNS address 10.0.0.2
May 29 16:50:18 hostname NetworkManager[757]: <info> VPN connection 'VPN1' (IP4 Config Get) reply received from old-style plugin.
May 29 16:50:18 hostname NetworkManager[757]: <info> VPN Gateway: x.x.x.x
May 29 16:50:18 hostname NetworkManager[757]: <info> Tunnel Device: ppp0
May 29 16:50:18 hostname NetworkManager[757]: <info> IPv4 configuration:
May 29 16:50:18 hostname NetworkManager[757]: <info> Internal Address: 192.168.88.102
May 29 16:50:18 hostname NetworkManager[757]: <info> Internal Prefix: 32
May 29 16:50:18 hostname NetworkManager[757]: <info> Internal Point-to-Point Address: 192.168.88.1
May 29 16:50:18 hostname NetworkManager[757]: <info> Maximum Segment Size (MSS): 0
May 29 16:50:18 hostname NetworkManager[757]: <info> Forbid Default Route: yes
May 29 16:50:18 hostname NetworkManager[757]: <info> Internal DNS: 10.0.0.2
May 29 16:50:18 hostname NetworkManager[757]: <info> DNS Domain: '(none)'
May 29 16:50:18 hostname NetworkManager[757]: <info> No IPv6 configuration
May 29 16:50:19 hostname NetworkManager[757]: <info> VPN connection 'VPN1' (IP Config Get) complete.
May 29 16:50:19 hostname NetworkManager[757]: <info> Policy set 'AO' (wlan0) as default for IPv4 routing and DNS.
May 29 16:50:19 hostname NetworkManager[757]: <info> Writing DNS information to /sbin/resolvconf
May 29 16:50:19 hostname dnsmasq[1565]: setting upstream servers from DBus
May 29 16:50:19 hostname dnsmasq[1565]: using nameserver 10.0.0.2#53 for domain 88.168.192.in-addr.arpa
May 29 16:50:19 hostname dnsmasq[1565]: using nameserver 10.0.0.138#53
May 29 16:50:20 hostname NetworkManager[757]: <info> VPN plugin state changed: started (4)
May 29 16:50:20 hostname dbus[691]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)
May 29 16:50:20 hostname dbus[691]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
/var/log/<files>
) to see if there are any errors reported by pptp and add appropriate output to your question.use-routes
option toyes
.use-routes
option. As I mentioned in the question, Windows makes two default routes. When pinging a remote severs (which has the same subnet as my own) it first tries to find it locally and when it fails - a request to the tunnel is sent (as stated in the routing table by the second default gateway). That's not what happens in Ubuntu.