LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   CentOs 7: DNS replication not refreshed (https://www.linuxquestions.org/questions/linux-server-73/centos-7-dns-replication-not-refreshed-4175609896/)

carlospopo123 07-15-2017 04:05 AM

CentOs 7: DNS replication not refreshed
 
Hi all,

I have a DNS CentOs 7 with Bind. Nothing else, just for testing purposes. The domain worldculturesweek.com has the glue ns1 and ns2 records pointing to my server IP wich is not behind NAT. All this is working fine.

The /var/named/worldculturesweek.com file contains:
Code:

$ttl 1800
@      IN      SOA    worldculturesweek.com. hostmaster.worldculturesweek.com. (
                        2017071401      ;Serial, todays date + todays serial #
                        1H              ;Refresh
                        1H              ;Retry
                        1W              ;Expire
                        1H              ;Minimum
)
;Nameservers
        IN    NS              ns1.worldculturesweek.com.
        IN    NS              ns2.worldculturesweek.com.

;Resolve Nameserver IPs
ns1    IN      A      82.163.78.33
ns2    IN      A      82.163.78.33

;Define hosts resolutions
@      IN      A      82.163.78.33  ;ns1
@      IN      A      82.163.78.33  ;ns2
mail    IN      A      82.163.78.33

MX records
worldculturesweek.com.    IN      MX      10      mail.worldculturesweek.com.

;CNAMEs
www    IN      CNAME  @

My issue is if I make any change and I also change the serial and run the command "rndc reload worldculturesweek.com" or "systemctl start named" and I run "dig worldculturesweek.com" it shows that the loaded file is the one I created when I intalled Bind, you can see the initial serial (2017071301).

Heres the output of the dig command:
Code:


; <<>> DiG 9.9.4-RedHat-9.9.4-50.el7_3.1 <<>> worldculturesweek.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64180
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;worldculturesweek.com.        IN      A

;; AUTHORITY SECTION:
worldculturesweek.com.  299    IN      SOA    worldculturesweek.com. webmaster\@worldculturesweek.com. 2017071301 600 60 86400 300

;; Query time: 27 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Jul 14 09:14:10 UTC 2017
;; MSG SIZE  rcvd: 114

It's like the named service doesn't reads the modified file. I know it is the right one because before it starts working I had a syntax issue and I edited this same file.

Any clues?. Thanks.

bathory 07-15-2017 04:43 PM

Quote:

; <<>> DiG 9.9.4-RedHat-9.9.4-50.el7_3.1 <<>> worldculturesweek.com
<-snip->
worldculturesweek.com. 299 IN SOA worldculturesweek.com. webmaster\@worldculturesweek.com. 2017071301 600 60 86400 300

;; Query time: 27 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Jul 14 09:14:10 UTC 2017
;; MSG SIZE rcvd: 114

It's like the named service doesn't reads the modified file. I know it is the right one because before it starts working I had a syntax issue and I edited this same file.
The answer you get is from google dns (8.8.8.8), that apparently didn't refresh your zone yet

Here is updated normally, as you can see:
Code:

dig worldculturesweek.com soa +short
worldculturesweek.com. hostmaster.worldculturesweek.com. 2017071502 3600 3600 604800 3600

Regards

carlospopo123 07-23-2017 05:47 AM

Thanks bathory
 
Thanks bathory.

After some days breaking my head I found the mistake.

I haven't commented the mail record comment, I forgot to start the line with ;

In all the cases thank you for your interest and answer.


All times are GMT -5. The time now is 05:20 PM.