OpenVPN and Linux

How to set up the OpenVPN on Linux.

I am getting my first experience with the OpenVPN client on Linux at $new_job. As with most things Mac, I got pretty spoiled by the Viscosity VPN client on macOS, so having to manually configure things on Linux seemed a bit daunting at first (I had used the network configuration GUI in GNOME at first to try and set up my VPN connections, but it failed for both home and work connections), but with a little RTFM I got things running pretty smoothly.

I opted to create a new tunneling network interface to make my VPN work. In /etc/network/interfaces:

  auto tun_vpnname
  iface tun_vpnname inet manual
  openvpn vpnname

vpnname matches up to the file /etc/openvpn/vpnname.conf. In other words, when I bring up the tunneled connection, the OpenVPN client starts using the specified configuration:

  sudo ifup tun_vpnname

If I want to disconnect from the VPN:

  sudo ifdown tun_vpnname


comments powered by Disqus