DNS Issues

Mopquill

Verified User
Joined
Oct 1, 2009
Messages
21
I seem to be having some sort of problem with my DNS. I'm almost certain I set everything up correctly. It was working on my old VPS, and now that I'm on a different machine (different IPs), it doesn't seem to be. I ran the IP-changing script in /usr/local/directadmin/scripts/ , and my IP seems to be right everywhere it needs to be.

I imagine some setting is wrong. I appreciate any help I can get. Let me know what information you need and I'll post it.

Check this to see the problem I'm seeing: http://www.intodns.com/emulysianfields.com
 
The errors are very specific. Since you didn't tell us your old IP#s and your new one's it's impossible to check further.

Jeff
 
Ah, sorry. My old IPs were:

ns1.emulysianfields.com - 216.244.65.187
ns2.emulysianfields.com - 216.244.65.188

The new ones are:

ns1.emulysianfields.com - 64.120.5.242
ns2.emulysianfields.com - 64.120.5.253

Sorry. I've had so much information in my head, I couldn't think of what I needed to post. Again, if you need anything else, please let me know. And thanks for taking the time. :)
 
Rather than try to do anything manually, I re-copied my directadmin settings per this thread, and then ran ipswap.sh .

Now, when I click "IP Management" the status says "Error". I'm more confident that my other settings are correct. My instinct would be to edit the files in /usr/local/directadmin/data/admin/ips/ to have what they should, but, manual-editing seems to break DA stuff, so, I'll await further instruction.

All of my A/NS records appear to be in order though, aside from the nameservers themselves being missing from the Reseller > Nameservers. I don't know if I can "add" nameservers to error'd IP addresses, and I'm not sure if I should try.

Any help would be much appreciated, I'm at wit's end, and I don't know enough. I've been searching Google and this site for the past 72 hours or so.
 
Maybe you can better contact DirectAdmin Staff, for the 'Error'. Or wait until they post here
I don't know how. I have a VPS, and all I have from my host is my license info so I could get everything set up. I'll look around for it though. If I do figured this out, I'll post here so I can hopefully help someone else with this problem. :p
 
(I'll still take any help I can get, no answer from the email yet, and I sent it shortly after posting here)
 
Hello,

1) Any "Error" in the Admin Level -> IP Manager would be caused by failure to read in the ip file.

- check /usr/local/directadmin/data/admin/ip.list, ensure your IPs are listed correctly there.
- check /usr/local/directadmin/data/admin/ips/1.2.3.4 for each IP to ensure that the IP file exists. In those files should be a "status" value. There should only be 1 "status=server". The rest should be "status=owned", "status=shared", or "status=free".. with variations of each values depend on the use.

2) As for 1.36.0, there is a bug in the ipswap.sh where it's not swapping the new multi-ip files. An update ipswap.sh is here, which can be updated as follows, followed by running the ipswap.sh script again.
Code:
cd /usr/local/directadmin/scripts
wget -O ipswap.sh http://files.directadmin.com/services/all/ipswap.sh

3) As for the domain itself, I'm seeing this error
Code:
DNS servers responded	ERROR: One or more of your nameservers did not respond:
The ones that did not responded are:
64.120.5.253 64.120.5.242
which is basically saying that those IPs are not responding to any dns requests. This could mean the IPs don't exist on your server, named isn't running, or there is a firewall blocking port 53. Often the firewall is to blame, so try:
Code:
/sbin/service ipstables stop
/sbin/chkconfig iptables off
to ensure iptables isn't blocking port 53.

John
 
As per your email, I checked /sbin/ifconfig. The IPs appear to be there for me.

Code:
# /sbin/ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:138 errors:0 dropped:0 overruns:0 frame:0
          TX packets:138 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:11432 (11.1 KiB)  TX bytes:11432 (11.1 KiB)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00                                                                             -00
          inet addr:127.0.0.1  P-t-P:127.0.0.1  Bcast:0.0.0.0  Mask:255.255.255.                                                                             255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:438861 errors:0 dropped:0 overruns:0 frame:0
          TX packets:632929 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:35745756 (34.0 MiB)  TX bytes:301301486 (287.3 MiB)

