1.5 KiB
1.5 KiB
Ubuntu Server WireGuard Setup
- update and install
sudo apt update
sudo apt install -y wireguard
- validate that its installed
wg --version
- WireGuard configs live here:
/etc/wireguard/
Filename must NOT match the interface name
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:4f:6e:1b brd ff:ff:ff:ff:ff:ff
inet 192.168.50.47/24 metric 100 brd 192.168.50.255 scope global dynamic enp1s0
valid_lft 86009sec preferred_lft 86009sec
inet6 2404:4400:4181:9200:5054:ff:fe4f:6e1b/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 86331sec preferred_lft 86331sec
inet6 fe80::5054:ff:fe4f:6e1b/64 scope link
valid_lft forever preferred_lft forever
# touch /etc/wireguard/wg0.conf
#
I made a blank file and will copy and paste the data from the wireguard conf I have into the blank one I created.
Set permissions
sudo chmod 600 /etc/wireguard/wg0.conf
Bring up WireGuard
sudo wg-quick up wg0
Validate
sudo wg
Can enable at boot if that is your bag
sudo systemctl enable wg-quick@wg0