Before we begin

We assume you already have:

A running Debian system with sudo privileged account access. OpenVPN server must be running on the remote system. Obtain an OpenVPN client configuration from remote host administrator.

Step 1 – Installing OpenVPN Client

The OpenVPN packages are available under the default Debian repositories. Open a terminal on your Debian system, and update the Apt cache on your system. After that install OpenVPN package. Open a terminal and execute commands to install openvpn client on Debian:

Step 2 – Connect to OpenVPN Server

Copy the openvpn client configuration file on your Debian machine. You can use –config command line parameter to provide configuration file. The command will read all the required details for making a vpn from this file. Let’s execute the following command to connect to the openvpn server: You should see the following output:

Step 3 – Verify Connection

Once the connection established successfully, A new IP will be assigned on tun0 interface by the OpenVPN server. . You can check it with the following command: Output: You can also check the OpenVPN server log to verify the connection status: You should see the following output:

Conclusion

Your Debian system is connected to the remote server over virtual private network. You can access the systems of remote network over local network.