Setup OpenVPN to PIA: verschil tussen versies

Uit Brakwiki
Ga naar: navigatie, zoeken
(Nieuwe pagina aangemaakt met '<pre> sudo su - apt-get install openvpn unzip -y cd /etc/openvpn wget https://www.privateinternetaccess.com/openvpn/openvpn.zip unzip openvpn.zip #Start a connecti...')
 
Regel 5: Regel 5:
 
wget https://www.privateinternetaccess.com/openvpn/openvpn.zip
 
wget https://www.privateinternetaccess.com/openvpn/openvpn.zip
 
unzip openvpn.zip
 
unzip openvpn.zip
 
#Start a connection to the PIA VPN with openvpn and the chosen config file with the following command (sudo openvpn "config-filename-goes-here.ovpn")
 
 
cp Netherlands.ovpn pia.ovpn
 
sed -i 's/auth-user-pass/auth-user-pass .secrets/g' /etc/openvpn/pia.ovpn
 
  
 
echo "p7873652" > /etc/openvpn/.secrets
 
echo "p7873652" > /etc/openvpn/.secrets
Regel 15: Regel 10:
 
chmod 600 .secrets
 
chmod 600 .secrets
  
 +
sed -i 's/auth-user-pass/auth-user-pass .secrets/g' *.ovpn
 +
rename "s/ovpn/conf/" *.ovpn
 +
 +
nano /etc/default/openvpn
 +
  remove comment (#) from line AUTOSTART=”all”
 +
 +
Test:
 +
systemctl start openvpn@Netherlands
 +
ip a
 +
  tun0 network should be visible
 +
systemctl stop openvpn@Netherlands
 +
 +
systemctl enable openvpn@Netherlands
 +
 +
 +
------
 +
Alternative:
 +
#Start a connection to the PIA VPN with openvpn and the chosen config file with the following command (sudo openvpn "config-filename-goes-here.ovpn")
 +
 +
cp Netherlands.ovpn pia.ovpn
  
 
sed -i 's/#AUTOSTART="none"/AUTOSTART="pia"/g' openvpn
 
sed -i 's/#AUTOSTART="none"/AUTOSTART="pia"/g' openvpn

Versie van 22 aug 2018 om 02:07

sudo su -
apt-get install openvpn unzip -y
cd /etc/openvpn
wget https://www.privateinternetaccess.com/openvpn/openvpn.zip
unzip openvpn.zip

echo "p7873652" > /etc/openvpn/.secrets
echo "q7W3cZ4JxH" >> /etc/openvpn/.secrets
chmod 600 .secrets

sed -i 's/auth-user-pass/auth-user-pass .secrets/g' *.ovpn
rename "s/ovpn/conf/" *.ovpn

nano /etc/default/openvpn
   remove comment (#) from line AUTOSTART=”all”

Test:
systemctl start openvpn@Netherlands
ip a
  tun0 network should be visible
systemctl stop openvpn@Netherlands

systemctl enable openvpn@Netherlands


------
Alternative:
#Start a connection to the PIA VPN with openvpn and the chosen config file with the following command (sudo openvpn "config-filename-goes-here.ovpn")

cp Netherlands.ovpn pia.ovpn

sed -i 's/#AUTOSTART="none"/AUTOSTART="pia"/g' openvpn

service openvpn start