HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   DNS - subdomains not working ! (http://www.howtoforge.com/forums/showthread.php?t=60078)

tahunasky 1st January 2013 02:52

DNS - subdomains not working !
 
Hi,
I am trying to get sub domains to work in ISPConfig.

The predefined mail. and www. work perfectly, however if i add cloud. as an A or CNAME record to my DNS entries it will work for a while - maybe be a day, or only an hour or 2 - then it stops working, and will only work again if i do something within the DNS settings - change, add, delete... but mail and www are not effected at all.. they work fine the whole time...

Here is the output/configs:

/var/named/pri.mydomain.com
Quote:

$TTL 3600
@ IN SOA ns1.mydomain.com. postmaster.mydomain.com. (
2012123102 ; serial, todays date + todays serial #
7200 ; refresh, seconds
540 ; retry, seconds
604800 ; expire, seconds
86400 ) ; minimum, seconds
;

mydomain.com. 3600 A 10.0.0.6
mydomain.com. 3600 MX 10 mail.mydomain.com.
mydomain.com. 3600 NS ns1.mydomain.com.
cloud 3600 A 10.0.0.6
mail 3600 A 10.0.0.6
ns1 86400 A 10.0.0.6
www 3600 A 10.0.0.6
dig output from the server:
Quote:

[root@kia ~]# dig cloud.mydomain.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.3 <<>> cloud.mydomain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34154
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;cloud.mydomain.com. IN A

;; ANSWER SECTION:
cloud.mydomain.com. 3600 IN A 10.0.0.6

;; AUTHORITY SECTION:
mydomain.com. 3600 IN NS ns1.mydomain.com.

;; ADDITIONAL SECTION:
ns1.mydomain.com. 86400 IN A 10.0.0.6

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Jan 1 14:26:53 2013
;; MSG SIZE rcvd: 95

[root@kia ~]#

[root@kia ~]# dig mail.mydomain.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.3 <<>> mail.mydomain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10065
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;mail.mydomain.com. IN A

;; ANSWER SECTION:
mail.mydomain.com. 3600 IN A 10.0.0.6

;; AUTHORITY SECTION:
mydomain.com. 3600 IN NS ns1.mydomain.com.

;; ADDITIONAL SECTION:
ns1.mydomain.com. 86400 IN A 10.0.0.6

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Jan 1 14:27:14 2013
;; MSG SIZE rcvd: 94

[root@kia ~]#
nslookup from windows PC:
Quote:

C:\Users\user1>nslookup cloud.mydomain.com
Server: UnKnown
Address: 10.0.0.6

Name: cloud.mydomain.com
Address: 10.0.0.6


C:\Users\user1>nslookup mail.mydomain.com
Server: UnKnown
Address: 10.0.0.6

Name: mail.mydomain.com
Address: 10.0.0.6


C:\Users\user1>
The problem happens with all 3 domains i have on the server.
I have had it working fine with dnsmasq on the previous server setup.
It makes no difference if i am using firefox or chrome.

If i edit the HOST file on the PC and add 10.0.0.6 cloud.mydomain.com it works fine, so its not a problem with apache.
If i do a DIG on the server it starts working - sometimes.

I am using CentOS 6.3 and ISPConfig 3.4.6.

Any ideas what is causing this and how to fix it ?

till 1st January 2013 14:44

The most likely reason is that your primary and secondary dns are not in sync. Test them both with the dig command to see if the secondary dns is in sync:

dig @ns2.mydomain.com cloud.mydomain.com

tahunasky 3rd January 2013 04:06

There is no secondary NS, as its only on an internal network at the moment for testing.

This is really annoying, as i havent touched the DNS records for 2 days now, but yesterday it all worked for a while (checked around midday), then lastnight and this morning i couldnt access cloud.mydomain.com again.

Then i play around with the DNS.. Just add a CNAME record, and its all working again.

But i dont understand why mail. and www. always work.


All times are GMT +2. The time now is 08:33.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.