You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It doesn't mention this but you then need to restart the configd service for it to pick up the new action - this can be done by service configd restart or restarting the configd service in the webgui from System -> Diagnostics -> Services - until you do this it gives an error "Action not allowed or missing" is displayed in the webgui when using Start/restart
The service still doesn't start as the action tries to call service defguard [start/stop/restart/status] as seen in opnsense/src/opnsense/service/conf/actions.d/actions_defguardgateway.conf however the service is called defguard-gateway not defguard (the following error is returned: "defguard does not exist in /etc/rc.d or the local startup directories (/usr/local/etc/rc.d), or is not executable")
Starting the service manually using service defguard-gateway start still doesn't work (the following error is returned: "export: -gateway_env: bad variable name")
Starting the binary manually (/usr/local/sbin/defguard-gateway --config /etc/defguard/gateway.toml) appears to work, but the webgui still doesn't appear to work
If the Use WireGuard userspace kernel implementation is enabled the binary refuses to start with the error Error: WireguardError(ExecutableNotFound("wireguard-go")). To the best of my knowledge the userspace wireguard binary was removed from OPNsense a while ago and cannot be installed from the official plugin repo.
The defguard portion of the webgui always shows a Endpoint not found warning - the developer console shows a (failed) attempt to send an http POST to /api/defguardgateway/service/status that returns a 404 with the body {"errorMessage":"Endpoint not found"}
It is unclear to me if I should be setting up a new wireguard interface for defguard to hook in to and use or if defguard should be spinning up it's own wireguard interface. I have wg1 and wg2 existing already. Specifying wg0 (a non-existant interface) for the Network interface produces the error Interface configuration failed: WireGuard error BSD error: Write error ENXIO: No such device or address in syslog. Specifying wg1 (an already existing wireguard interface) gives the error: Couldn't create network interface wg2: BSD error: Write error EEXIST: File exists. Proceeding anyway.
For reference this is what running sh -x /etc/rc.d/defguard-gateway start results in:
So far I've been unable to get the defguard plugin working in OPNsense 24.7.3
I've been unable to find what versions are supported, but these are some of my notes from debugging:
Followed the instructions at https://defguard.gitbook.io/defguard/admin-and-features/setting-up-your-instance/gateway#opnsense-plugin
configd
service for it to pick up the new action - this can be done byservice configd restart
or restarting theconfigd
service in the webgui fromSystem -> Diagnostics -> Services
- until you do this it gives an error "Action not allowed or missing" is displayed in the webgui when usingStart/restart
service defguard [start/stop/restart/status]
as seen in opnsense/src/opnsense/service/conf/actions.d/actions_defguardgateway.conf however the service is calleddefguard-gateway
notdefguard
(the following error is returned: "defguard does not exist in /etc/rc.d or the local startup directories (/usr/local/etc/rc.d), or is not executable")service defguard-gateway start
still doesn't work (the following error is returned: "export: -gateway_env: bad variable name")/usr/local/sbin/defguard-gateway --config /etc/defguard/gateway.toml
) appears to work, but the webgui still doesn't appear to workUse WireGuard userspace kernel implementation
is enabled the binary refuses to start with the errorError: WireguardError(ExecutableNotFound("wireguard-go"))
. To the best of my knowledge the userspace wireguard binary was removed from OPNsense a while ago and cannot be installed from the official plugin repo.Endpoint not found
warning - the developer console shows a (failed) attempt to send an http POST to/api/defguardgateway/service/status
that returns a 404 with the body{"errorMessage":"Endpoint not found"}
wg1
andwg2
existing already. Specifyingwg0
(a non-existant interface) for theNetwork interface
produces the errorInterface configuration failed: WireGuard error BSD error: Write error ENXIO: No such device or address
in syslog. Specifyingwg1
(an already existing wireguard interface) gives the error:Couldn't create network interface wg2: BSD error: Write error EEXIST: File exists. Proceeding anyway.
For reference this is what running
sh -x /etc/rc.d/defguard-gateway start
results in:Collapsed for brevity:
The text was updated successfully, but these errors were encountered: