Adblock: "Force Local DNS" is not working, and another question

I have two questions about Adblock:

  1. I want to force my laptop (Wi-Fi connected to the router) to use Adblock even when the DNS is manually set to ( in the laptop, isn't "Force Local DNS" supposed to do the job ? then why it's not working for me ? (Pictures below show my settings)

  2. If Adblock has failed to load blocklist sources after a weekly timed reload or a router reboot (for example no internet was there during the reload/reboot), how can I ask Adblock to try reload again every 1 hour until sources are successfully loaded ?

Failed reload example (router reboot with no internet):

Thanks in advance

You may want to install banIP to block DoH and use persistent location to store the blocklists.

  • :confused: You realize you said "no Internet", correct?
  • Did you add the reload command to your Scheduled Tasks (i.e. a cron job)??? :wink:
    • How do you have this reload "timed"?
    • You can make a script to check the date of the last load, then load only if time < x_age
    • Or even easier, the script can check for Internet first - then load the lists :smiley:

Also, see:


  • your firewall rules are wrong, as the traffic you wish to intercept would be a FORWARD from LAN to WAN, not INPUT to the device
  • Let alone the error, do you even have a service running that handles port 5353 traffic???


  • :confused: Again,you realize you said "no Internet", correct?
  • Adblock cannot load blocklists [from the Interent] without an actual Internet connection :bulb:

Is "Blocklist Backup" checked by chance?

1 Like

Yes I know this issue happens -of course- when I reboot or reload Adblock during an outage in the internet service from my ISP, that's why I'm asking for a command for Adblock to reload the sources (once the internet is back, your suggestion is great), I don't want to manually reload Adblock

  1. Yes "Blocklist Backup" is ticked, why it's not working? (I still see ads everywhere).
  2. The scheduled weekly reload task is added here:

3)So, can you please (if you have time) or anyone write me a script for Adblock to reload when there is internet, and where should I paste it! (Sorry for looking dumb, I'm not a programmer🥺)

Is that a bug in Adblock package ? I just ticked "Force Local DNS" and the rules where automatically added to the firewall. I will check later if I can be smart enough to do what you said.

I don't know :neutral_face:, it's automatically created by Adblock. I just use my laptop and few smartphones for casual browsing, and I have a PS4.

uci set"/etc/adblock"
uci commit adblock
/etc/init.d/adblock restart
1 Like

Where should I paste this, can I paste it somewhere in openwrt interface without a pc ?

Or can I apply what you said by changing something here:


No it's a bug in the firewall rules you made.


And I think it is me weird, but I think it finds 0 domains to block because of no blocklists...because of no can always ask in the support thread. :wink:

The command line of the router.


I think @vgaetera is referring to this:


He suggests to add the following: /etc/adblock

Have you tried asking/searching in the thread for Adblock Support?

1 Like

Sorry to confuse you, may be I didn't clarify well.
The two problems "Local DNS" & "Reload script I'm asking for" are separated.

First problem:
Adblock works well without any problems (~41000 domains blocked) when the laptop DNS is set to router IP Address. However, the laptop (and also my smartphone) show ads when DNS is manually set to with "Force Local DNS" ticked and firewall rules above created.

Second problem (not related to the first one):
When I deliberately shut my internet service (entering a wrong pppoe password) and reboot the router, adblock load 0 domains, until manual reload with internet service.
I'm asking for a script to let adblock reload when the internet is back. Or at least fix the backup issue.

Can you tell me where is that ?

Why should we block local/on the router generated traffic? This DNS block/redirect is only intended for connected clients.

1 Like

What's your testcase? Most probably you have to disable DoH in your browser ... or use banIP to block public DoH server as well.

If you have no internet, adblock can't download anything ... and you don't need adblock at all without internet ...:wink:

To fix your issue:

  • you should define a startup trigger (typically 'wan') ... whenever your internet comes up adblock processing will be triggered, too.
  • by default the backup directory is placed in volatile RAM (/tmp) - just change this backup directory to a non-volatile disk, e.g. an usb stick.
  • enable Email notifications in adblock to get a notification whenever adblock runs.

BTW, please consult the online readme for further details - thanks.

I wanted the OP to defer to you. I've actually had no need to enable the setting and realized I may not be seeing the whole rule from the screenshot. My bad.

My [incorrect] understanding was the rule intercepted traffic to the router, not forward.

Ummm...I did tell you. You need a computer (or SSH client) to connect to the router's command line. That's why I showed you its location on the web GUI instead.

1 Like

Oh right, thank you, it's DoH.

Can't I use /etc/adblock instead of a usb stick ? I don't have a usb slot in my Archer C20 V4

anyway I set Backup Directory to /etc/adblock as @vgaetera suggested, but still backup not working, blocked domains returned to 0 from ~41000 when I rebooted my router with wrong PPPoE password.

I personally would not use a flash directory (wear leveling), just keep the default then.

In case of an error (in your case) adblock removes all possibly broken backups and intermediate files. Check the logs to find the root cause of this error ... and please define a trigger for your pppoe interface.

I don't know how to do that without someone telling me a step by step procedure (I'm a civil engineer who doesn't have any programming experience).


Just select the relevant interface, e.g.:

...and most probably you should raise the trigger timeout (on the Additional Settings tab) to 10-15 sec.

1 Like

Thank you!
Everything is perfect now

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.