How to Setup OpenVPN on Debian

Home » Guides » How to Setup OpenVPN on Debian
Guides, How to No Comments
No votes yet.
Please wait...

debian

Released in 1993 by the Debian Project, Debian GNU/Linux is a free open-source operating system that is built on the Linux kernel and based on GUI “graphical user interface”. As a form of Unix OS, Debian OS is a combination between GNU project tools/features and is packed to the grills with thousands of free software apps (e.g: Corel’s WordPerfect) to facilitate installation and speed up execution processes. Debian can be used in many forms. It can be used as server, a desktop or an embedded OS. It is also compatible with several processor frameworks, such as: Intel, ARM and AMD.

In this tutorial, we will help you setup OpenVPN on any Debian software in simple and easy steps. Scroll down for more details.

Setting UP OpenVPN on Debian

Follow the steps below to successfully configure OpenVPN on Debian:

1. First of all, run the following command as superuser:

su

2. Next, you will need to download the following:

apt-get update && apt-get upgrade && apt-get install openvpn unzip

3.After installing OpenVPN, download the configuration files you prefer. We will use bVPN as an example of a VPN service provider. You can download the configration files here: https://www.bvpn.com/en/accounts/profile/openvpn_server_list/ and then click on “Generate” after you choose your preferred VPN server.

4. Insert your VPN credentials (username & password) as follows:

echo  “username”  >> /etc/openvpn/credentials

echo “CHANGE TO YOUR PASSWORD” >> /etc/openvpn/credentials

5. Now, launch OpenVPN and make sure that your connection works well

openvpn –config /etc/openvpn/bvpn.conf –daemon

6. In order to confirm that your connection was successful, wait for a few seconds (30 seconds), and then run the following command:

curl https://www.bvpn.com/v1/api/client/ptr

You should see the following response:

{“status”:true,”ip”:”the external ip”,”ptr”:”PTR for the IP address”}

Congratulations! You are now connected to VPN and will automatically connect on reboot.

*Additional important commands for your information:

service openvpn start   # Starts OpenVPN and connect automatically to VPN

service openvpn stop    # Stops OpenVPN

service openvpn restart # Restarts OpenVPN and connects automatically to VPN

service openvpn status  # Shows status for OpenVPN.

LEAVE A COMMENT