[Pdns-users] Weird wildcard behavior

Otto Moerbeek otto at drijf.net
Sun Feb 9 09:15:54 UTC 2020


On Sun, Feb 09, 2020 at 01:29:25AM +0300, Gencer W. Genç via Pdns-users wrote:

> Update: I have redefined all records i think i made a mistake on some
> records. However, I still get infinite wildcard issues.

That's the way DNS wildcards work. Non-intuitive and full of surprises.
See e.g. https://en.wikipedia.org/wiki/Wildcard_DNS_record

	-Otto

> 
>  
> 
> So, this record:
> 
>  
> 
> *.test.mydomain.com IN A 127.0.0.1
> 
>  
> 
> Responds on:
> 
>  
> 
> another.sub.domain.level.test.mydomain.com -> 127.0.0.1
> 
> I want to limit it two one level of wildcard subdomain.
> 
>  
> 
> From: Pdns-users <pdns-users-bounces at mailman.powerdns.com
> <mailto:pdns-users-bounces at mailman.powerdns.com> > On Behalf Of Gencer W.
> Genç via Pdns-users
> Sent: Sunday, February 9, 2020 1:23 AM
> To: pdns-users at mailman.powerdns.com <mailto:pdns-users at mailman.powerdns.com>
> 
> Subject: [Pdns-users] Weird wildcard behavior
> 
>  
> 
> I am trying to add wildcard support for a domain like:
> 
>  
> 
> *.mydomain.com IN A 127.0.0.1
> 
>  
> 
> I expect these results:
> 
>  
> 
> one.mydomain.com -> 127.0.0.1
> 
> two.mydomain.com -> 127.0.0.1
> 
>  
> 
> However, This is also work for:
> 
>  
> 
> one.one.mydomain.com -> 127.0.0.1
> 
>  
> 
> As you can see, "one.one" is a two level subdomain. I only match single
> level subdomain and return as 127.0.0.1. So for two level domains or three
> level and goes on I expect this:
> 
>  
> 
> Expected Result:
> 
>  
> 
> one.one.mydomain.com -> NXDOMAIN
> 
> one.two.three.one.mydomain.com -> NXDOMAIN 
> 
>  
> 
> Actual Result:
> 
>  
> 
> one.one.mydomain.com -> 127.0.0.1
> 
> one.two.three.one.mydomain.com -> 127.0.0.1
> 
>  
> 
> =================== EXAMPLES ===================
> 
> Records/Rules:
> 
>  
> 
> *.mydomain.com IN A 1.1.1.1
> 
> *.one.mydomain.com IN A 4.4.4.4
> 
> *.two.mydomain.com IN A 5.5.5.5
> 
>  
> 
> BIND Behavior:
> 
>  
> 
> test.mydomain.com -> 1.1.1.1
> 
> test.one.mydomain.com -> 4.4.4.4
> 
> test.two.mydomain.com -> 5.5.5.5 
> 
> hello.test.two.mydomain.com -> NXDOMAIN
> 
>  
> 
>  
> 
> PowerDNS Behavior: 
> 
>  
> 
> test.mydomain.com -> 1.1.1.1
> 
> test.one.mydomain.com -> 1.1.1.1 
> 
> test.two.mydomain.com -> 1.1.1.1
> 
> hello.test.two.mydomain.com -> 1.1.1.1
> 
>  
> 
> =================== EXAMPLES ===================
> 
>  
> 
>  
> 
> How can i get the BIND result as i expected on PowerDNS? Is this behavior
> intentional? How c an i restrict wildcards to one level only?
> 
>  
> 
> Thanks,
> 
> Gencer.
> 
>  
> 

> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> https://mailman.powerdns.com/mailman/listinfo/pdns-users



More information about the Pdns-users mailing list