(Created page with "= PIA and OpenVPN = Install OpenVPN <pre>sudo apt-get install openvpn unzip -y cd /etc/openvpn </pre> Download Private Internet Access <pre>sudo wget --no-check-certificate https://www.privateinternetaccess.com/openvpn/openvpn.zip sudo unzip openvpn.zip ls -lh </pre> Pick a Country to use as Primary VPN <pre>cp spain.ovpn spain_bp.ovpn vi spain_bp.ovpn</pre> At the end of the file, add Routes to the Local Networks (if needed) <pre> route 192.168.1.0 255.255.255.0...")
 
No edit summary
Line 43: Line 43:
sudo chattr +i /etc/resolve.conf
sudo chattr +i /etc/resolve.conf
</pre>
</pre>
At this point, you should be able to test with:
<pre>sudo openvpn --config /etc/openvpn/spain_bp.ovpn --auth-user-pass /etc/openvpn/login.txt</pre>
And then to test that your network providers IP is hidden:
<pre>wget http://ipinfo.io/ip -qO -</pre>

Revision as of 20:27, 22 December 2024

PIA and OpenVPN

Install OpenVPN

sudo apt-get install openvpn unzip -y
cd /etc/openvpn

Download Private Internet Access

sudo wget --no-check-certificate https://www.privateinternetaccess.com/openvpn/openvpn.zip
sudo unzip openvpn.zip
ls -lh

Pick a Country to use as Primary VPN

cp spain.ovpn spain_bp.ovpn
vi spain_bp.ovpn

At the end of the file, add Routes to the Local Networks (if needed)

route 192.168.1.0 255.255.255.0 net_gateway
route 192.168.2.0 255.255.255.0 net_gateway

Add Credentials to Login.txt file

sudo vi /etc/openvpn/login.txt

In this format:

username
password

Limit access to login file

sudo chmod 700 /etc/openvpn/login.txt

Add nameservers to DNS (if needed)

echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolv.conf
echo "nameserver 8.8.4.4" | sudo tee -a /etc/resolv.conf

sudo chattr +i /etc/resolve.conf

At this point, you should be able to test with:

sudo openvpn --config /etc/openvpn/spain_bp.ovpn --auth-user-pass /etc/openvpn/login.txt

And then to test that your network providers IP is hidden:

wget http://ipinfo.io/ip -qO -