Skip to content

Instantly share code, notes, and snippets.

@eekfonky
Created November 6, 2017 15:25
Show Gist options
  • Select an option

  • Save eekfonky/7ccfa35c764b3fd3b98e57963c3e6077 to your computer and use it in GitHub Desktop.

Select an option

Save eekfonky/7ccfa35c764b3fd3b98e57963c3e6077 to your computer and use it in GitHub Desktop.
OpenVPN at boot cli
1. Create auth.txt file inside /etc/openvpn directory via this command:
sudo gedit /etc/openvpn/auth.txt
Fill it with your VPN credentials:
username
password
Save it.
2. Then open the file which you are using to establish a connection:
sudo vim <openvpnFile>.ovpn
And change this line:
auth-user-pass
into
auth-user-pass <auth>.txt
Save the file and change its name:
sudo mv <openvpnFile>.ovpn /etc/openvpn/de75.conf
3. Then you will have to edit the startup on boot file via this command:
sudo vim /etc/default/openvpn
When the text editor opens, add
AUTOSTART="<openvpnFile>"
Save the file and reboot your Linux device.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment