Setup:
I have a dns adblock-lean adblocker installed in openwrt v24 router on a stick (roas) which has No wan internet itself. The openwrt roas is trunk link connected to a L2 switch which has 3 separated vlan subnets, each of the 3 vlans subnets present as 3 separate interfaces in openwrt. Also each of the 3 vlans has its own individual 5G modem/router connected to a different cell provider.
Overview of challenge:
My openwrt roas device doesn't have its own WAN, it needs to function as the Local DNS Resolver for all three subnets while ensuring that traffic originating from those vlan’d subnets (and the DNS queries themselves) exits through the correct specific 5G gateway.
Goal:
I need to configure openwrt roas which has dns adblock-lean service running but no internet itself to use the 3 respective vlan 5G modem/router's for internet separately so adblock-lean service is shared by the 3 separate vlan’d 5G modem/routers and can resolve domains to IP addresses, e.g. a host in vlan 2 subnet reaches the internet via vlan 2’s 5G modem/router and shared dns adblock-lean on openwrt roas that has no internet itself, a host in vlan 3 subnet reaches the internet via vlan 3’s 5G modem/router and shared dns adblock-lean on openwrt roas that has no internet itself etc.
As we discussed on Reddit, in order to adblock on the ROAS, you need to have it as a dedicated DNS resolver for all your 3 VLANs. So IMO the ROAS must have an internet connection (so it can forward DNS requests to an upstream DNS server), otherwise I don't understand how it will resolve DNS to IP.
So perhaps the question should be rephrased as "how to configure this setup such that each VLAN has its own gateway to the internet and one of the gateways is shared with the ROAS"?
Thank you antonk that’s helpful, I would prefer “if it’s even technically possible” to have the respective gateway vlan subnet where the host origin dns requests to the roas instead of one specified single dedicated gateway if that’s even technically possible.
I don't understand what this means... You want to share all 3 internet connections with the ROAS? But why? If all it needs to do is resolve DNS + adblock then one connection is more than enough.