What's new
  • 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!

Test for vpnclient running and restart it if it is

dlandon

Regular Contributor
I want to check for a vpnclient to be running and then restart it if it is. How do I check that a vpnclient is running? I don't want to start the vpnclient if it is not already running.
 
What router? What firmware? What VPN technology?
 
What router? What firmware? What VPN technology?

Sorry. I seem to have been too much into the moment and forgot to specify. I have a 5300 and I am using an OpenVPN client, firmware is 380.69 alpha 1.

The reason I feel I need to do this is that I use a nat-start script to make some iptables changes to forward ports from the VPN to the WAN. I need to do this because my VPN provider (NordVPN) blocks email ports. When I make changes on the GUI that run the nat-start script I seem to lose the port forwarding. I have to restart the VPN Client to get the port forwarding to work again. I want to restart the VPN Client at the end of the nat-start script if it is running and don't want to restart it if it is not running.
 
Last edited:
Sorry. I seem to have been too much into the moment and forgot to specify. I have a 5300 and I am using an OpenVPN client, firmware is 380.69 alpha 1.

The reason I feel I need to do this is that I use a nat-start script to make some iptables changes to forward ports from the VPN to the WAN. I need to do this because my VPN provider (NordVPN) blocks email ports. When I make changes on the GUI that run the nat-start script I seem to lose the port forwarding. I have to restart the VPN Client to get the port forwarding to work again. I want to restart the VPN Client at the end of the nat-start script if it is running and don't want to restart it if it is not running.

The nat-start code snippet should be useful?

Selective Routing with Asuswrt-Merlin
 

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!
Back
Top