2023-09-27T22:25:03 Notice wireguard Wireguard interface WGxInternet (wg1) started2023-09-27T22:25:03 Notice wireguard Wireguard interface WGxInternet (wg1) stopped2023-09-27T22:17:02 Notice wireguard Wireguard interface WGSite2Site (wg2) started2023-09-27T22:17:02 Error wireguard /usr/local/opnsense/scripts/Wireguard/wg-service-control.php: The command '/sbin/route -q -n add -'inet' '10.101.1.2/30' -interface 'wg2'' returned exit code '1', the output was ''2023-09-27T22:17:01 Notice wireguard Wireguard interface WGSite2Site (wg2) stopped2023-09-27T22:17:01 Notice wireguard Wireguard interface WGSite2Site (wg2) can not reconfigure without stopping it first.2023-09-27T22:17:01 Notice wireguard Wireguard interface WGxInternet (wg1) started2023-09-27T22:17:01 Notice wireguard Wireguard interface WGxInternet (wg1) stopped2023-09-27T22:17:01 Notice wireguard Wireguard interface WGxInternet (wg1) can not reconfigure without stopping it first.
Is there a reason not to have Unbound listening on all interfaces? It's been posted a couple times in the forum why not doing so will cause problems with Unbound and dynamic interfaces.
It was easier to control access that way, though I have changed it to All in the meantime and utilized Aliases and Floating rules to control access.
But it's not a factor for these issues anyway. The domains get resolved either way, but WG just doesn't get out to Internet (or back?) unless I manually restart it.
Was there specific access you were trying to prevent? OPNSense blocks all access to Unbound except LAN by default.
Quote from: Kinerg on September 28, 2023, 09:46:27 pmBut it's not a factor for these issues anyway. The domains get resolved either way, but WG just doesn't get out to Internet (or back?) unless I manually restart it.What do you mean by doesn't get out to the internet? Are you seeing a handshake? Can you ping? What about DNS?
nterface Timestamp SRC DST outputWGxInternetwg1 2023-09-29 16:07:49.232765 length 88: 10.101.80.1 > 1.1.1.1: ICMP echo request, id 689, seq 1, length 64WANvtnet1 2023-09-29 16:07:49.232796 xx:xx:xx:xx:xx:xx xx:xx:xx:xx:xx:xx IPv4, length 98: 10.101.80.1 > 1.1.1.1: ICMP echo request, id 689, seq 1, length 64WGxInternetwg1 2023-09-29 16:07:50.232109 length 88: 10.101.80.1 > 1.1.1.1: ICMP echo request, id 690, seq 1, length 64WANvtnet1 2023-09-29 16:07:50.232146 xx:xx:xx:xx:xx:xx xx:xx:xx:xx:xx:xx IPv4, length 98: 10.101.80.1 > 1.1.1.1: ICMP echo request, id 690, seq 1, length 64
Quote from: CJ on September 29, 2023, 02:20:53 pmWas there specific access you were trying to prevent? OPNSense blocks all access to Unbound except LAN by default.Preventing IoT, cameras and similar VLANs from resolving DNS.
Should I run packet capture to see about handshake?I can't ping, neither by hostname nor direct IP (e.g. 1.1.1.1). Hostname gets resolved by Unbound on OPNsense and the WireGuard client receives it, but the ping to requested destination gets no reply. So, WG_client<->OPNsense works, but WG_client<->Internet doesn't unless I restart the WireGuard instance.
Could this issue be related?
Can you confirm about Unbound ACL visibility in UI and missing options compared to documentation? Has this been changed for 23.7 or is it an issue on my end?
Quote from: Kinerg on September 29, 2023, 03:48:17 pmQuote from: CJ on September 29, 2023, 02:20:53 pmWas there specific access you were trying to prevent? OPNSense blocks all access to Unbound except LAN by default.Preventing IoT, cameras and similar VLANs from resolving DNS.That all occurs by default. Nothing will be able to reach Unbound outside of LAN unless you add a rule specifically for it regardless of what the Unbound listening interface is set to.
Quote from: Kinerg on September 28, 2023, 09:46:27 pmShould I run packet capture to see about handshake?I can't ping, neither by hostname nor direct IP (e.g. 1.1.1.1). Hostname gets resolved by Unbound on OPNsense and the WireGuard client receives it, but the ping to requested destination gets no reply. So, WG_client<->OPNsense works, but WG_client<->Internet doesn't unless I restart the WireGuard instance.Which hostname are you referring to? example.com or something local? What does the firewall log say?
wan 2023-09-30T15:53:46 10.101.80.1 1.1.1.1 icmp let out anything from firewall host itself
wan 2023-09-30T15:56:41 192.168.61.10 1.1.1.1 icmp let out anything from firewall host itself (force gw)
Quote from: Kinerg on September 28, 2023, 09:46:27 pmCould this issue be related?I don't think so but I haven't looked at it. What rules do you have for WG?
Quote from: Kinerg on September 28, 2023, 09:46:27 pmCan you confirm about Unbound ACL visibility in UI and missing options compared to documentation? Has this been changed for 23.7 or is it an issue on my end?I'm not sure what you mean. Can you elaborate? I've noticed no difference between 23.1 and 23.7 in terms of WG and made no changes for them either.
Quote from: CJ on September 30, 2023, 02:54:59 pmThat all occurs by default. Nothing will be able to reach Unbound outside of LAN unless you add a rule specifically for it regardless of what the Unbound listening interface is set to.It will if I have a rule to Allow IoT_net to IoT_address to enable DHCP/NTP/routing access. Or am I mistaken?
That all occurs by default. Nothing will be able to reach Unbound outside of LAN unless you add a rule specifically for it regardless of what the Unbound listening interface is set to.
The other, separate issue, is Unbound no longer showing its internal ACLs like before. Before 23.7 it listed all the automatically configured ACLs. Example in screenshot below which I found online. It used to show all internal automatically listed ACLs above plus the custom made ones. Now, on 23.7, I can only see the custom made rules and can't find which ACLs Unbound has active.Also, the Default Action option only shows Allow/Deny/Refuse, while the manual states there should also be Allow Snoop/Deny Non-local/Refuse Non-local.
Firewall log doesn't show anything incoming being blocked and shows ping going out, but differently before/after WG restart. Is this a gateway/routing issue?OPNsense fresh boot, before manual WG restart:Code: [Select]wan 2023-09-30T15:53:46 10.101.80.1 1.1.1.1 icmp let out anything from firewall host itselfAfter manual WG restart:Code: [Select]wan 2023-09-30T15:56:41 192.168.61.10 1.1.1.1 icmp let out anything from firewall host itself (force gw)My OPNsense box has the 192.168.61.10 on the WAN interface provided by an external router and 192.168.61.1 as WAN_GW.Quote from: CJ on September 30, 2023, 02:54:59 pmQuote from: Kinerg on September 28, 2023, 09:46:27 pmCould this issue be related?I don't think so but I haven't looked at it. What rules do you have for WG?Block WG_net to WG_address ports 22/80/443Allow WG_net to WG_netBlock WG_net to All_Private_IP_rangesAllow WG_net to !All_Private_IP_rangesI also have NAT Port Forward redirect set up so that WireGuard enabled phones work when connected to local WiFi, but that doesn't make a difference regarding this problem.
Quote from: Kinerg on September 30, 2023, 04:36:30 pmThe other, separate issue, is Unbound no longer showing its internal ACLs like before. Before 23.7 it listed all the automatically configured ACLs. Example in screenshot below which I found online. It used to show all internal automatically listed ACLs above plus the custom made ones. Now, on 23.7, I can only see the custom made rules and can't find which ACLs Unbound has active.Also, the Default Action option only shows Allow/Deny/Refuse, while the manual states there should also be Allow Snoop/Deny Non-local/Refuse Non-local.Yes, IIRC, this was done to avoid issues with dynamic interfaces such as wireguard not being picked up. So instead of a default deny with allow rules added for each interface subnet, unbound was changed to a default allow.
Quote from: Kinerg on September 30, 2023, 04:36:30 pmFirewall log doesn't show anything incoming being blocked and shows ping going out, but differently before/after WG restart. Is this a gateway/routing issue?OPNsense fresh boot, before manual WG restart:Code: [Select]wan 2023-09-30T15:53:46 10.101.80.1 1.1.1.1 icmp let out anything from firewall host itselfAfter manual WG restart:Code: [Select]wan 2023-09-30T15:56:41 192.168.61.10 1.1.1.1 icmp let out anything from firewall host itself (force gw)My OPNsense box has the 192.168.61.10 on the WAN interface provided by an external router and 192.168.61.1 as WAN_GW.Quote from: CJ on September 30, 2023, 02:54:59 pmQuote from: Kinerg on September 28, 2023, 09:46:27 pmCould this issue be related?I don't think so but I haven't looked at it. What rules do you have for WG?Block WG_net to WG_address ports 22/80/443Allow WG_net to WG_netBlock WG_net to All_Private_IP_rangesAllow WG_net to !All_Private_IP_rangesI also have NAT Port Forward redirect set up so that WireGuard enabled phones work when connected to local WiFi, but that doesn't make a difference regarding this problem.Do you have logging turned on for the WG rules? Are they showing any hits during this time?
wan 2023-10-01T15:43:55 10.101.80.1 1.1.1.1 icmp let out anything from firewall host itself WGxInternet 2023-10-01T15:43:55 10.101.80.1 1.1.1.1 icmp Allow WGxInternet to Internet wan 2023-10-01T15:43:54 10.101.80.1 1.1.1.1 icmp let out anything from firewall host itself WGxInternet 2023-10-01T15:43:54 10.101.80.1 1.1.1.1 icmp Allow WGxInternet to Internet
wan 2023-10-01T15:44:56 192.168.61.10 1.1.1.1 icmp let out anything from firewall host itself (force gw) WGxInternet 2023-10-01T15:44:56 10.101.80.1 1.1.1.1 icmp Allow WGxInternet to Internet wan 2023-10-01T15:44:55 192.168.61.10 1.1.1.1 icmp let out anything from firewall host itself (force gw) WGxInternet 2023-10-01T15:44:55 10.101.80.1 1.1.1.1 icmp Allow WGxInternet to Internet
Setup an endpoint, setup the local instance, and enable it. You get a Wireguard connection from the Firewall itself and can see this with the `wg` command. You can ping and curl and verify VPN access from the firewall. Before doing anything else - Reboot the firewall. Now go back to the Wireguard plugin, and you'll see it tries to send data, but never receives. It's completely stuck, even with the default NAT rules. Verified in an SSH session too, just to make sure. Go to the plugin, uncheck it, save, check it again, save... VPN connection is back and running. So I'm starting to think the main issue/bug I've been running into the past month or whatnot is potentially a result of this issue.