Last active
August 23, 2025 14:02
-
-
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 | |
| # Update credentials file with your credentials | |
| your_username | |
| your_password | |
| sudo chmod 600 /etc/openvpn/auth.txt | |
| sudo chown root:root /etc/openvpn/auth.txt | |
| # 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@<server-name> | |
| sudo systemctl start openvpn@<server-name> | |
| # Check the status of OpenVPN | |
| sudo systemctl status openvpn@<server-name> | |
| # 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