Last active
July 10, 2025 12:13
-
-
Save raditotev/a9ebc712d594e3a9a785f8b558f07629 to your computer and use it in GitHub Desktop.
Set up openvp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install unzip | |
sudo apt-get install unzip | |
# Install openvpn | |
sudo apt-get install openvpn | |
# Download and unzip config files from NordVPN | |
cd /etc/openvpn | |
sudo wget https://downloads.nordcdn.com/configs/archives/servers/ovpn.zip | |
sudo unzip ovpn.zip | |
sudo rm ovpn.zip | |
# Enable IP Forwarding: Edit /etc/sysctl.conf to enable IP forwarding. | |
sudo nano /etc/sysctl.conf | |
# Uncomment or add the following line: | |
# net.ipv4.ip_forward=1 | |
# Apply the changes | |
sudo sysctl -p | |
# Create a credentials file | |
sudo nano /etc/openvpn/auth.txt | |
sudo chmod 600 /etc/openvpn/auth.txt | |
sudo chown root:root /etc/openvpn/auth.txt | |
# Update credentials file with your credentials | |
your_username | |
your_password | |
# Set up OpenVPN | |
sudo cp ovpn_udp/<server-name>.nordvpn.com.udp.ovpn . | |
sudo mv <server-name>.nordvpn.com.udp.conf <server-name>.conf | |
# Update <server-name>.conf file | |
``` | |
# Automatically retry if the connection drops | |
ping-restart 10 | |
auth-user-pass /etc/openvpn/auth.txt | |
``` | |
# Start OpenVPN | |
sudo systemctl enable openvpn@nord | |
# Enter username and password provided by NordVPN: | |
# https://support.nordvpn.com/hc/en-us/articles/20164827795345-Connect-to-NordVPN-using-Linux-Terminal | |
sudo systemctl start openvpn@nord | |
# Check the status of OpenVPN | |
sudo systemctl status openvpn@nord | |
# Verify IP address | |
curl ipinfo.io/ip | |
# or | |
curl ifconfig.me |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment