OpenVPN is one of the newer and more secure types of VPN’s available. Basic setup is not too hard.
# Change the location of the .ovpn configuration file as required. sudo openvpn --config /home/pi/Desktop/Config.ovpn # Change Username and Password as required. printf '%s\n' 'Username' 'Password' >> /etc/openvpn/userpass # Change the location of the .ovpn configuration file as required nohup openvpn --config /home/pi/Desktop/Config.ovpn iface eth0 inet manual sudo apt-get install network-manager sudo apt-get install network-manager-openvpn sudo apt-get install network-manager-gnome
Next, I will go over setting up firewall rules so traffic will only go though the VPN and to block it from routing traffic over your normal IP. This is especially useful if your VPN drops connection as it will expose your IP address.
You can set it up either via terminal or using the graphical interface. The graphical interface is simple and easy.
# Install Uncomplicated firewall sudo apt-get install ufw sudo apt-get install gufw # Prints the status of ufw sudo ufw status # Enables the Firewall sudo ufw enable # Resets ufw to default sudo ufw reset # Enable logging to system log sudo ufw loggin on