0

I have been using a VPN connection on an old ThinkPad with Ubuntu 18.04 (and before that 16.04) for several years without any problems and the VPN connection was stable for hours (if not days). After changing the machine (to Macbook Pro) and upgrading to 20.04, the same VPN connection will terminate after about 5 minutes if there is no other activity on the machine. All the time I am interacting with the machine (mouse or keyboard activity), the VPN remains connected. So I suspect this is something to do with the MacBook Pro's power saving.

I have disabled all the power saving/sleep settings (that I can find) and the auto screen dimming settings. But even then, if I am not moving the mouse or typing, the VPN connection is lost after a few minutes.

Any suggestions for troubleshooting and (hopefully) resolving would be much appreciated!

| improve this question | | | | |
New contributor
TokyoColin is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • Is it exactly 5 minutes every time or roughly? What kind of VPN are you using? Were there changes made to the router that may be updating the connection every so many minutes and may kill the VPN. Though a nasty hack you could setup a cron job to run every 1 minute that does something on the internet like traceroute, ping, wget. That would revive the connection every minute. – walttheboss May 23 at 1:30
  • It's a PPTP VPN connection. I'm not sure of the precise time that it drops out so "roughly" would be my answer. No changes made to my router between the changes of machine and Ubuntu. Over the past weekend, I found that if I run a media stream (like Netflix) at the same time as the VPN is connected, then it doesn't disconnect. So similar to the cron job idea, it seems that when the machine recognises activity, the VPN stays connected. – TokyoColin 2 days ago
  • Good job noticing that a stream of some sort will keep it alive. Due to my lack of "real" skills I am a hacker. I would set up a ping or wget on a 1 minute interval. Won't cost you much if anything in terms of processor/memory. I found this on another site. >>>>>> . . . . To solve it, I edited the /etc/ppp/options.pptpd file and added the following lines: lcp-echo-failure 30 lcp-echo-interval 5 – walttheboss 2 days ago

Your Answer

TokyoColin is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.