BIND DNS: Exclude specific sudonmain to wildcard Record

Issues related to applications and software problems
Post Reply
ludomania007
Posts: 15
Joined: 2019/05/07 11:30:10

BIND DNS: Exclude specific sudonmain to wildcard Record

Post by ludomania007 » 2019/11/08 10:28:13

Hello,

I don't know if i am in the good category or even the good forum. But like i saw many tutorials on Ubuntu and other linux version and their fixs didn't solve my problem, i imagined that there is some custom ways to do in Centos for my problem. OK i explain

My config: Centos 7.5, Bind9

I setup a DNS server with bind on centos 7 and now the DNS server works as well. But in a zone "exemple.com" and create A records with wilcard and specific records for some other subdomain. for example
IN NS ns1.example.com.
*.example.com. IN A 192.168.5.1
ns1.example.com IN A 192.168.5.1
foo.example.com. IN A 192.168.5.2

In many topics i saw that wildcard only resolves DNS query for all request that has not been defined so foo.example.com must return the ip 192.168.5.2. To verify this i use the command dig @localhost foo.example.com on the same server and it still return me 192.168.5.1 .. i flush dns with rndc flush ...normally dig command make query directly on my local DNS avoiding propagation issue i think, I also try with a client machine with nslookup ...foo.example.com that was 48 hrs ago and still continue but no change foo.example.com don't point 192.168.5.2

Did someone already get this problem? How have you fixed that?

I expect that i'm in the good category and someone can help me thanks

BShT
Posts: 63
Joined: 2019/10/09 12:31:40

Re: BIND DNS: Exclude specific sudonmain to wildcard Record

Post by BShT » 2019/11/08 12:18:09

foo IN A 192.168.5.2

*. MYDOMAIN. IN CNAME MYDOMAIN.

Mind the dots at the end of the MYDOMAIN

ludomania007
Posts: 15
Joined: 2019/05/07 11:30:10

Re: BIND DNS: Exclude specific sudonmain to wildcard Record

Post by ludomania007 » 2019/11/10 06:16:42

Hello,

@BSht yeah it was just an omission in my post, the dot was there. in fact i i needed to update the serial in SOA record. after i restart the service and when i use the dig to the subdomain the correct ip just show as result. I discover that if you don't update the serial, bind act like there is no change. Problem solved!

Post Reply

Return to “CentOS 7 - Software Support”