Hello! Im trying to connect to my wireguard server with ConnMan. I can connect with "connmanctl connect" and if I manually start the service with "systemctl start wireguard.service".
But the service do not auto start and I get some errors every boot. Anybody know what my problem is?
I use IP and not a domain name.
Code: wireguard.config
[provider_wireguard]
Type = WireGuard
Name = JoulesterWG
Host = *.*.*.*
WireGuard.Address = 10.0.0.5/32
WireGuard.PrivateKey = [Privatekey]
WireGuard.PublicKey = [Publickey]
WireGuard.DNS = 192.168.4.1
WireGuard.AllowedIPs = 192.168.4.0/24, 192.168.3.0/24
WireGuard.EndpointPort = 51820
WireGuard.PersistentKeepalive = 25
Display More
Code: wireguard.service
[Unit]
Description=WireGuard VPN Service
After=network-online.target nss-lookup.target connman.service connman-vpn.service bluetooth.service
Wants=network-online.target nss-lookup.target connman.service connman-vpn.service bluetooth.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/sleep 5
ExecStart=/usr/bin/connmanctl connect vpn_*_*_*_*
ExecStart=/usr/bin/connmanctl move-after vpn_*_*_*_* ethernet_e45f0152e8bd_cable
ExecStart=/usr/bin/connmanctl move-after vpn_*_*_*_* ethernet_e45f0152e8bd_cable
ExecStart=/usr/sbin/route add -net 192.168.4.0 netmask 255.255.255.0 gw 10.0.0.5
ExecStart=/usr/sbin/route add -net 192.168.3.0 netmask 255.255.255.0 gw 10.0.0.5
ExecStop=/usr/bin/connmanctl disconnect vpn_*_*_*_*
[Install]
WantedBy=multi-user.target
Display More
Code
wireguard.service - WireGuard VPN Service
Loaded: loaded (/storage/.config/system.d/wireguard.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2019-04-11 16:28:43 UTC; 2 years 4 months ago
Process: 348 ExecStart=/bin/sleep 5 (code=exited, status=0/SUCCESS)
Process: 369 ExecStart=/usr/bin/connmanctl connect vpn_*_*_*_* (code=exited, status=0/SUCCESS)
Process: 370 ExecStart=/usr/bin/connmanctl move-after vpn_*_*_*_* ethernet_e45f0152e8bd_cable (code=exited, status=0/SUCCESS)
Process: 371 ExecStart=/usr/bin/connmanctl move-after vpn_*_*_*_* ethernet_e45f0152e8bd_cable (code=exited, status=0/SUCCESS)
Process: 372 ExecStart=/usr/sbin/route add -net 192.168.4.0 netmask 255.255.255.0 gw 10.0.0.5 (code=exited, status=1/FAILURE)
Main PID: 372 (code=exited, status=1/FAILURE)
Apr 11 16:28:38 MattePI systemd[1]: Starting WireGuard VPN Service...
Apr 11 16:28:43 MattePI connmanctl[369]: Error /net/connman/service/vpn_*_*_*_*: Input/output error
Apr 11 16:28:43 MattePI connmanctl[370]: Error /net/connman/service/vpn_*_*_*_*: Invalid service
Apr 11 16:28:43 MattePI connmanctl[371]: Error /net/connman/service/vpn_*_*_*_*date: Invalid service
Apr 11 16:28:43 MattePI route[372]: route: ioctl 0x890b failed: Network is unreachable
Apr 11 16:28:43 MattePI systemd[1]: wireguard.service: Main process exited, code=exited, status=1/FAILURE
Apr 11 16:28:43 MattePI systemd[1]: wireguard.service: Failed with result 'exit-code'.
Apr 11 16:28:43 MattePI systemd[1]: Failed to start WireGuard VPN Service.
Display More