Help with WireGuard setup..

Good day everyone,

So i have the mudi v2 router, and i was setting up the wireguard on both my linux server and the router and im having presestant issue with the router “related to the multi-wan and the router firewal based on what i understood from the logs”.

What i have done so far:

1- I created a script to update my ip through aws route53 (using my own domain).

2- Port forwarding in my router for port 51820

3- installed the wireguard in linux, generated public and private keys for both server and client.

4- have this config on the server side:
”[Interface]
Address = 10.0.0.1/24
ListenPort = 51820
PrivateKey = xxxxxxx

[Peer]
PublicKey = xxxxxx
AllowedIPs = 10.0.0.2/32

and this on the client side (mudi v2):

“[Interface]
Address = 10.0.0.2/24
PrivateKey = xxxxx
DNS = 1.1.1.1
MTU = 1280

[Peer]
AllowedIPs = 0.0.0.0/0
Endpoint = mydomain.com:51820
PersistentKeepalive = 25
PublicKey = xxxxx

“.

Now, whenever i connect to the vpn, it only connects for literally a second or two and then it disconnect.

this is the log: “
Fri Oct 10 17:55:04 2025 user.notice firewall: Reloading firewall due to ifdown of wgclient () Fri Oct 10 17:55:06 2025 user.notice wgclient-up: env value:T_J_V_ifname=string J_V_address_external=1 USER=root ifname=wgclient ACTION=KEYPAIR-CREATED N_J_V_address_external=address-external SHLVL=2 J_V_keep=1 HOME=/ HOTPLUG_TYPE=wireguard T_J_V_interface=string J_V_ifname=wgclient T_J_V_link_up=boolean LOGNAME=root DEVICENAME= T_J_V_action=int TERM=linux SUBSYSTEM=wireguard PATH=/usr/sbin:/usr/bin:/sbin:/bin CONFIG_LIST_STATE= J_V_interface=wgclient K_J_V= action ifname link_up address_external keep interface J_V_link_up=1 J_V_action=0 T_J_V_address_external=boolean N_J_V_link_up=link-up T_J_V_keep=boolean PWD=/ JSON_CUR=J_V CONFIG_SECTIONS=global AzireVPN Mullvad FromApp group_2854 group_5820 group_8787 group_456 peer_4068 CONFIG_cfg030f15_ports= Fri Oct 10 17:55:12 2025 user.notice mwan3[5144]: Execute ifup event on interface wgclient (wgclient) Fri Oct 10 17:55:12 2025 user.notice mwan3[5144]: Starting tracker on interface wgclient (wgclient) Fri Oct 10 17:55:18 2025 user.notice firewall: Reloading firewall due to ifup of wgclient (wgclient) Fri Oct 10 17:57:44 2025 daemon.notice netifd: wgclient (8478): cat: can't open '/tmp/run/wg_resolved_ip': No such file or directory Fri Oct 10 17:57:44 2025 daemon.notice netifd: Network device 'wgclient' link is down Fri Oct 10 17:57:44 2025 daemon.notice netifd: Interface 'wgclient' is now down Fri Oct 10 17:57:44 2025 daemon.notice netifd: Interface 'wgclient' is setting up now Fri Oct 10 17:57:48 2025 user.notice mwan3[8477]: Execute ifdown event on interface wgclient (unknown) Fri Oct 10 17:57:50 2025 daemon.notice netifd: wgclient (8795): cat: can't open '/tmp/run/wg_resolved_ip': No such file or directory Fri Oct 10 17:57:51 2025 daemon.notice netifd: Interface 'wgclient' is now down Fri Oct 10 17:58:03 2025 user.notice firewall: Reloading firewall due to ifdown of wgclient () Fri Oct 10 17:59:18 2025 daemon.notice netifd: Interface 'wgclient' is setting up now Fri Oct 10 17:59:19 2025 daemon.notice netifd: Network device 'wgclient' link is up Fri Oct 10 17:59:19 2025 daemon.notice netifd: Interface 'wgclient' is now up Fri Oct 10 17:59:24 2025 user.notice mwan3[11282]: Execute ifup event on interface wgclient (wgclient) Fri Oct 10 17:59:27 2025 user.notice mwan3[11282]: Starting tracker on interface wgclient (wgclient) Fri Oct 10 17:59:27 2025 user.notice wgclient-up: env value:T_J_V_ifname=string J_V_address_external=1 USER=root ifname=wgclient ACTION=KEYPAIR-CREATED N_J_V_address_external=address-external SHLVL=2 J_V_keep=1 HOME=/ HOTPLUG_TYPE=wireguard T_J_V_interface=string J_V_ifname=wgclient T_J_V_link_up=boolean LOGNAME=root DEVICENAME= T_J_V_action=int TERM=linux SUBSYSTEM=wireguard PATH=/usr/sbin:/usr/bin:/sbin:/bin CONFIG_LIST_STATE= J_V_interface=wgclient K_J_V= action ifname link_up address_external keep interface J_V_link_up=1 J_V_action=0 T_J_V_address_external=boolean N_J_V_link_up=link-up T_J_V_keep=boolean PWD=/ JSON_CUR=J_V CONFIG_SECTIONS=global AzireVPN Mullvad FromApp group_2854 group_5820 group_8787 group_456 peer_4068 CONFIG_cfg030f15_ports= Fri Oct 10 17:59:34 2025 user.notice firewall: Reloading firewall due to ifup of wgclient (wgclient)
”.

Your help is much appreciated. Thanks

Hi

The log doesn't seem to indicate anything unusual—it's just restarting the interface to retry the connection because the WireGuard client couldn't connect (while also reconfiguring firewall rules during the interface restart).

Have you verified that the Linux server is reachable via Mudi v2 network and that the corresponding UDP ports are open in the firewall on server?

This is incorrect, a peer should never allocate an full /24 range to itself, instead you want to use /24 in allowedips on the client.

Turn into:

[Interface]
Address = 10.0.0.2/32
PrivateKey = xxxxx
DNS = 1.1.1.1
MTU = 1280

thank you for your reply. i think there is an issue there also. i tried in my phone and it works some time then it disconnect also. although, it last longer than mudi. is there a guide i can follow in linux to properly install wireguard server? UDP ports are open in the router it self. if you can guide me how to do things proberly in linux i will appreciate that. Thanks.

i will try it later and let you know…thanks.

Maybe you can refer to the ArchWiki tutorial.