Connecting one Ubuntu Server with another using Wireguard causes all other connections to be dropped reddit / selfhosted ---------------------------------------------------------------------- nathan12581 · 2023-12-22 11:28 I'm trying to connect a VPS to one of my dedicated Ubuntu VM within Proxmox for a Wireshark server. I know the sever works due to being able to connect to my network using my phone. I want to connect my VPS to my home network now so the VPS can access some Docker containers and act as a reverse proxy so I do not have to open any ports on my home network. I want to do this connection through Wireshark. ​ I have created a Wireshark config file using pivpn add command, copied that config file into /etc/wireshark/wg0.conf on my VPS, allowed the necessary ports in my iptables, then started up wireshark using `sudo systemctl status wg-quick@wg0`. When it starts my SSH remote connection breaks and the VPS does not respond to any network requests which to me sounds like Wireguard is changing the default gateway of my VPS? Looking at the logs on the Wireguard server (in my personal network) it seems to be as if the VPS connects once and then crashes. ​ This is the `systemctl status`: `wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0` `Loaded: loaded (/lib/systemd/system/wg-quick@.service; enabled; vendor preset: enabled) Active: active (exited) since Fri 2023-12-22 10:57:10 UTC; 1min 32s ago` `Docs: man:wg-quick(8)` `man:wg(8)` `https://www.wireguard.com/` `https://www.wireguard.com/quickstart/` `https://git.zx2c4.com/wireguard-tools/about/src/man/wg-quick.8 https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8` `Process: 3148 ExecStart=/usr/bin/wg-quick up wg0 (code=exited, status=0/SUCCESS)` `Main PID: 3148 (code=exited, status=0/SUCCESS)` `CPU: 72ms Dec 22 10:57:10 argon systemd[1]: Starting WireGuard via wg-quick(8) for wg0...` `Dec 22 10:57:10 argon wg-quick[3148]: [#] ip link add wg0 type wireguard` `Dec 22 10:57:10 argon wg-quick[3148]: [#] wg setconf wg0 /dev/fd/63` `Dec 22 10:57:10 argon wg-quick[3148]: [#] ip -4 address add 10.81.13.4/24 dev wg0` `Dec 22 10:57:10 argon wg-quick[3148]: [#] ip link set mtu 1420 up dev wg0` `Dec 22 10:57:10 argon wg-quick[3178]: [#] resolvconf -a tun.wg0 -m 0 -x` `Dec 22 10:57:10 argon systemd[1]: Finished WireGuard via wg-quick(8) for wg0.` My VPS wireguard config: `[Interface]` `PrivateKey = <>` `Address = 10.81.13.4/24` `DNS = 1.1.1.1, 1.0.0.1` `[Peer]` `PublicKey = <>` `PresharedKey = <>` `Endpoint = <>:<>` `AllowedIPs = 0.0.0.0/0` Any ideas? ---------------------------------------------------------------------- arcadianarcadian · 2023-12-22 13:34 Replace this; AllowedIPs = [0.0.0.0/0](https://0.0.0.0/0) With; AllowedIPs = [10.81.13.0/24](https://10.81.13.0/24) ---------------------------------------------------------------------- phillipleezissou · 2023-12-22 15:03 Yep. OP is trying to route all network traffic through it. ---------------------------------------------------------------------- nathan12581 · 2023-12-22 15:16 I guess I’m right in saying 0.0.0.0 means EVERYTHING gets routed through the network making the other connections drop? ---------------------------------------------------------------------- jamesckelsall · 2023-12-22 17:38 Yes. ---------------------------------------------------------------------- nathan12581 · 2023-12-23 00:45 Sorry for the late reply, however setting the AllowedIPs does allow me to start the wg-quick service without losing connections, however it still does not connect to the VPN server. Any more ideas of why this would be the case?