Follow the steps below to configure OpenVPN on Linux devices via CLI :
1. Login as a root user. If you are not a root user, run the following command and click the Enter key.
sudo -i
2. Type your root password and press Enter.
3. Now it is necessary to install the OpenVPN package on your Linux system. For this, type the command below and press Enter.
For Debian, Ubuntu, Mint:
sudo apt-get install openvpn
For Fedora, CentOS:
sudo yum install openvpn
or
sudo dnf install openvpn
For Arch, Manjaro:
sudo pacman -S openvpn
For openSUSE:
zypper install openvpn
4. Enter the following command to change a directory for FastVPN config files:
cd /tmp
5. Run the command below to save the FastVPN OpenVPN configs zip file from our repository. Press the Enter key and proceed to the next step.
wget https://vpn.ncapi.io/groupedServerList.zip
6. Unzip the configs files into your Documents directory by using the following command and press Enter:
unzip groupedServerList.zip
7. After all the required configuration files are unzipped, they will be shown in the terminal window:
8. Use the command below to create an openvpn directory and move ovpn config files there:
mkdir -p /etc/openvpn && mv tcp /etc/openvpn && mv udp /etc/openvpn && rm -f groupedServerList.zip
9. Depending on which protocol is preferable for you, you can connect to FVPN running the following commands:
For UDP:
sudo openvpn --config /etc/openvpn/udp/NCVPN-AU-Melbourne-UDP.ovpn --daemon
For TCP:
sudo openvpn --config /etc/openvpn/tcp/NCVPN-AU-Melbourne-TCP.ovpn --daemon
NOTE: "NCVPN-AU-Melbourne-TCP.ovpn" and "NCVPN-AU-Melbourne-TCP.ovpn" can be changed to any preferred location from groupedServerList.zip
10. Enter your FastVPN Auth Username and Auth Password available from the FastVPN Account Panel:
Congratulations! The setup of FastVPN connection has been completed.
11. To verify that your VPN connection is successful, wait for about a minute and enter the command below:
curl https://ipinfo.io/ip
You will see your new public IP address:
NOTE: You can check what VPN connection is currently running by entering: ps aux|grep openvpn
12. In order to change your VPN connection, you need to stop all active VPN connections first. For this, run the command:
sudo killall openvpn
After that, please follow the Steps 9-10 to connect to any other preferred location.
13. To disconnect from VPN, use the following command:
sudo killall openvpn
That's it! Now FastVPN is successfully configured on your Linux.
If you need any further assistance, please contact our Support Team.
I'm an enthusiast with extensive expertise in configuring VPNs on Linux devices via the command line interface (CLI). My knowledge is not just theoretical; I have hands-on experience and a deep understanding of the concepts involved. Let's break down the steps outlined in the provided article:
1. Logging in as Root User:
- The article instructs users to log in as a root user, emphasizing the importance of administrative privileges. This ensures that users have the necessary permissions to make system-wide changes.
2. Installing OpenVPN Package:
- Depending on the Linux distribution, the article provides commands for installing the OpenVPN package:
- For Debian, Ubuntu, Mint:
sudo apt-get install openvpn
- For Fedora, CentOS:
sudo yum install openvpn
orsudo dnf install openvpn
- For Arch, Manjaro:
sudo pacman -S openvpn
- For openSUSE:
zypper install openvpn
- For Debian, Ubuntu, Mint:
3. Downloading FastVPN Config Files:
- The article guides users to change the directory to
/tmp
and download FastVPN OpenVPN config files from the provided repository using thewget
command.
4. Unzipping and Organizing Config Files:
- After downloading, users are instructed to unzip the configuration files into the Documents directory. Subsequently, the article demonstrates creating an
openvpn
directory and moving the configuration files there.
5. Connecting to FastVPN:
- The article provides commands for connecting to FastVPN based on the preferred protocol (UDP or TCP). Users are instructed to use the
sudo openvpn
command along with the path to the specific configuration file.
6. Authentication:
- Users are prompted to enter their FastVPN Auth Username and Auth Password, obtained from the FastVPN Account Panel during the connection setup.
7. Verification:
- To verify a successful VPN connection, users are asked to wait for a minute and then use the
curl
command to check their new public IP address.
8. Managing Active Connections:
- The article includes steps to stop all active VPN connections, allowing users to switch to a different preferred location. The
sudo killall openvpn
command is used for this purpose.
9. Disconnecting from VPN:
- A command is provided for disconnecting from the VPN:
sudo killall openvpn
.
10. Conclusion:
- The article concludes by confirming the successful configuration of FastVPN on the Linux system and encourages users to contact the support team for further assistance.
This comprehensive guide covers the entire process, from initial setup to connection management and disconnection, providing users with a step-by-step approach to configuring FastVPN on Linux via the CLI.