What's new

Restart OpenVPN Client 1 after reboot

  • 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!

Reefaman

New Around Here
Hi all

Is it possible to have the OpenVPN client restart after a 2 minute delay after rebooting?
I have a scheduled reboot setup and I am having to go to VPN-OpenVPN Client and press Apply to get VPN to work.

Thanks

Firmware Version 3.0.0.4.374.35-4 Merlin Build
Router Asus RT-N66U
 
Is the OpenVPN client set to start with WAN? You shouldn't need to restart the client manually after a reboot.
 
Hi all

Is it possible to have the OpenVPN client restart after a 2 minute delay after rebooting?
I have a scheduled reboot setup and I am having to go to VPN-OpenVPN Client and press Apply to get VPN to work.

Thanks

Firmware Version 3.0.0.4.374.35-4 Merlin Build
Router Asus RT-N66U

You should be able to schedule the following command:

Code:
service start_vpnclient1

from either init-start, services-start or wan-start script depending on your requirements.

(P.S. I personally have wan-start issue the command 5mins after a reboot).

Regards,
 
Thank you both for quick response.

RMerlin, start with WAN is on. Is there a way to issue the delayed command as suggested by Martineau within the gui? Or is it a script?

Martineau, could you give more detail on how to do what you suggest?

Thanks
 
Thank you both for quick response.

RMerlin, start with WAN is on. Is there a way to issue the delayed command as suggested by Martineau within the gui? Or is it a script?

Martineau, could you give more detail on how to do what you suggest?

Thanks

1. Enable JFFS and create the appropriate script as shown here:

https://github.com/RMerl/asuswrt-merlin/wiki/User-scripts

2. Edit the contents of your selected script file to contain

Code:
#!/bin/sh

sleep 120

service start_vpnclient1

and make sure it is executable as per the instructions on the above URL

Regards,
 
Ok I created the script and this works, but it only starts the service again.
I should have explained better in original post that the service does start on reboot but VPN does not work. I have to goto the OpenVPN Client and click Apply to get the service to restart. I presume this action is stopping then starting the service. The VPN then works as it should.
I have tried changing the code to:

service restart_vpnclient1

but this doesnt do anything.


I should explain that i also have selective ip's for the VPN which are created by the script on this post

http://forums.smallnetbuilder.com/showthread.php?t=9311&highlight=Selective+routing&page=6

Can the restart be done as I want?

Thanks again
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

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