venet0:0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00                                                                             -00
          inet addr:64.120.5.242  P-t-P:64.120.5.242  Bcast:64.120.5.242  Mask:2                                                                             55.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1

venet0:1  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00                                                                             -00
          inet addr:64.120.5.253  P-t-P:64.120.5.253  Bcast:64.120.5.253  Mask:2                                                                             55.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1


/usr/local/directadmin/data/admin/ip.list:
Code:
64.120.5.242
64.120.5.253

Code:
# ls /usr/local/directadmin/data/admin/ips/
64.120.5.242  64.120.5.253

Code:
nano /usr/local/directadmin/data/admin/ips/*

Contents of 64.120.5.242:
Code:
gateway=
netmask=
ns=ns1.emulysianfields.com
reseller=
status=server
value=2

Contents of 64.120.5.253 (my username removed):
Code:
gateway=
netmask=255.255.255.248
ns=ns2.emulysianfields.com
reseller=xxx
status=free
value=

I've tried editing this manually before (and got them to display correctly in DA), to fix them, but, I'm afraid to do that this time, so, again, I'll wait until someone tells me what is correct.

Here's the next steps you mentioned, though I removed my username, and the domain names that aren't emulysianfields.com or the host from the output. I don't think this hinders anything, but, if it does, I can email you the full output:
Code:
[xxx@sonata scripts]# cd /usr/local/directadmin/scripts
[xxx@sonata scripts]# wget -O ipswap.sh http://files.directadmin.com/services/all/ipswap.sh
--2010-08-31 17:45:39--  http://files.directadmin.com/services/all/ipswap.sh
Resolving files.directadmin.com... 72.35.85.222
Connecting to files.directadmin.com|72.35.85.222|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2329 (2.3K) [application/x-sh]
Saving to: `ipswap.sh'

100%[===================================================================================================================>] 2,329       --.-K/s   in 0.001s

2010-08-31 17:45:40 (3.63 MB/s) - `ipswap.sh' saved [2329/2329]

[xxx@sonata scripts]# ./ipswap.sh 216.244.65.187 64.120.5.242
/usr/local/directadmin/data/admin/ips/216.244.65.187 does not exist.  Do you want to continue anyway? (y/n) : y
/etc/httpd/conf/httpd.conf      : 216.244.65.187 -> 64.120.5.242
/etc/httpd/conf/extra/httpd-vhosts.conf : 216.244.65.187 -> 64.120.5.242
/etc/httpd/conf/ips.conf        : 216.244.65.187 -> 64.120.5.242
/etc/proftpd.conf       : 216.244.65.187 -> 64.120.5.242
/etc/proftpd.vhosts.conf        : 216.244.65.187 -> 64.120.5.242
/etc/hosts      : 216.244.65.187 -> 64.120.5.242
/usr/local/directadmin/scripts/setup.txt        : 216.244.65.187 -> 64.120.5.242
/usr/local/directadmin/data/admin/ip.list       : 216.244.65.187 -> 64.120.5.242
/usr/local/directadmin/data/admin/show_all_users.cache  : 216.244.65.187 -> 64.120.5.242
ls: /usr/local/directadmin/data/users/users: No such file or directory
/var/named/xxx.db      : 216.244.65.187 -> 64.120.5.242
/var/named/xxx.db        : 216.244.65.187 -> 64.120.5.242
/var/named/xxx.db    : 216.244.65.187 -> 64.120.5.242
/var/named/emulysianfields.com.db       : 216.244.65.187 -> 64.120.5.242
/var/named/xxx.db    : 216.244.65.187 -> 64.120.5.242
/var/named/xxx.db      : 216.244.65.187 -> 64.120.5.242
/var/named/xxx.db     : 216.244.65.187 -> 64.120.5.242
/var/named/xxx.db     : 216.244.65.187 -> 64.120.5.242
/var/named/xxx.db     : 216.244.65.187 -> 64.120.5.242
/var/named/xxx.db      : 216.244.65.187 -> 64.120.5.242
/var/named/xxx.db     : 216.244.65.187 -> 64.120.5.242
/var/named/xxx.db       : 216.244.65.187 -> 64.120.5.242
/var/named/sonata.emulysianfields.com.db        : 216.244.65.187 -> 64.120.5.242
/var/named/xxx.co.cc.db      : 216.244.65.187 -> 64.120.5.242
/var/named/xxx.db  : 216.244.65.187 -> 64.120.5.242
/var/named/xxx.db      : 216.244.65.187 -> 64.120.5.242
/var/named/xxx.db  : 216.244.65.187 -> 64.120.5.242

*** Done swapping 216.244.65.187 to 64.120.5.242 ***

[xxx@sonata scripts]# ./ipswap.sh 216.244.65.188 64.120.5.253
/usr/local/directadmin/data/admin/ips/216.244.65.188 does not exist.  Do you want to continue anyway? (y/n) : y
/etc/httpd/conf/httpd.conf      : 216.244.65.188 -> 64.120.5.253
/etc/httpd/conf/extra/httpd-vhosts.conf : 216.244.65.188 -> 64.120.5.253
/etc/httpd/conf/ips.conf        : 216.244.65.188 -> 64.120.5.253
/etc/proftpd.conf       : 216.244.65.188 -> 64.120.5.253
/etc/proftpd.vhosts.conf        : 216.244.65.188 -> 64.120.5.253
/etc/hosts      : 216.244.65.188 -> 64.120.5.253
/usr/local/directadmin/scripts/setup.txt        : 216.244.65.188 -> 64.120.5.253
/usr/local/directadmin/data/admin/ip.list       : 216.244.65.188 -> 64.120.5.253
/usr/local/directadmin/data/admin/show_all_users.cache  : 216.244.65.188 -> 64.120.5.253
ls: /usr/local/directadmin/data/users/users: No such file or directory
/var/named/xxx.db      : 216.244.65.188 -> 64.120.5.253
/var/named/xxx.db        : 216.244.65.188 -> 64.120.5.253
/var/named/xxx.db    : 216.244.65.188 -> 64.120.5.253
/var/named/emulysianfields.com.db       : 216.244.65.188 -> 64.120.5.253
/var/named/xxx.db    : 216.244.65.188 -> 64.120.5.253
/var/named/xxx.db      : 216.244.65.188 -> 64.120.5.253
/var/named/xxx.db     : 216.244.65.188 -> 64.120.5.253
/var/named/xxx.db     : 216.244.65.188 -> 64.120.5.253
/var/named/xxx.db     : 216.244.65.188 -> 64.120.5.253
/var/named/xxx.db      : 216.244.65.188 -> 64.120.5.253
/var/named/xxx.db     : 216.244.65.188 -> 64.120.5.253
/var/named/xxx.db       : 216.244.65.188 -> 64.120.5.253
/var/named/sonata.emulysianfields.com.db        : 216.244.65.188 -> 64.120.5.253
/var/named/xxx.db      : 216.244.65.188 -> 64.120.5.253
/var/named/xxx.db  : 216.244.65.188 -> 64.120.5.253
/var/named/xxx.db      : 216.244.65.188 -> 64.120.5.253
/var/named/xxx.db  : 216.244.65.188 -> 64.120.5.253

*** Done swapping 216.244.65.188 to 64.120.5.253 ***

This could mean the IPs don't exist on your server
As far as I can tell from ifconfig above, they do. Right?

named isn't running
According to the Service Monitor in DA: named named (pid 3299 )

And:
Code:
[xxx@sonata scripts]# ps aux | grep named
named     3299  0.0  0.5  70808  4124 ?        Ssl  05:07   0:13 named -u named
xxx     13401  0.0  0.0   3188   748 pts/0    S+   17:55   0:00 grep named

This could mean the IPs don't exist on your server, named isn't running, or there is a firewall blocking port 53.
I did not think to check that! I'm still learning linux, I thought iptables was more like some sort of routing thing.

I figured your first line was a typo, but, I tried it just in case. It didn't work, so, I took out the "s" (The idea of horses having something to do with IPs amuses me, though).

Code:
[xxx@sonata scripts]# /sbin/service ipstables stop
ipstables: unrecognized service
[xxx@sonata scripts]# /sbin/service iptables stop
Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: mangle filter nat         [  OK  ]
Unloading iptables modules:                                [  OK  ]
[xxx@sonata scripts]# /sbin/chkconfig iptables off

Hopefully that was it, but, the IPs are still showing up as error'd in IP Management and Reseller level > Nameservers . I *think* I could fix them, but I don't know if the correct thing to do would be to edit the files in /usr/local/directadmin/data/admin/ips/ to what I think they should have or not. From the ifconfig output, I think the subnet masks should be 255.255.255.255 , but I wouldn't know what to change value, reseller, or gateway to.

Thanks very much for your help, John. =]
 
[root@super ~]# dig @64.120.5.253 emulysianfields.com

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> @64.120.5.253 emulysianfields.com
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 51062
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;emulysianfields.com. IN A

;; Query time: 82 msec
;; SERVER: 64.120.5.253#53(64.120.5.253)
;; WHEN: Tue Aug 31 11:24:12 2010
;; MSG SIZE rcvd: 37

Its like you have not added your domain to the nameserver on 64.120.5.253.

Firewall is not the issue:

[root@super ~]# nmap 64.120.5.253

Starting Nmap 5.00 ( http://nmap.org ) at 2010-08-31 11:23 EDT
Interesting ports on 64-120-5-253.rdns.hostmist.com (64.120.5.253):
Not shown: 988 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
53/tcp open domain
80/tcp open http
110/tcp open pop3
143/tcp open imap
443/tcp open https
587/tcp open submission
993/tcp open imaps
995/tcp open pop3s
3306/tcp open mysql

Nmap done: 1 IP address (1 host up) scanned in 4.78 seconds
 
Its like you have not added your domain to the nameserver on 64.120.5.253.

Firewall is not the issue:
Hey! I appreciate you checking that stuff! I was actually thinking that debugging would be a bit easier if I had another box. :)

Anyhow, is that after I've done troubleshooting here? [EDIT] Whoops, didn't see the timestamp there. It would appear that was done after the changes above, so, I suspect my firewall would be off, and my nameservers would be misconfigured. [/EDIT]Because if so, my nameservers are currently in "Error" status, as that is where all these steps have left me, and since I shut iptables off by both service and chkconfig, I imagine my firewall would be off now. It *was* on though, as it had to be shutdown, as you can see from the output above. If memory serves, chkconfig stops it from starting up in the future, as well.

Should I try fixing the nameservers by putting certain values in the files in /usr/local/directadmin/data/admin/ips/ ? Also, isn't haveing my firewall off dangerous, at least in production? If so, I'd want to turn it back on, so, how would I allow port 53 (or any ports for that matter) through it?
 
It appears you have not added emulysianfields.com via DirectAdmin yet.

Check:
/etc/named.conf
/var/named/emulysianfields.com.db

Also, isn't haveing my firewall off dangerous, at least in production?

I am not going to comment on that because my opinion is completely contrary to everybody else. Research KISS on these forums.
 
It appears you have not added emulysianfields.com via DirectAdmin yet.

Check:
/etc/named.conf
/var/named/emulysianfields.com.db
emulysianfields.com.db is linked to in named.conf , but as I said, there are still errors on the DA nameservers and IP page.

/etc/named.conf (irrelevant domains removed)
Code:
// generated by named-bootconf.pl

options {
        directory "/var/named";
        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
        // query-source address * port 53;

        allow-transfer { none; };
        allow-recursion { localnets; };
};

//
// a caching only nameserver config
//
controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
        type hint;
        file "named.ca";
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};

include "/etc/rndc.key";

zone "sonata.emulysianfields.com" { type master; file "/var/named/sonata.emulysianfields.com.db"; };
zone "emulysianfields.com" { type master; file "/var/named/emulysianfields.com.db"; };
Might I need to un-comment that query-source line so that it knows to use 53?


/var/named/emulysianfields.com.db (irrelevant sub-domains removed)
Code:
$TTL 14400
@       IN      SOA     ns1.emulysianfields.com.      hostmaster.emulysianfields.com. (
                                                2010083103
                                                14400
                                                3600
                                                1209600
                                                86400 )

emulysianfields.com.    14400   IN      NS      ns1.emulysianfields.com.
emulysianfields.com.    14400   IN      NS      ns2.emulysianfields.com.

emulysianfields.com.    14400   IN      A       64.120.5.242
ftp     14400   IN      A       64.120.5.242
localhost       14400   IN      A       127.0.0.1
mail    14400   IN      A       64.120.5.242
ns1.emulysianfields.com.        14400   IN      A       64.120.5.242
ns2.emulysianfields.com.        14400   IN      A       64.120.5.253
pop     14400   IN      A       64.120.5.242
smtp    14400   IN      A       64.120.5.242
www     14400   IN      A       64.120.5.242

emulysianfields.com.    14400   IN      MX      10 mail



emulysianfields.com.    14400   IN      TXT     "v=spf1 a mx ip4:64.120.5.242 ~all"

Like I said, I'm reluctant to mess with the files in /ips/ lest I break something, or do something wrong.

I am not going to comment on that because my opinion is completely contrary to everybody else. Research KISS on these forums.
I have done this now. It does not look like something I'd be interested in. My old VPS didn't have a firewall at all, and I was fine, and I was told by someone that I respect that if you do everything right, you won't need a firewall. I was on a server with CSF at once point, and everything was a pain to do. I just figured I'd ask if I was in any danger by leaving iptables off like that.
 
What do you get with:

Code:
dig @localhost emulysianfields.com
 
restart named
What do you get with:

Code:
dig @localhost emulysianfields.com
Code:
[xxx@sonata scripts]# /etc/init.d/named restart
Stopping named:                                            [  OK  ]
Starting named:                                            [  OK  ]
[xxx@sonata scripts]# dig @localhost emulysianfields.com

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> @localhost emulysianfields.com
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 40535
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;emulysianfields.com.           IN      A

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Aug 31 20:47:24 2010
;; MSG SIZE  rcvd: 37
 
Your local nameserver doesn't host the zone file for emulysianfields.com. Why? I have no idea.

Check to make sure your zone file is in the right place, and is syntactically correct, and is listed in your /etc/named.conf file.

Tail your /var/log/messages file while restarting BIND to see if you've got any errors related to the domain name.

Jeff
 
Your local nameserver doesn't host the zone file for emulysianfields.com. Why? I have no idea.

Check to make sure your zone file is in the right place, and is syntactically correct, and is listed in your /etc/named.conf file.

Tail your /var/log/messages file while restarting BIND to see if you've got any errors related to the domain name.

Jeff
I see.

Didn't I post both above? They seem okay to me.

Ah, good advice. I didn't know what tail was, but, it seems to tell me the last 10 lines of a file. That was the right idea though, there seems to be a lot of lines like this:

Aug 31 23:48:56 sonata named[15976]: zone emulysianfields.com/IN: loading master file /var/named/emulysianfields.com.db: permission denied

What permissions should those files have, and what user should they belong to?
 
How's this look? :D

Code:
[xxx@sonata scripts]# dig @localhost emulysianfields.com

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> @localhost emulysianfields.com
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8585
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;emulysianfields.com.           IN      A

;; ANSWER SECTION:
emulysianfields.com.    14400   IN      A       64.120.5.242

;; AUTHORITY SECTION:
emulysianfields.com.    14400   IN      NS      ns2.emulysianfields.com.
emulysianfields.com.    14400   IN      NS      ns1.emulysianfields.com.

;; ADDITIONAL SECTION:
ns1.emulysianfields.com. 14400  IN      A       64.120.5.242
ns2.emulysianfields.com. 14400  IN      A       64.120.5.253

;; Query time: 16 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Aug 31 23:58:56 2010
;; MSG SIZE  rcvd: 121

I did a chown -hR named:named /var/named

That actually appears to have fixed the server. My sites seem to be online now. :D

I'm going to try messing with those IP files to get directadmin to display properly, and then restart everything, but, I should be good.

Thanks very, veru much to DA Support, floyd, and jlasman. I appreciate you guys taking out the time to help a linux newbie like me. =]
 
I've still got a few issues here and there, but, I should be able to fix everything. The NSes are up. Thanks for that excellent advice, jlasman. :D

If anyone with similar problems wants to know anything I may have left out, PM me. =]
 
Back
Top