Skip to content

Instantly share code, notes, and snippets.

@kolosek
Last active February 20, 2020 13:50
Show Gist options
  • Select an option

  • Save kolosek/f8c2a7625047e075b1e1d1b1d9ee0ca5 to your computer and use it in GitHub Desktop.

Select an option

Save kolosek/f8c2a7625047e075b1e1d1b1d9ee0ca5 to your computer and use it in GitHub Desktop.
Server pre-requirements:
sudo apt install openresolv
sudo apt install ufw
sudo ufw allow ssh
sudo ufw default allow outgoing
sudo ufw enable
Intstructions with sudo:
https://github.com/wg-dashboard/wg-dashboard
Probably needs manual start:
sudo wg-quick up wg0
Show status:
sudo wg show
Might need manual start/stop:
sudo wg-quick down wg0
sudo wg-quick up wg0
Client pre-requirements:
sudo apt install openresolv
sudo add-apt-repository ppa:wireguard/wireguard
sudo apt-get update
sudo apt-get install wireguard-dkms wireguard-tools linux-headers-$(uname -r)
Edit client configuration:(download from wg interface)
[Interface]
Address = 10.13.37.3/24
PrivateKey = SGJ0RWSgQMjRzpmU0t+dkdx0aAXunMGkbwmZDx9p9XE=
DNS = 10.13.37.1
[Peer]
PublicKey = XjiNSyq9u4VIseK5uQeKYfruqAwa3OumJfmf5myX22E=
Endpoint = 95.216.33.34(THIS SHOULD BE THE IP OF THE SERVER!):58210
AllowedIPs = 0.0.0.0/0
# This is for if you're behind a NAT and
# want the connection to be kept alive.
PersistentKeepalive = 25
Add to configurations:
sudo gedit /etc/wireguard/wgXX-client.conf (wg0 for example, then )
sudo wg-quick up wg1-client
#Accessing specific tunnel from localhost
#Kill existing connections
lsof -ti:3000 | xargs kill -9
ssh -L 3000:localhost:3000 <user>@IP.OF.SERVER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment