reading the forum and trying for hours, I can’t get another guest wifi running. What is working now on the bridged AP is a STD wifi and a VPN wifi via Wireguard.
You need to add policy based routing to set the appropriate rules for routing the guest network out the normal upstream (lan) instead of via the vpn (which it isn’t allowed to do by the firewalll).
I am not experienced att all concerning OpenWRT and PBR. Would it be in the “Firewall - NAT Rules” I had to set the appropriate rule? And why would my configuration not work without, when it followed the steps here: [OpenWrt Wiki] Guest Wi-Fi on a dumb wireless AP using LuCI?
The guest wifi is unbridged which means the traffic goes through the router in contrast to the lan interface which just bypasses the router.
Meaning the guest wifi follows the default route which is going via the vpn.
So you have to take care of the routing by means of policy based routing as already pointed out.
You need to add policy based routing to set the appropriate rules for routing the guest network out the normal upstream (lan) instead of via the vpn (which it isn’t allowed to do by the firewalll).
Just to be sure, PBR would apply to the upstream router?
No. PBR will be installed on the router that you have been describing (the "dumb AP with guest wifi"). You will create a policy that says that the guest network should route through to the upstream (I.e. the lan in this case), and another for the VPN'd network that routes through the VPN tunnel.
If your upstream router is VLAN aware (especially if it is running OpenWrt), all of this could be done there, instead. But I'm assuming that the main/upstream router is not VLAN capable.
The upstream router is VLAN capable but I would prefer a solution witout, just to not need to start with one more area I am not used to.
It is impossible for me to start PBR on the dumb AP. There is an error message : ERROR: Uplink/WAN interface is still down, increase value of 'procd_boot_trigger_delay' option!
Tried of course to change the delay option but this is probably not the problem.
Tried to configure the lan interface as uplink device:
Using uplink interface (on_start): wan [✓]
Processing environment (on_start) ERROR: Uplink/WAN interface is still down, increase value of 'procd_boot_trigger_delay' option!
Setting interface trigger for wan [✓]
Setting interface trigger for wan6 [✓]
pbr 1.2.0-r2 FAILED TO START in fw4 nft file mode!!!Check the output of nft -c -f /var/run/pbr.nftERROR: The pbr 1.2.0-r2 service failed to discover WAN gateway!
ERROR: Errors encountered, please check https://docs.openwrt.melmac.ca/pbr/1.2.0/#ErrorMessagesDetails!
Using uplink interface (on_start): wan [✓]
Processing environment (on_start) ERROR: Uplink/WAN interface is still down, increase value of 'procd_boot_trigger_delay' option!
pbr 1.2.0-r2 FAILED TO START in fw4 nft file mode!!!Check the output of nft -c -f /var/run/pbr.nftERROR: The wan interface not found, you need to set the 'pbr.config.uplink_interface' option!
ERROR: Refer to https://docs.openwrt.melmac.ca/pbr/1.2.0/#uplink_interface!
ERROR: Errors encountered, please check https://docs.openwrt.melmac.ca/pbr/1.2.0/#ErrorMessagesDetails!
tried that one, but was not considered “unknown interface”.
wg_int is the only interface listed as Service Gateway in PBR (LuCi). Adding it as interface gives a rule without error, but does (of course) not route the guest traffic to the primary router.
Any other way to define guest_int as known interface?
I have never tried to setup PBR on a BridgedAP but as far as I know you have to set the lan interface as uplink instead of the wan, it looks like you did that.
Without PBR you have a default route via the VPN so what you want in this case is to route your guest interface via the lan
To complicate matters there is also a PBR option lan_device you might need to set this to br-guest: option lan_device 'br-guest'
If that does not work remove default route via the VPN by disabling route_allowed_ips on the WG peer.
Reboot and check that everything goes via the lan.