Closed kchudy closed 7 months ago
The defguard-service cannot create new utun interface if there are existing utun interfaces. On mike's macOS there are 5 utun interfaces (up to utun5).
Logs:
[2023-11-24][14:44:57][ERROR][defguard_client::utils] Failed to create interface: status: Internal, message: "Failed to create WireGuard interface utun5: Command returned error status", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc", "date": "Fri, 24 Nov 2023 14:44:57 GMT", "content-length": "0"} } [2023-11-24][14:44:57][ERROR][Sv@tauri://localhost/assets/index-b8f9d85a.js:68:6414] Invoking connect FAILED "Internal error" [2023-11-24][14:44:57][ERROR][Sv@tauri://localhost/assets/index-b8f9d85a.js:68:6414] Error handling interface: Internal error
ifconfig output:
~ ifconfig lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP> inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 nd6 options=201<PERFORMNUD,DAD> gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280 stf0: flags=0<> mtu 1280 ap1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=6463<RXCSUM,TXCSUM,TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM> ether a6:83:e7:32:58:2c inet6 fe80::a483:e7ff:fe32:582c%ap1 prefixlen 64 scopeid 0x5 nd6 options=201<PERFORMNUD,DAD> media: autoselect () status: inactive en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=400 ether a4:83:e7:32:58:2c inet6 fe80::1881:e3c0:1585:edfa%en0 prefixlen 64 secured scopeid 0x6 inet 10.2.0.16 netmask 0xffffff00 broadcast 10.2.0.255 nd6 options=201<PERFORMNUD,DAD> media: autoselect status: active awdl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=6463<RXCSUM,TXCSUM,TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM> ether da:ea:24:0c:75:a0 inet6 fe80::d8ea:24ff:fe0c:75a0%awdl0 prefixlen 64 scopeid 0x7 nd6 options=201<PERFORMNUD,DAD> media: autoselect status: active en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 options=460<TSO4,TSO6,CHANNEL_IO> ether 82:24:9f:c2:04:01 media: autoselect status: inactive en2: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 options=460<TSO4,TSO6,CHANNEL_IO> ether 82:24:9f:c2:04:00 media: autoselect status: inactive en3: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 options=460<TSO4,TSO6,CHANNEL_IO> ether 82:24:9f:c2:04:05 media: autoselect status: inactive en4: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 options=460<TSO4,TSO6,CHANNEL_IO> ether 82:24:9f:c2:04:04 media: autoselect status: inactive bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=63<RXCSUM,TXCSUM,TSO4,TSO6> ether 82:24:9f:c2:04:01 Configuration: id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0 maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200 root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0 ipfilter disabled flags 0x0 member: en1 flags=3<LEARNING,DISCOVER> ifmaxaddr 0 port 8 priority 0 path cost 0 member: en2 flags=3<LEARNING,DISCOVER> ifmaxaddr 0 port 9 priority 0 path cost 0 member: en3 flags=3<LEARNING,DISCOVER> ifmaxaddr 0 port 10 priority 0 path cost 0 member: en4 flags=3<LEARNING,DISCOVER> ifmaxaddr 0 port 11 priority 0 path cost 0 nd6 options=201<PERFORMNUD,DAD> media: status: inactive llw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=400 ether da:ea:24:0c:75:a0 inet6 fe80::d8ea:24ff:fe0c:75a0%llw0 prefixlen 64 scopeid 0xd nd6 options=201<PERFORMNUD,DAD> media: autoselect status: inactive utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380 inet6 fe80::339a:84a4:9bb5:6f5f%utun0 prefixlen 64 scopeid 0xe nd6 options=201<PERFORMNUD,DAD> utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000 inet6 fe80::72e7:c6c5:18cc:afb6%utun1 prefixlen 64 scopeid 0xf nd6 options=201<PERFORMNUD,DAD> utun2: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1000 inet6 fe80::ce81:b1c:bd2c:69e%utun2 prefixlen 64 scopeid 0x10 nd6 options=201<PERFORMNUD,DAD> utun3: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380 inet6 fe80::ae76:73bb:534d:581e%utun3 prefixlen 64 scopeid 0x11 nd6 options=201<PERFORMNUD,DAD> en5: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 ether ac:de:48:00:11:22 inet6 fe80::aede:48ff:fe00:1122%en5 prefixlen 64 scopeid 0x4 nd6 options=201<PERFORMNUD,DAD> media: autoselect (100baseTX ) status: active utun5: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380 inet6 fe80::60bd:4244:c32a:54ff%utun5 prefixlen 64 scopeid 0x13 nd6 options=201<PERFORMNUD,DAD> ~ ✔ 2273 15:45:40 $
@blazej-teonite we need to "select" a free uTun device - it should not be hardcoded
sudo env LOG_LEVEL=debug wireguard-go -f utun
The defguard-service cannot create new utun interface if there are existing utun interfaces. On mike's macOS there are 5 utun interfaces (up to utun5).
Logs:
[2023-11-24][14:44:57][ERROR][defguard_client::utils] Failed to create interface: status: Internal, message: "Failed to create WireGuard interface utun5: Command returned error status", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc", "date": "Fri, 24 Nov 2023 14:44:57 GMT", "content-length": "0"} } [2023-11-24][14:44:57][ERROR][Sv@tauri://localhost/assets/index-b8f9d85a.js:68:6414] Invoking connect FAILED "Internal error" [2023-11-24][14:44:57][ERROR][Sv@tauri://localhost/assets/index-b8f9d85a.js:68:6414] Error handling interface: Internal error
ifconfig output:
~ ifconfig lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP> inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 nd6 options=201<PERFORMNUD,DAD> gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280 stf0: flags=0<> mtu 1280 ap1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=6463<RXCSUM,TXCSUM,TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM> ether a6:83:e7:32:58:2c inet6 fe80::a483:e7ff:fe32:582c%ap1 prefixlen 64 scopeid 0x5 nd6 options=201<PERFORMNUD,DAD> media: autoselect ()
status: inactive
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=400
ether a4:83:e7:32:58:2c
inet6 fe80::1881:e3c0:1585:edfa%en0 prefixlen 64 secured scopeid 0x6
inet 10.2.0.16 netmask 0xffffff00 broadcast 10.2.0.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
awdl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=6463<RXCSUM,TXCSUM,TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM>
ether da:ea:24:0c:75:a0
inet6 fe80::d8ea:24ff:fe0c:75a0%awdl0 prefixlen 64 scopeid 0x7
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=460<TSO4,TSO6,CHANNEL_IO>
ether 82:24:9f:c2:04:01
media: autoselect
status: inactive
en2: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=460<TSO4,TSO6,CHANNEL_IO>
ether 82:24:9f:c2:04:00
media: autoselect
status: inactive
en3: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=460<TSO4,TSO6,CHANNEL_IO>
ether 82:24:9f:c2:04:05
media: autoselect
status: inactive
en4: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=460<TSO4,TSO6,CHANNEL_IO>
ether 82:24:9f:c2:04:04
media: autoselect
status: inactive
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether 82:24:9f:c2:04:01
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x0
member: en1 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 8 priority 0 path cost 0
member: en2 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 9 priority 0 path cost 0
member: en3 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 10 priority 0 path cost 0
member: en4 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 11 priority 0 path cost 0
nd6 options=201<PERFORMNUD,DAD>
media:
status: inactive
llw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=400
ether da:ea:24:0c:75:a0
inet6 fe80::d8ea:24ff:fe0c:75a0%llw0 prefixlen 64 scopeid 0xd
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: inactive
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
inet6 fe80::339a:84a4:9bb5:6f5f%utun0 prefixlen 64 scopeid 0xe
nd6 options=201<PERFORMNUD,DAD>
utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
inet6 fe80::72e7:c6c5:18cc:afb6%utun1 prefixlen 64 scopeid 0xf
nd6 options=201<PERFORMNUD,DAD>
utun2: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1000
inet6 fe80::ce81:b1c:bd2c:69e%utun2 prefixlen 64 scopeid 0x10
nd6 options=201<PERFORMNUD,DAD>
utun3: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
inet6 fe80::ae76:73bb:534d:581e%utun3 prefixlen 64 scopeid 0x11
nd6 options=201<PERFORMNUD,DAD>
en5: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether ac:de:48:00:11:22
inet6 fe80::aede:48ff:fe00:1122%en5 prefixlen 64 scopeid 0x4
nd6 options=201<PERFORMNUD,DAD>
media: autoselect (100baseTX )
status: active
utun5: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
inet6 fe80::60bd:4244:c32a:54ff%utun5 prefixlen 64 scopeid 0x13
nd6 options=201<PERFORMNUD,DAD>
~ ✔ 2273 15:45:40
$