Installing a free VPN in Linux
I recently thought I would try installing VPN (Virtual Private Network) on my machine.
This is generally used by people who want to mask their true location as it allocates an IP address in another country.
I had no particular reason apart from the challenge and the curiosity.
Most of the searches gave results on how to connect to premium services and I wasn’t going to pay for something just for an experiment. Eventually I found a simple solution that uses OpenVPN (a free service). I’m putting here just for my own future reference because I had a hard job finding it!
sudo apt install golang-go openvpn git
git clone https://github.com/adtac/autovpn
cd autovpn
go build autovpn.go
sudo install autovpn /usr/local/bin/
That should do the job!
To enable VPN open a terminal and launch –
./autovpn/autovpn CA
Note that the CA is a country code (in this case Canada). You can try other country codes or even leave out that code altogether but I found that CA was the most reliable.
It will prompt for your password and search for a server. Once it announces “Initialization Sequence Completed” then you are connected.
Not also that the terminal must not be closed during the session. Just minimise it.
If the connection doesn’t work, go back to the terminal and CTRL+C. That will offer the choice of stopping the service or trying another server.
Just as a side note, according to whatsmyip.com I’m currently located in Montreal……. 😉
I use a premium (but very cheap £5 a month) vpn service because I’m a tight old git who avoids spending money like the devil holy water. Anyways my premium vpn service has their own software for windows which runs like a bag of nails. But for linux users they offer openvpn and that runs on mint 19 like a dream.