wg-quick systemd service doesn't work after boot

Adrián Mihálko adriankoooo at gmail.com
Sun Oct 6 18:54:47 CEST 2019


I have 3 wg interface on my server, but I am unable to enable wg0 with
wg-quick at boot:

@ubuntu:~$ sudo systemctl enable wg-quick at wg0
@ubuntu:~$

Oct 06 13:22:51 ubuntu systemd[1]: Starting WireGuard via wg-quick(8) for
wg0...
Oct 06 13:22:51 ubuntu wg-quick[1737]: Warning: `/etc/wireguard/wg0.conf'
is world accessible
Oct 06 13:22:52 ubuntu wg-quick[1737]: [#] ip link add wg0 type wireguard
Oct 06 13:22:52 ubuntu wg-quick[1737]: [#] wg setconf wg0 /dev/fd/63
Oct 06 13:22:52 ubuntu wg-quick[1737]: [#] ip -4 address add 192.168.5.2/24
dev wg0
Oct 06 13:22:52 ubuntu wg-quick[1737]: [#] ip link set mtu 1420 up dev wg0
Oct 06 13:22:53 ubuntu wg-quick[1737]: [#] ip -4 route add 192.168.2.0/24
dev wg0
Oct 06 13:22:53 ubuntu wg-quick[1737]: [#] iptables -A FORWARD -i wg0 -j
ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A
POSTROUTING -o e
*Oct 06 13:22:53 ubuntu wg-quick[1737]: Another app is currently holding
the xtables lock. Perhaps you want to use the -w option?*
Oct 06 13:22:53 ubuntu wg-quick[1737]: [#] ip link delete dev wg0
Oct 06 13:22:53 ubuntu systemd[1]: wg-quick at wg0.service: Main process
exited, code=exited, status=1/FAILURE
Oct 06 13:22:53 ubuntu systemd[1]: Failed to start WireGuard via
wg-quick(8) for wg0.
Oct 06 13:22:53 ubuntu systemd[1]: wg-quick at wg0.service: Unit entered
failed state.
Oct 06 13:22:53 ubuntu systemd[1]: wg-quick at wg0.service: Failed with result
'exit-code'.

As you can see it fails at iptables command.

wg0, wg2 fails with this problem, but wg1 starts without problem (same
config, with iptables command).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/wireguard/attachments/20191006/bcc03f38/attachment.html>


More information about the WireGuard mailing list