Setup VPN on linux (Virtual Machine)

Setup VPN on linux (Virtual Machine)

A virtual private network (VPN) extends a private network across a public network and enables users to send and receive data across shared or public networks as if their computing devices were directly connected to the private network.

Source Wikipedia

Before setup the VPN on our machine, we have to configure our DNS settings.

nano /etc/dhcp/dhclient.conf

# inside the file uncomment this line and add a public DNS server such as
# www.opendns.com and save the file
prepend domain-name-servers IP_ADDR_01, IP_ADDR_02;

# restart your network-manager
service network-manager restart

# check that the DNS servers have been added
cat /etc/resolv.conf

Now that we have our DNS server setup we have to disable WebRTC in our browser. For that, we open it and type about:config in the search bar. Once the menu opens, search for media.peerconnection.enabled and make sure its set to false.

We are ready to download a free VPN like vpnbook.com. Before we install it, make sure that the browser is completly closed and open the terminal. Navigate to the directory where the vpn downloaded.

cd Downloads/

unzip vpn_book_file.zip

# start vpn service
openvpn vpnbook-whatever.ovpn