LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-11-2016, 11:41 AM   #1
adrhc
Member
 
Registered: Dec 2006
Location: Bucharest
Distribution: Ubuntu 16.04 LTS
Posts: 103

Rep: Reputation: 13
pptp disconnected because VPN service stopped


Hi, I have a simple/default-settings pptp VPN connection which works with windows 7 but with Ubuntu 16.04 I get first the message:
VPN connection has been successfully established.
but after 1s I then get:
Then VPN connection 'Marchen Garten' disconnected because the VPN service stopped.

It seems to me the VPN connections succeeds but after some autoconfigured routes/dns are appended I lose my original/main wired-ethernet-connection.

Please see the log; what could be the solution?
Attached Files
File Type: txt pptp-vpn.txt (14.3 KB, 522 views)
 
Old 10-12-2016, 08:35 PM   #2
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 421

Rep: Reputation: 74
Is it on custom kernel? dmesg show any relevant info? Can you also please post output of ethtool and /etc/network/interfaces as well, just to be sure that no custom configs there and let NetworkManager handle interfaces.
 
Old 10-13-2016, 04:13 AM   #3
adrhc
Member
 
Registered: Dec 2006
Location: Bucharest
Distribution: Ubuntu 16.04 LTS
Posts: 103

Original Poster
Rep: Reputation: 13
cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

# auto eth0
# iface eth0 inet dhcp
# iface eth0 inet static
# address 192.168.1.31
# gateway 192.168.1.1
# netmask 255.255.255.0
# network 192.168.1.0
# broadcast 192.168.1.255

sudo ethtool eth0:
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000033 (51)
drv probe ifdown ifup
Link detected: yes

No custom kernel, just the one provided by Ubuntu:
Linux adr-desktop 4.4.0-42-generic #62-Ubuntu SMP Fri Oct 7 23:11:45 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
 
Old 10-13-2016, 04:18 AM   #4
adrhc
Member
 
Registered: Dec 2006
Location: Bucharest
Distribution: Ubuntu 16.04 LTS
Posts: 103

Original Poster
Rep: Reputation: 13
when connecting to VPN:

sudo dmesg -wH
[Oct13 12:14] userif-3: sent link down event.
[ +0.000008] userif-3: sent link up event.

sudo route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 0.0.0.0 0.0.0.0 U 50 0 0 ppp0
86.124.83.87 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
172.16.148.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8
172.17.0.1 0.0.0.0 255.255.255.255 UH 50 0 0 ppp0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.141.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1



when disconnecting the VPN:

sudo dmesg -wH
[Oct13 12:16] userif-3: sent link down event.
[ +0.000007] userif-3: sent link up event.

sudo route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
172.16.148.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.141.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1


The VPN's purpose is to allow me to connect to: 172.16.0.122
 
Old 10-13-2016, 02:48 PM   #5
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 421

Rep: Reputation: 74
I had a look at the log file you attached. I noticed that prior to disconnection SSH was reloaded. Was there any hardcoded listening addresses there? Also, does your firewall rules allow pptp? Check the interface MTU as well.
 
Old 10-14-2016, 01:45 AM   #6
adrhc
Member
 
Registered: Dec 2006
Location: Bucharest
Distribution: Ubuntu 16.04 LTS
Posts: 103

Original Poster
Rep: Reputation: 13
Hi, when running Windows 7 in VMWare on the same Ubuntu I presented above the VPN connection is working fine so I guess the firewall is not an issue.

Anyway, my firewall is:
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), allow (routed)
New profiles: skip

To Action From
-- ------ ----
22 LIMIT IN Anywhere
80 ALLOW IN Anywhere
443 ALLOW IN Anywhere
Anywhere ALLOW IN 192.168.1.0/24
444 ALLOW IN Anywhere
334 ALLOW IN Anywhere

MTU the same (1500) for all:

eth0 Link encap:Ethernet HWaddr d0:50:99:7c:28:bf
inet addr:192.168.1.31 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9529399 errors:0 dropped:0 overruns:0 frame:0
TX packets:9459796 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5457595648 (5.4 GB) TX bytes:7011023770 (7.0 GB)

