[Dnsmasq-discuss] address=/ads./# forward maching syntax?
Paul D
newtwen at gmail.com
Fri Aug 1 13:50:16 UTC 2025
Hallucinated, likely. Never tried, but it seems alluded to in the --server option where it says:
Matching of domains is normally done on complete labels, so /google.com/ matches google.com and www.google.com but NOT supergoogle.com. This can be overridden with a * at the start of a pattern only: /*google.com/ will match google.com and www.google.com AND supergoogle.com. The non-wildcard form has priority, so if /google.com/ and /*google.com/ are both specified then google.com and www.google.com will match /google.com/ and /*google.com/ will only match supergoogle.com.
For historical reasons, the pattern /.google.com/ is equivalent to /google.com/ if you wish to match any subdomain of google.com but NOT google.com itself, use /*.google.com/
with the exception being: "This can be overridden with a * at the start of a pattern only"
where the options.c code processes the options similarly:
case 'S': /* --server */
case LOPT_LOCAL: /* --local */
case 'A': /* --address */
On 2025-07-24 02:16, moistice at riseup.net wrote:
> address=/example.com/0.0.0.0 block example.com and *.example.com
> address=/test.example.org/0.0.0.0 block exact FQDN
> address=/ads./0.0.0.0 left-side component matching via its format
> address=/io/0.0.0.0 blocks tld
>
> Above is what AI replied when I asked for dnsmasq syntax.
>
> I want to ask about "address=/ads./0.0.0.0" line. This "front*" matching
> is not mentioned in
> https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html at all.
>
> Did you forgot to update the documentation, or is this just an AI
> hallucination?
>
> This forward* matching will be very useful if this is real?
>
> e.g.,
> address=/ads./#
> address=/advert./#
> address=/trk./#
> and so on
>
>
More information about the Dnsmasq-discuss
mailing list