Please make a backup of your PI first! (I may have had to start from scratch a few times while getting this ready, should be fine now but you can never have too many backups)
This is the script I use when configuring my PI (tested over multiple machines using DietPi 160+).
The goal of this script is to transform your DietPi into a VPN Gateway using PIA (https://www.privateinternetaccess.com/) without the pain of reading many (so very many) websites and doing it all manually.
Will probably *not* work if you are already running (or plan to run) a VPN server as it's configured to use tun0 as its VPN interface.
You will need an account with PIA.
You will need to know
- Your Pi login details.
- Your PIA login details.
- Your network gateway address.
- Your local network address.
- Choose between 2K (standard) or 4K (strong) encryption
- Can easily switch between different VPN endpoints
- VPN is monitored and will be automatically restarted if it goes down
- killswitch
- Configure split-VPN (exclude machine:port from VPN)
The following code will start the install process ...
Code: Select all
wget -O PIAVPN.zip http://dietpi.com/phpbb/download/file.php?id=1034 && unzip PIAVPN.zip -d PIAVPN && cd PIAVPN && sudo chmod 744 InstallVPN.sh && sed -i $'s/\r$//' InstallVPN.sh && sudo ./InstallVPN.sh