Two interfaces using adblock respectively to block different set of websites

Hi All,
I have adblock in my router but it only work for one interface with some set of rules to block the specific sites.
Please, help me in creating the multiple interface having there respective adblock to have two different set of rules to block differnt sites.

for one adblock is working fine.

Please, help its urgent for my project.

Kind regards

adblock protection is working per dnsmasq instance (and not per interface!) ... to add adblock to multiple instances just edit /etc/config/dhcp and add this option to one or more dnsmasq instances:

option serversfile '/tmp/adb_list.overall'

hi
what kind of changes to be done /etc/config/dhcp ?
Also ,when you say adblock is working per dnsmasq instance, does that means it will either work for 0/1 or will work for both 0 and 1 instances together with different rules set.
please clarify...
regards

Look here: https://openwrt.org/docs/guide-user/base-system/dhcp_configuration and search for " Multiple DHCP/DNS server/forwarder instances", each instance need the above posted option to reference the adblock file.

If you need different adblock rule sets per instance, then you need a second adblock config plus additional scripting (to switch your config before adblock processing). In the second adblock config you should set/change at least the following adblock options:

option adb_dnsinstance '1' # '1' for the second dnsmasq instance ('0' is the default')
option adb_dnsprefix 'adb_list2'

Got this configuration, need to work on it.Thanks a lot.
But possible to run both adblock instances 0 and 1 simultaneously ?

hi..
Just a thought

  • if we get two adblock packages with different names.
  • multiple dnsmasq
    will this work simaltaneously with different sets of rules to block the sites and Ads.
    please, help

regards

Could you elaborate a bit more on 'additional scripting (to switch your config before adblock processing)' ?

I am also trying to setup adblock on OpenWrt for 2 different DNSMasq instances.
Can get it working on both DNSMasq instances with the option adb_dnsinstance '1' in a second adblock config block (in etc/config/adblock) but using different settings or rules don't apply correctly.

My interpretation suggested this should create 2 adb_list.overall files in tmp/dnsmasq.d but this doesn't happen...it's either one or the other?

I figure it's not possible to have 2 different sets of adblock configs applied to 2 different DNSMasq instances?

@dibdot Could you provide some guidelines as to how one would setup/script the adblock config file to provide 2 different sets of dnsmasq.
Setting up 2 different dnsmasq instances is not a problem but I am still strugling how to configure the adblock side.