Created
September 23, 2022 10:06
-
-
Save paulwinex/c2c4090f19dbe8bd1253c5744f3f06e1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install WireGuard client on RaspberryPi | |
# 1 # download config file from web ui, for example ~/Downloads/client.conf | |
# 2 # Install pivpn and Wireguard client for RaspberryPi | |
sudo -i | |
apt update | |
apt dist-upgrade -y | |
curl -L https://install.pivpn.io | bash | |
# non interactive installation manual: https://docs.pivpn.io/install/ | |
apt install wireguard | |
# 3 # create client | |
CLIENT=wg | |
pivpn add -n ${CLIENT} | |
# 4 # Create config file | |
mv ~/Downloads/client.conf /etc/wireguard/${CLIENT}.conf | |
# 5 # test connection | |
# enable vpn | |
wg-quick up ${CLIENT} | |
# check external ip | |
dig @resolver4.opendns.com myip.opendns.com +short | |
# disable vpn | |
wg-quick down ${CLIENT} | |
# 6 # create autoconnect on boot | |
systemctl enable wg-quick@${CLIENT} | |
systemctl start wg-quick@${CLIENT} | |
# check status | |
systemctl status wg-quick@${CLIENT} | |
# 7 # Enjoy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment