Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I setup a BIND9 DNS server in the LAN as a backend to Samba4 service. The network address of my LAN is 192.168.2.0/24 and I statically specify the IP address of DNS server as 192.168.2.144.

Unfortunately, there is another MIC on my DNS server (in fact, the DNS server is a virtual box, the extra MIC is the virtual bridge). They are in different network, the network address of the virtual bridge is 192.168.122.0/24.

I bind a domain name dc.foo.bar to the static address 192.168.2.144 in /etc/named.conf. However, when I query the DNS information with host -t A dc.foo.bar, two entries are returned, one is 192.168.2.144 while the other is 192.168.122.1.

I don't want dc.foo.bar binds to 192.168.122.1, neither do I know how it is added into the DNS service. How could I trouble shot the problem and remove the erronous DNS address entry?


UPDATE

I paste the result from dig for reference

[root@dc ~]# dig A dc.foo.bar

; <<>> DiG 9.8.2rc2 <<>> A dc.foo.bar
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62496
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;dc.foo.bar.        IN  A

;; ANSWER SECTION:
dc.foo.bar. 900 IN  A   192.168.122.1
dc.foo.bar. 900 IN  A   192.168.2.144

;; Query time: 1 msec
;; SERVER: 192.168.2.144#53(192.168.2.144)
;; WHEN: Sun Aug 11 22:12:03 2013
;; MSG SIZE  rcvd: 72

UPDATE AGAIN

I double check the samba log and bind configure. I'm quite sure the problem is introduced by samba. In samba configure file, there is a parameter interfaces in global section. Initially, I left it defaults and I find the address 192.168.122.1 is resolved by the internal bind from samba log. I then specified it interfaces = eth0, i.e. only the physical NIC should be resolved. Now from the samba log, 192.168.122.1 is not loaded ever. However, dig still returns both address for dc.foo.bar. So the problem may be a deprecated entry in ldb database. Any idea about it so I can reconstruct the ldb database?

Thank you in advacne!

share|improve this question
    
Can you post a copy of your zone file ? It looks like it is handing out 2 addresses. –  davidgo Aug 11 '13 at 19:06
    
@davidgo Thank you for your concern. I think the problem may result from a deprecated entry in ldb databases in sambe. I've updated my question. –  Summer_More_More_Tea Aug 12 '13 at 15:06

2 Answers 2

You can try debugging using utility dig, it will show which resolver it queries to and what answer it gets. dig A dc.foo.bar.

share|improve this answer
    
Thank you for your fast response. Both IP appears in ANSWSER SECTION that I cannot distinguish. Any more suggestion? :) –  Summer_More_More_Tea Aug 11 '13 at 14:13
    
Can you paste the full result to here or pastebin? –  Jani Karlsson Aug 11 '13 at 14:14
    
I'm sorry, unfortunately, pastebin.com is blocked in my country that I cannot get access to :( Updated my question. –  Summer_More_More_Tea Aug 11 '13 at 14:28
    
So is the bind server listening on 192.168.2.144 port 53/udp or something else? If its bind you should find your answer from 192.168.2.144's /var/log/messages or such. grep bind /var/log/messages. Otherwise you can look samba's logs for messages about DNS updates. –  Jani Karlsson Aug 11 '13 at 14:51
    
Have you setup bind-integration with Samba4 as specified in: wiki.samba.org/index.php/DNS ? If not, most likely your zone-settings are wrong or some process is updating DNS but it would require keys to do it and options in smb.conf for it to work. –  Jani Karlsson Aug 11 '13 at 16:49
up vote 0 down vote accepted

The problem is because I didn't specify interfaces parameter in global section of smb.conf. It seems that Samba will automatically generate entry for each NIC. I re-provision the domain (since I've no idea how to update the ldb database) and the problem is solved.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.