I have set up a working Wireguard VPN server remotely. I have confirmed that this VPN server works, as my phone can connect flawlessly with it.
In Ubuntu 23.10, I have imported my *.conf
file as follows:
$ nmcli connection import type wireguard file remote-server.conf
I can see my VPN connection in the right upper hand networking menu, and it also appears when running:
$ nmcli connection show
NAME UUID TYPE DEVICE
netplan-enp5s0 (redacted) ethernet enp5s0
remote-server (redacted) wireguard wg0
lo (redacted) loopback lo
However, when turning on this connection by toggling it in the right upper hand menu, all my network traffic seems to disregard this VPN connection and go through my regular internet connection. I have confirmed this by looking up my external IP address.
How can I make Ubuntu route all traffic through my Wireguard VPN?
By the way, this is my remote-server.conf
file:
$ cat remote-server.conf
[Interface]
PrivateKey = (key)
Address = ipv4/24,ipv6/64
DNS = 1.1.1.1, 1.0.0.1
[Peer]
PublicKey = (key)
PresharedKey = (key)
Endpoint = url:port
AllowedIPs = 0.0.0.0/0, 192.168.1.0/24, ::0/0