Created
April 15, 2020 23:53
-
-
Save aadityabhatia/a6671969229504a73a4f85d595ed3351 to your computer and use it in GitHub Desktop.
wireguard setup
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
wg genkey > wgkey | |
chmod 400 wgkey | |
wg pubkey < wgkey | |
sudo ip link add wg0 type wireguard | |
sudo ip addr add dev wg0 172.16.1.1/24 | |
sudo wg set wg0 private-key wgkey | |
sudo ip link set wg0 up | |
sudo wg set wg0 listen-port PORT | |
sudo wg set wg0 peer PUBKEY allowed-ips 172.16.1.1/24 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment