"Job for wg-quick@wg0.service failed because the control process exited with error code"
0
votes
1
answer
7343
views
I am trying to install wireguard on Ubuntu 18.04 64 bit, following one of the video tutorials.
Step
systemctl start wg-quick@wg0.service
finishes with
Job for wg-quick@wg0.service failed because the control process exited with error code.
See "systemctl status wg-quick@wg0.service" and "journalctl -xe" for details.
Running systemctl status wg-quick@wg0.service
gives:
● wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0
Loaded: loaded (/lib/systemd/system/wg-quick@.service; indirect; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2023-03-11 00:02:48 UTC; 7min 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: 18984 ExecStart=/usr/bin/wg-quick up wg0 (code=exited, status=1/FAILURE)
Main PID: 18984 (code=exited, status=1/FAILURE)
Mar 11 00:02:48 my-vps.name systemd: Starting WireGuard via wg-quick(8) for wg0...
Mar 11 00:02:48 my-vps.name wg-quick: [#] ip link add wg0 type wireguard
Mar 11 00:02:48 my-vps.name wg-quick: RTNETLINK answers: Operation not supported
Mar 11 00:02:48 my-vps.name wg-quick: Unable to access interface: Protocol not supported
Mar 11 00:02:48 my-vps.name wg-quick: [#] ip link delete dev wg0
Mar 11 00:02:48 my-vps.name wg-quick: Cannot find device "wg0"
Mar 11 00:02:48 my-vps.name systemd: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE
Mar 11 00:02:48 my-vps.name systemd: wg-quick@wg0.service: Failed with result 'exit-code'.
Mar 11 00:02:48 my-vps.name systemd: Failed to start WireGuard via wg-quick(8) for wg0.
Running journalctl -xe
shows:
Mar 10 23:46:27 my-vps.name wg-quick: [#] ip link add wg0 type wireguard
Mar 10 23:46:27 my-vps.name wg-quick: RTNETLINK answers: Operation not supported
Mar 10 23:46:27 my-vps.name wg-quick: Unable to access interface: Protocol not supported
Mar 10 23:46:27 my-vps.name wg-quick: [#] ip link delete dev wg0
Mar 10 23:46:27 my-vps.name wg-quick: Cannot find device "wg0"
My wg0.conf
looks like:
[Interface]
PrivateKey = myprivatekeyhere
Address = 10.0.0.1/24
ListenPort = 51830
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o venet0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o venet0 -j MASQUERADE
modprobe wireguard
says:
modprobe: FATAL: Module wireguard not found in directory /lib/modules/4.15.0
ls /lib/modules
returns:
4.15.0 4.15.0-206-generic
uname -r
shows:
4.15.0
Rebooting did not help. Searching did not help.
Asked by Ildar Meyker
(1 rep)
Mar 11, 2023, 02:40 AM
Last activity: Jul 21, 2025, 11:03 AM
Last activity: Jul 21, 2025, 11:03 AM