What's new

OpenVPN Disconnects After Inactivity

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Forty Eight

New Around Here
Hi All,

I am having an issue with my Asus router which has Merlin 380.65_2 firmware. I have setup OpenVPN (UDP), when I activate the VPN it works perfectly but if I leave it for the night it stops working (seems like a timeout?) but still reports connected on the status screen. At the moment I have a Policy Rule to route 3 devices through the VPN tunnel and to block the routed clients if tunnel goes down, all other traffic goes through as normal.

I have attached some images of my configuration, please find the sys log below, I cannot spot anything to report a timeout or anything but if anyone could suggest a reason to why I get disconnected over night I would greatly appreciate it. Many thanks for the help in advance!
 

Attachments

  • VPN Status.JPG
    VPN Status.JPG
    68.9 KB · Views: 533
  • VPNConfig1.JPG
    VPNConfig1.JPG
    91.2 KB · Views: 815
  • VPNConfig2.JPG
    VPNConfig2.JPG
    67.3 KB · Views: 672
Hi All,

I am having an issue with my Asus router which has Merlin 380.65_2 firmware. I have setup OpenVPN (UDP), when I activate the VPN it works perfectly but if I leave it for the night it stops working (seems like a timeout?) but still reports connected on the status screen. At the moment I have a Policy Rule to route 3 devices through the VPN tunnel and to block the routed clients if tunnel goes down, all other traffic goes through as normal.

I have attached some images of my configuration, please find the sys log below, I cannot spot anything to report a timeout or anything but if anyone could suggest a reason to why I get disconnected over night I would greatly appreciate it. Many thanks for the help in advance!
I would set "Start With Wan" to Yes. That may not solve your problem but I would start there.
 
... why I get disconnected over night I would greatly appreciate it.

I too occasionally observed a physically 'dead' VPN Client connection whilst the GUI shows it as 'connected'...also without any incriminating 'timeout/disconnection' events, so basically I resorted to using a cron task to issue a 'curl' command out through the tunnel to see if it can retrieve data. If it can't then my VPN Syslog monitor will restart the VPN Client.

https://www.snbforums.com/threads/openvpn-disconnects-when-session-expires.37531/#post-312991

P.S. Did you post the Syslog for the last observed OpenVPN messages?
 
Last edited:
Hi All,

Thanks for the responses!

Firstly, I have set "Start With Wan" to YES, however this option only starts the VPN connection automatically if the router reboots.

I cannot upload the .txt document for the sys log for some reason, I have attached screenshots instead (sorry about that).

I have no idea about scrips at this point I'm afraid so do not know where to start :(

I have tried to put in dhcp-server DNS 8.8.8.8 and dhcp-server DNS 8.8.4.4 on the Custom Configuration section but the VPN won't activate.


Any ideas looking at the sys log?

Thanks again:)
 

Attachments

  • syslog1.JPG
    syslog1.JPG
    60.5 KB · Views: 327
  • syslog2.JPG
    syslog2.JPG
    52.7 KB · Views: 581
  • syslog3.JPG
    syslog3.JPG
    45.8 KB · Views: 627
I'm afraid this is a case of the blind leading the blind. I've been at the mercy of those here who are much more experienced than myself. One thing I noticed is you are using Google DNS server addresses. From what I understood those should be the DNS server of your VPN provider. That may or may not make a difference but its worth a try. Also, see post #319 in this thread. Look at the policy rules configuration posted by the gentleman who originally identified the problem. Good Luck.

https://www.snbforums.com/threads/h...oviders-10-15-fixed.30851/page-16#post-314475
 
Hi All,

Thanks for the responses!

Firstly, I have set "Start With Wan" to YES, however this option only starts the VPN connection automatically if the router reboots.

I cannot upload the .txt document for the sys log for some reason, I have attached screenshots instead (sorry
I have no idea about scrips at this point I'm afraid so do not know where to start :(

I have tried to put in dhcp-server DNS 8.8.8.8 and dhcp-server DNS 8.8.4.4 on the Custom Configuration section but the VPN won't activate.


Any ideas looking at the sys log?

Thanks again:)
Hi All,

Thanks for the responses!

Firstly, I have set "Start With Wan" to YES, however this option only starts the VPN connection automatically if the router reboots.

I cannot upload the .txt document for the sys log for some reason, I have attached screenshots instead (sorry about that).

I have no idea about scrips at this point I'm afraid so do not know where to start :(

I have tried to put in dhcp-server DNS 8.8.8.8 and dhcp-server DNS 8.8.4.4 on the Custom Configuration section but the VPN won't activate.


Any ideas looking at the sys log?

Thanks again:)

For one thing you are using port 53 udp for your vpn. That port is reserved for dns. Second when dns is specified in custom configuration and the accept dns configuration set to "strict" will break your dns over the tunnel. I recommend removing dns custom config and setting accept dns configuration to "Disabled". Then set your Google dns servers 8.8.8.8 etc. into your routers wan settings not lan dhcp settings. Then reboot to see if your vpn comes up when called in the boot process. You can make changes to openvpn client apply and turn client off and on again but sometimes a reboot will prove your configuration wrong. Keep rebooting with vpn set to start with Wan to test your vpn stability.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top