DNSMasq wildcard top level domain/suffix

I'm running DD-WRT on my router and I need to block certain websites and all their potential suffixes, is that possible or would I have to list them all out individually?

What I have is this

address=/blockedomain.com/127.0.0.1

And then subsequent entries for all the main suffixes

Cheers.


Solution 1:

You would need regex matching for domains to accomplish that, and out of the box DNSMasq doesn't support it. It seems there is unofficial patch though (dunno if applicable to DD-WRT).

Solution 2:

I use this list https://github.com/notracking/hosts-blocklists . In dnnsmasq.blacklist.txt you can add your own blacklisted websites, but you have to forbid your firewall to use external DNS servers.