vmnet1 Link encap:Ethernet HWaddr 00:50:56:c0:00:01
inet addr:192.168.141.1 Bcast:192.168.141.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

vmnet8 Link encap:Ethernet HWaddr 00:50:56:c0:00:08
inet addr:172.16.148.1 Bcast:172.16.148.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Last edited by adrhc; 10-14-2016 at 01:49 AM.
 
Old 10-14-2016, 02:48 AM   #7
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 421

Rep: Reputation: 74
I mean hardcoded Listening IP on sshd_config. How about stopping NetworkManager, assigning static IP on eth0 then start vpn via commandline? This will rule out at least the nm-applet/networkmanager aspect of the issue.

strace'ing it would certainly points us to the right direction. But its output can be dizzying at times.
 
Old 10-14-2016, 06:04 AM   #8
adrhc
Member
 
Registered: Dec 2006
Location: Bucharest
Distribution: Ubuntu 16.04 LTS
Posts: 103

Original Poster
Rep: Reputation: 13
Hm, I don't know how but the VPN seems now connected. The problem now is that I can't access the computer I am suppose to (172.16.0.122:37777) using the VPN.

netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
default * 0.0.0.0 U 0 0 0 ppp0
client.rdsnet.r 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth0
172.16.148.0 * 255.255.255.0 U 0 0 0 vmnet8
172.17.0.1 * 255.255.255.255 UH 0 0 0 ppp0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.141.0 * 255.255.255.0 U 0 0 0 vmnet1

traceroute6 -p 37777 172.16.0.122
traceroute: unknown host 172.16.0.122

/usr/bin/inetutils-traceroute -p 37777 172.16.0.122
traceroute to 172.16.0.122 (172.16.0.122), 64 hops max
1 192.168.1.1 0.429ms 0.346ms 0.304ms
2 10.0.0.1 3.654ms 1.943ms 0.817ms
3 * * *
4 213.154.100.87 6.736ms 5.536ms 3.739ms
5 * * *
6 * * *
7 * * *
and so long on ...

What could be the problem?
 
Old 10-14-2016, 06:39 AM   #9
adrhc
Member
 
Registered: Dec 2006
Location: Bucharest
Distribution: Ubuntu 16.04 LTS
Posts: 103

Original Poster
Rep: Reputation: 13
I solved this problem too by adding the route:
sudo ip route add 172.16.0.122 via 172.17.0.1 dev ppp0

I still don't know why the VPN connection was initially saying it's connected then immediately after saying it's disconnected but I doubt we can discover this while now everything is fine.
 
Old 10-15-2016, 12:09 PM   #10
adrhc
Member
 
Registered: Dec 2006
Location: Bucharest
Distribution: Ubuntu 16.04 LTS
Posts: 103

Original Poster
Rep: Reputation: 13
Well, I guess I found the initial problem too. While testing a script for automatically reconnect the VPN I experienced the same reported problem again (after anyway successfully connecting many times). I started VMWare + Windows 7 just to check the VPN is accessible and it wasn't. So I guess at the time I first experienced the problem an unhappy coincidence allowed for vpn-in-windows7 to work but then again vpn-in-linux not to work.

I consider the thread solved.
 
  


Reply

Tags
pptp, ubuntu 16.04, vpn


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] PPTP VPN Server Issue w/VPN access AmberM Linux - Newbie 2 02-17-2014 10:34 AM
How do you set NetworkManager to retry pptp vpn if disconnected MikeyCarter Linux - Hardware 0 10-25-2012 05:05 PM
PPTP Packets from the VPN Client Cannot Reach the VPN server SubZeroJake Linux - Networking 1 05-14-2012 06:52 PM
pptp disconnected after few seconds cheesewizz Linux - Newbie 2 06-01-2011 07:18 PM
LXer: Linux Configure point to point tunneling PPTP VPN client for Microsoft PPTP vpn server LXer Syndicated Linux News 0 06-13-2007 08:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration