Closed crushed112 closed 1 day ago
running
nft add element inet fw4 pbr_vpnwan_CO_136_4_dst_ip_cfg026ff5 { 23.239.16.110 }
does make the policy work also
Hey, thanks for the donation and Happy Thanksgiving!
How much of the https://docs.openwrt.melmac.net/pbr/#AWordAboutBrokenDomainPolicies have you gone thru? For majority of people the last big bullet point in that section (then further divided in sub-bullet points) applies.
From your configs I'd venture a guess that you're using a pihole (or another resolver) on your LAN, so it is likely that your clients do not make any resolution requests to your router/dnsmasq.
Happy thanksgiving and thanks for the fast response!
Ah I didn't actually read that full section! I saw the first bit and misread it as the router just needs to be able to make DNS requests which I assumed was just to resolve the IP
I didn't realize the router actually needs to be the DNS server
Yes you're right I do have Adguard home separate from my router, does this mean I won't be able to do domain based policies?
Thank you, I guess I didn't make the connection that the policies would actually be enforced when the domains were resolved
Yes you're right I do have Adguard home separate from my router, does this mean I won't be able to do domain based policies?
You have a few options on how to make pbr work.
Ah option 1 sounds ideal, I could run it on this router too but I'm going to try option 1 first thanks so much I'll close this issue as complete now
Describe the bug
When defining a domain-based policy (dest_addr) in the PBR configuration, the expected behavior is for dnsmasq to dynamically resolve the domain and populate the associated nftset. However, the nftset remains empty, and the policy does not apply unless the IP is manually added to the nftset.
Your configs
/etc/config/dhcp
/etc/config/network
/etc/config/firewall
/etc/config/pbr
To Reproduce
I admit I haven't done a clean reproduction of this so this could be due to my environment, ( bpi-r3 on snapshot,
dnsmasq-full
andluci-app-pbr
installed viaapk
, dnsmasq forwarding requests to a local dns server on same subnet as my bpi-r3, proton vpn wireguard interface)Steps to reproduce the behavior:
Expected behavior
I expect
to return
but I get
Policy Routing run-time information
/etc/init.d/pbr reload
withverbosity
set to 2:/etc/init.d/pbr status
: