Adblocking for multiple vlans each with own 5G cell modem/routers

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.

1 Like

You can have separate instance of dnsmasq per subnet, just that luci is able to edit only first one.

is it possible to configure or bind all 3 5G modem gateway routers to single a instance of dnsmasq by using policy based routing?

Just as related as changing power socket......

Can you be more specific, as opposed to using an analogy of changing power socket.

Which part of three dnsmasq configs was not clear?
No other software helps. Ask in respective adblock thread on how to make three instances of that.

Font expect anyone to take on AI challenges.

very unhelpful, and whats font?

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"?

1 Like

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.

For seperation and as each 5G modem/router is a different cell provider, 3 different cell providers.

IMO this is too complicated. But maybe it's just me.

It’s a bespoke niche setup, hopefully folks in this openwrt forum space can chime in and advise on a solution