autovpn2 is a VPN Gate Client (based on OpenVPN) for Linux, connects you to a random free VPN in the country of your choice, indicated by a two-letter country code.
The program can help you hide your real IP address from the sites you visit, as well as open sites that are blocked in your country.
Key features of the program:
- redirects all traffic on the system through the VPN (not just web browser traffic like some plugins do)
- uses free VPN
- the resulting VPN settings are not tied to your person - you do not need to register, enter mail or perform any similar actions
- everything is done automatically: search for free VPN servers, get settings, launch the OpenVPN client with the received settings
The autovpn2 program is very easy to use, it allows you to quickly, manually configure an OpenVPN client to connect to a VPN and hide your IP address from visited sites, as well as bypass blocking.
Since OpenVPN redirects all traffic through the VPN server, any tools you use will go online through the VPN server.
The program requires Python 2. However, a compiled version is available from the author, which includes the necessary files to run and does not depend on whether your system has Python 2 installed or not.
Author: Rupert Edwards
The program must be run with elevated rights, either as root or with sudo.
The program can be run without options:
In this case, a search will be performed for free VPN servers from the US (USA).
You can specify a two-letter country code (ISO 3166-2), in this case a VPN from the specified country will be selected.
An example of finding a VPN server from Japan and automatically connecting to it:
sudo autovpn2 JP
If, immediately after starting, the program quickly exits without connecting to a VPN, this may mean:
- you entered the wrong country code
- no VPN from the selected country
You can find a list of free VPN servers on this page: https://www.vpngate.net/en/
If the output of the program ends with a line containing “Initialization Sequence Completed”, then this means that the connection was successfully established and now you are accessing the network via VPN
To stop the VPN press CTRL+c, a message will be displayed:
[autovpn2] try another VPN? (y/n)
You can try another VPN if you wish.
If you want to try another VPN, then press “y”, if you want to exit, then press “n”.
Frequently asked questions and answers:
The default servers in the USA (US) seem slow to me, which country is the fastest?
In testing, the servers in Japan (JP) or the Republic of Korea (KR) seem to be “faster”.
Can I change the default country code?
Yes, you can change the default ISO 3166-2 standard code by editing the script source code.
Change line 21 and line 45 to the country code (upper case) of your choice.
How do I fix a DNS leak?
Choose one of these free and publicly available DNS servers, such as Google DNS Servers: 220.127.116.11 and 18.104.22.168.
What about the name and the number “2”?
The author wrote this program to replace the original autovpn written in Go, which is now in Digital Heaven on Github (the author has removed the source code).
The number “2” should not conflict with the original script if it is installed on the specified system.
Note: autovpn2 uses US servers by default. Servers from Japan (JP) are preferred.
autovpn2 Usage Example
The next command make autovpn2 searching for VPN servers from the Republic of Korea and connecting through one of them:
sudo autovpn2 KR
How to install autovpn2
Installation on Kali Linux
sudo apt install openvpn wget https://raw.githubusercontent.com/ruped24/autovpn2/master/autovpn2.py sudo mv autovpn2.py /usr/local/bin/autovpn2 sudo chmod +x /usr/local/bin/autovpn2
Installation on BlackArch
sudo pacman -S openvpn wget https://raw.githubusercontent.com/ruped24/autovpn2/master/autovpn2.py sudo mv autovpn2.py /usr/local/bin/autovpn2 sudo chmod +x /usr/local/bin/autovpn2
Installation on any Linux (even if Python 2 is missing)
Some systems no longer have Python 2 required for autovpn2 to work. For such cases, the author has made a compiled version that does not depend on Python 2.
To download an archive from files, run the command:
wget https://github.com`curl -s https://github.com/ruped24/autovpn2/releases | grep -E -o '/ruped24/autovpn2/releases/download/[0-9a-z.]+/autovpn2.zip'
Unpacking the archive:
To start, you need to go to the folder with the unpacked executable files and run it as follows:
Alternatively, you can move the executable file to $PATH so that it becomes available no matter what directory you are in:
sudo mv autovpn2 /usr/local/bin/autovpn2
After that, the launch is the same, but you do not need to first go to any directory:
Installation information for other operating systems will be added later.
- What to select: Tor, VPN, or proxy?
- Services for finding IP address leaks
- Free easy way to hide IP in Linux