Need to connect from my Linux OVPN server to another server

This forum is for general conversation and user-user networking.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
BobAGI
OpenVPN Power User
Posts: 167
Joined: Mon May 05, 2014 10:17 pm

Need to connect from my Linux OVPN server to another server

Post by BobAGI » Sat Feb 10, 2018 3:58 pm

I have installed an OpenVPN server on a headless Ubuntu Server 16.04-3 and it is working good.
Now I need to connect this machine temporarily to another OpenVPN server I have set up far away.

I have understood that I can do this on a terminal (I use PuTTY from Windows7) by issuing:

Code: Select all

sudo openvpn --config <certificatefile>.ovpn
But this makes the terminal prompt go away until I do Ctrl-C at which time the connection is closed.
I need the terminal to be responsive while I have the connection open so I can run my tests towards the remote network.

I have read about using a --daemon argument to do this, but then the OpenVPN connection cannot be closed when I am finished....

Note that the machine is running an OpenVPN server so I cannot do "sudo killall openvpn" either since that would rip down any connected client of the local server.

Question:
How can I connect a remote OpenVPN server from a command window in the Ubuntu server and still be able to use the command window for further commands? Like in this case use subversion calls to the remote network.
How do I disconnect from the remote connection when I am done?

Post Reply