Install and configure OpenVPN on OSMC

This is a tutorial on how to install and start an OpenVPN connection when your Linux system boots.
Install OpenVPN 
  • sudo apt-get install openvpn
  • copy your config files provides from your VPN to /etc/openvpn
  • save your credentials in a file and modify your .ovpn config file like described below
  • start and test it using sudo openvpn --config myvpn.ovpn
  • use traceroute to see if vpn is working. Launch traceroute before connecting vpn and after. You should see differences in routes.  


Auto-connect OpenVPN via terminal
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 gedit /etc/openvpn/myvpn.ovpn
And change this line:
  • auth-user-pass
into
  • auth-user-pass auth.txt
Save the file and change its name:
  • sudo mv /etc/openvpn/myvpn.ovpn /etc/openvpn/myvpn.conf
3. Then you will have to edit the startup on boot file via this command:
  • sudo gedit /etc/default/openvpn
When the text editor opens, add this line above #AUTOSTART="all":
  • AUTOSTART="myvpn"
Save the file and reboot your Linux device.
4. After the reboot - open the terminal and type in:
  • sudo traceroute x.x.x.x
The first hop address should be your vpn ip network.

Commentaires

Posts les plus consultés de ce blog

Attiny13A sleep mode

Esp-01 deep sleep mode