Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When connecting to my own VPN server on a specific network, called public-network, my Mac disconnects the VPN connection after 2 minutes and 30 seconds.

I have performed several tests and this is the result:

  • It works fine until the 2:30 mark
  • It doesn't matter which Mac I use, it still disconnects
  • It doesn't matter which client I use, all of the following does the same: OSX system client, HMA! Pro VPN and Shimo
  • It doesn't matter which protocol I use, at least all of these protocols does the same: PPTP, OpenVPN and L2TP over IPSec
  • The same thing happens using my own VPN server and HMA!'s VPN server.
  • All other clients (Windows/iPhone) can use any of these VPN servers and protocols without problem on public-network
  • On OSX, all the protocols, clients and servers works fine on any other network

So it seems that it is the combination of OSX, VPN & public-network that causes this.

This is the syslog from my VPN server, when the disconnection happens:

Feb  2 12:04:32 raspberrypi pptpd[31400]: CTRL: EOF or bad error reading ctrl packet length.
Feb  2 12:04:32 raspberrypi pptpd[31400]: CTRL: couldn't read packet header (exit)
Feb  2 12:04:32 raspberrypi pptpd[31400]: CTRL: CTRL read failed
Feb  2 12:04:32 raspberrypi pptpd[31400]: CTRL: Reaping child PPP[31401]
Feb  2 12:04:32 raspberrypi pppd[31401]: Hangup (SIGHUP)
Feb  2 12:04:32 raspberrypi pppd[31401]: Modem hangup
Feb  2 12:04:32 raspberrypi pppd[31401]: Connect time 2.5 minutes.
Feb  2 12:04:32 raspberrypi pppd[31401]: Sent 3963649 bytes, received 362775 bytes.
Feb  2 12:04:32 raspberrypi pppd[31401]: MPPE disabled
Feb  2 12:04:32 raspberrypi pppd[31401]: Connection terminated.
Feb  2 12:04:32 raspberrypi pppd[31401]: Exit.
Feb  2 12:04:32 raspberrypi pptpd[31400]: CTRL: Client <ip-adress> control connection finished
share|improve this question

1 Answer 1

Try to test if vpn disconnects on windows system if you are using PPTP then the problem could be in routing and "tcp buffer size" at macos.

If the problem is only for macos system then this could help: try to add routes for your internal network something like this: route add -net 192.168.1.0/24 192.168.1.1 (first is mask of our internal network, second is gateway of your network)

We had similar problem - but vpn didn't disconnected, just all tpc traffic dies. - it is because of buffer size.

If adding that route via terminal helps then do this: create file ip-up at /etc/ppp

to file paste:

#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec:/System/Library/CoreServices;
export PATH
/sbin/route add -net 192.168.1.0/24 192.168.1.1  - modify to be same as it is on your network

save it and modify permission sudo chmod a+x ip-up (/etc/ppp/ip-up)

On each connection to vpn route will be added.

share|improve this answer
    
How can I find my mask of the internal network? The gateway is just the internal ip-address of my VPN server's router, right? –  Tyilo Feb 2 '13 at 14:03
    
I have tested this on a Windows system, where it works perfectly –  Tyilo Feb 2 '13 at 14:03
    
And should the code be executed on the VPN server or on my client Mac? –  Tyilo Feb 2 '13 at 14:27
    
your mask is in settings but if you type on windows/mac netstat -r you will get routes you have on ifconfig - you will get ip configuration of your network (macos) ip of your internal network probably will be same as for your vpn. for example: 192.168.1.1 - 192.168.1.255 is 192.168.1.0/24 and probably default gateway is 192.168.1.1 your default gateway for VPN - this could be same as for your vpn server for internal network - check your DHCP server –  aegispotae Feb 2 '13 at 14:41
    
sry it is missing enters on line ends you want to use command ifconfig for getting info of your network –  aegispotae Feb 2 '13 at 14:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.