[SOLVED] Start stop OpenVPN client connection via SSH DD WRT

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
TheJags
DD-WRT Novice


Joined: 16 Jan 2021
Posts: 13

PostPosted: Wed Jul 28, 2021 16:16    Post subject: [SOLVED] Start stop OpenVPN client connection via SSH DD WRT Reply with quote
DD WRT: v3.0 r47090
Router: ASUS RT AC68U
Desktop OS: Ubuntu MATE 21.04
Kernel: Linux 4.4.276 #3717 SMP Thu Jul 22 03:10:07 +07 2021 armv7l DD-WRT

I have setup OpenVPN client configuration for ProtonVPN using GUI, and I can connect to it by:

Services tab > VPN > OpenVPN client > Enable > Save > Apply settings.

I have also configured SSH login from my desktop (Linux/Ubuntu).

Now I would like to start/stop connection to ProtonVPN/OpenVPN client using SSH.

Though I have gone through these 3 threads on similar issues, I couldn't make it work.

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1044736#1044736

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1091530#1091530

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1182409#1182409

Thanks a lot in advance.


Last edited by TheJags on Wed Jul 28, 2021 17:10; edited 2 times in total
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12882
Location: Netherlands

PostPosted: Wed Jul 28, 2021 16:24    Post subject: Reply with quote
Try this:
Code:
stopservice openvpn
startservice openvpn

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
TheJags
DD-WRT Novice


Joined: 16 Jan 2021
Posts: 13

PostPosted: Wed Jul 28, 2021 16:30    Post subject: Reply with quote
egc wrote:
Try this:
Code:
stopservice openvpn
startservice openvpn


Thanks. I've already tried this, and it's not working.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12882
Location: Netherlands

PostPosted: Wed Jul 28, 2021 16:47    Post subject: Reply with quote
The client has to be enabled in the GUI otherwise you cannot start it

So enable/start the OpenVPN client.

Reboot the router.

After that you should be able to control the process with:
stopservice openvpn
startservice openvpn

Otherwise you will have to run OpenVPN manually

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
TheJags
DD-WRT Novice


Joined: 16 Jan 2021
Posts: 13

PostPosted: Wed Jul 28, 2021 17:02    Post subject: Reply with quote
egc wrote:
The client has to be enabled in the GUI otherwise you cannot start it

So enable/start the OpenVPN client.

Reboot the router.

After that you should be able to control the process with:
stopservice openvpn
startservice openvpn

Otherwise you will have to run OpenVPN manually


Yes, after enabling OpenVPN client from GUI, it's working now.

Thank you so much.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum