FYI: 22.03 allows you to use huge blocklists with dnsmasq

Hey, so '\|^address=|!d;\|/#$|d;q' is sent to $rogue_element, if $rogue_element =/= zero then there is an issue. Looks quite tidy really.

I do want to tidy up the first check more eg what do you think about this? A lot like the second pass filter but opposite. It would pick up more than currently.
if start with address=(/ must follow)(alnum's must follow)(alnum's or .- must follow)(must end with /#)

Then second pass would just clean out random bits eg if there just happened to be a random text line.

Having said that, haven't seen a bad line in oisd yet. But checks are a must for running!

But I do appologise I might be a bit quiet for the next ~10 days. RL work (finance) is about to get pretty crazy unfortunately with a few things due.

I just added extra dnsmasq checks:

Finance? Crazy times at the moment right? My VWRP doesn't look so great anymore.

1 Like

You can use && to combine commands. It will stop on the first error.
So if grep fails it wont ping and so on:

{ pgrep -x dnsmasq && ping -c 1 && ping -c 1 ;} &>/dev/null

edit: If needed you can add a return $?

From my testing this seems to be working pretty well now:

Very easy to install - just put service file into /etc/init.d/ and enable and start service.

And optionally put the following entry into 'Scheduled Tasks':

0 5 * * * adblock-oisd enabled; [[ $? -eq 0 ]] && /etc/init.d/adblock-oisd start

to update at 5am every morning (in dependence upon the various checks).


Maybe also put

/etc/unit.d/adblock-oisd start

in /etc/rc.local so everytime the router boots the oisd list gets downloaded.

Edit also on your github, the first line of the installation instructions is missing /main/ between your username and the repo.

1 Like

Actually one isn't better than the other, it depends.

I have seen some cases where since is an answer it continually tries to keep connecting to like a server is down or unresponsive. Apple recommends using NXDOMAIN for their devices.

In other cases, NXDOMAIN will cause a retry or fall back like you mentioned with some Android devices.

It depends on the software & application. You can find answers for both ways.

Hey Lynx nice work! Looking forward to giving it a spin as soon as I get the time. Will report back....

1 Like

Cool. I have it running all the time now and it updates every 5am just fine. I like that this service script solution: 'adblock-oisd' - inspired by this thread - has a tiny footprint at less than 3KB and I believe more sanity checks and safeguards than the heavier alternatives. And of course it can be improved further with time.

1 Like

Maybe turn it into a package so when people use Attended Sysupgrade it sticks and you do not need to install it again.

Actually you just need to add the file:


to the list of files to backup in the Configuration tab in LuCi here:


I will update the GitHub readme now.

1 Like

Thanks to everyone on this thread!