LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   DNS... (https://www.linuxquestions.org/questions/linux-newbie-8/dns-4175460621/)

HP_Pants 05-03-2013 04:28 PM

DNS...
 
Hello

Very much a newbie, decided I could migrate to an unmanaged server to save money. I have managed to get everything up and running. Almost.

When I am logged in as root via SSH, I can run

dig ns1.hpturbo.com and get a good result


;; QUESTION SECTION:
;ns1.hpturbo.com. IN A

;; ANSWER SECTION:
ns1.hpturbo.com. 14400 IN A 204.12.208.82

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

;; ADDITIONAL SECTION:
ns2.hpturbo.com. 14400 IN A 204.12.208.82



when I am just using terminal via osx, I get a NXDOMAIN

I am trying to migrate to the new server while the old server is up-the old servers, which are managed, alerted me to this problem. I was able to access the server via browser and install oscommerce, but I didn't realize that this was because I was logged in as the root user via SSH. If I log in as root or admin, I can flush my browser cache and access the new site. If I exit ssh, I get the old site.

What am I doing? Or, more specifically, what am I doing wrong?

Let me know what else I need to post

Tnx

Brian

HP_Pants 05-03-2013 05:00 PM

to be completely clear:

via terminal:


Phaedras-MacBook-Pro:~ phaedra$ dig ns1.hpturbo.com

; <<>> DiG 9.6.0-APPLE-P2 <<>> ns1.hpturbo.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 40927
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;ns1.hpturbo.com. IN A

;; AUTHORITY SECTION:
hpturbo.com. 10800 IN SOA ns1.dreamhost.com. hostmaster.dreamhost.com. 2013050200 16269 1800 1814400 14400

;; Query time: 51 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Fri May 3 15:59:57 2013
;; MSG SIZE rcvd: 94





vs

logged in as admin, 204.12.208.82

[admin@server ~]$ dig ns1.hpturbo.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.4 <<>> ns1.hpturbo.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15515
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1

;; QUESTION SECTION:
;ns1.hpturbo.com. IN A

;; ANSWER SECTION:
ns1.hpturbo.com. 14400 IN A 204.12.208.82

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

;; ADDITIONAL SECTION:
ns2.hpturbo.com. 14400 IN A 204.12.208.82

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri May 3 17:00:19 2013
;; MSG SIZE rcvd: 97

Z038 05-03-2013 06:55 PM

Your server address is different in the two dig queries. The first one that got the non-existent domain response lists the server as 192.168.0.1. The second lists localhost (127.0.0.1). Is the DNS server really on 192.168.0.1? Or is that your gateway address?

Check the /etc/resolv.conf and see what nameservers are listed there.

HP_Pants 05-03-2013 07:38 PM

Quote:

Originally Posted by Z038 (Post 4944481)
Your server address is different in the two dig queries. The first one that got the non-existent domain response lists the server as 192.168.0.1. The second lists localhost (127.0.0.1). Is the DNS server really on 192.168.0.1? Or is that your gateway address?

Check the /etc/resolv.conf and see what nameservers are listed there.


192.168.0.1=router on home network?


/etc/resolv.conf


# Generated by NetworkManager
search hpturbo.com
nameserver 204.12.208.82
~

Z038 05-03-2013 10:18 PM

On a home network, the router is often either 192.168.0.1 or 192.168.1.1.

As root or as a regular user, I get a valid response from your nameserver:

Code:

root@here1:~# dig @204.12.208.82 ns1.hpturbo.com

; <<>> DiG 9.8.4-P2 <<>> @204.12.208.82 ns1.hpturbo.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54978
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;ns1.hpturbo.com.              IN      A

;; ANSWER SECTION:
ns1.hpturbo.com.        14400  IN      A      204.12.208.82

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

;; ADDITIONAL SECTION:
ns2.hpturbo.com.        14400  IN      A      204.12.208.82

;; Query time: 30 msec
;; SERVER: 204.12.208.82#53(204.12.208.82)
;; WHEN: Fri May  3 22:14:12 2013
;; MSG SIZE  rcvd: 97

root@here1:~# exit
exit
me@here1:/~$ dig @204.12.208.82 ns1.hpturbo.com

; <<>> DiG 9.8.4-P2 <<>> @204.12.208.82 ns1.hpturbo.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17233
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;ns1.hpturbo.com.              IN      A

;; ANSWER SECTION:
ns1.hpturbo.com.        14400  IN      A      204.12.208.82

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

;; ADDITIONAL SECTION:
ns2.hpturbo.com.        14400  IN      A      204.12.208.82

;; Query time: 17 msec
;; SERVER: 204.12.208.82#53(204.12.208.82)
;; WHEN: Fri May  3 22:14:37 2013
;; MSG SIZE  rcvd: 97


HP_Pants 05-04-2013 07:55 PM

well what is that about-I flushed my dns cache and I still get nxdomain

Z038 05-04-2013 11:27 PM

If you use dig or nslookup for ns1.hpturbo.com and point the lookup to your nameserver at 204.12.208.82, you'll get NOERROR. If you don't explicitly point to your nameserver, the dig or nslookup gets NXDOMAIN. This means that the root nameservers don't know how to find your nameserver at 204.12.208.82. They are finding a different nameserver for hpturbo.com that doesn't know about your ns1 and ns2 host names.

If I look for hpturbo.com without a host name, I get back two different IP addresses.

Code:

nslookup hpturbo.com
Server:        127.0.0.1
Address:        127.0.0.1#53

Non-authoritative answer:
Name:  hpturbo.com
Address: 64.90.58.29
Name:  hpturbo.com
Address: 204.12.208.82

Now lets turn on debug and look for www.hpturbo.com

Code:

nslookup
> set debug
> www.hpturbo.com
Server:        127.0.0.1
Address:        127.0.0.1#53

------------
    QUESTIONS:
        www.hpturbo.com, type = A, class = IN
    ANSWERS:
    ->  www.hpturbo.com
        internet address = 64.90.58.29
        ttl = 10960
    AUTHORITY RECORDS:
    ->  hpturbo.com
        nameserver = ns2.dreamhost.com.
        ttl = 64032
    ->  hpturbo.com
        nameserver = ns3.dreamhost.com.
        ttl = 64032
    ->  hpturbo.com
        nameserver = ns1.dreamhost.com.
        ttl = 64032
    ADDITIONAL RECORDS:
    ->  ns1.dreamhost.com
        internet address = 66.33.206.206
        ttl = 129162
    ->  ns2.dreamhost.com
        internet address = 208.96.10.221
        ttl = 129162
    ->  ns3.dreamhost.com
        internet address = 66.33.216.216
        ttl = 129162
------------
Non-authoritative answer:
Name:  www.hpturbo.com
Address: 64.90.58.29

Now lets turn on debug and look for ns1.hpturbo.com

Code:

nslookup
> set debug
> ns1.hpturbo.com
Server:        127.0.0.1
Address:        127.0.0.1#53

------------
    QUESTIONS:
        ns1.hpturbo.com, type = A, class = IN
    ANSWERS:
    AUTHORITY RECORDS:
    ->  hpturbo.com
        origin = ns1.dreamhost.com
        mail addr = hostmaster.dreamhost.com
        serial = 2013050200
        refresh = 16269
        retry = 1800
        expire = 1814400
        minimum = 14400
        ttl = 7340
    ADDITIONAL RECORDS:
------------
** server can't find ns1.hpturbo.com: NXDOMAIN
Server:        127.0.0.1
Address:        127.0.0.1#53

Now repeat the lookup for ns1.hpturbo.com, but this time point to your nameserver at 204.12.208.82.

Code:

nslookup
> server 204.12.208.82
Default server: 204.12.208.82
Address: 204.12.208.82#53
> set debug
> ns1.hpturbo.com
Server:        204.12.208.82
Address:        204.12.208.82#53

------------
    QUESTIONS:
        ns1.hpturbo.com, type = A, class = IN
    ANSWERS:
    ->  ns1.hpturbo.com
        internet address = 204.12.208.82
        ttl = 14400
    AUTHORITY RECORDS:
    ->  hpturbo.com
        nameserver = ns2.hpturbo.com.
        ttl = 14400
    ->  hpturbo.com
        nameserver = ns1.hpturbo.com.
        ttl = 14400
    ADDITIONAL RECORDS:
    ->  ns2.hpturbo.com
        internet address = 204.12.208.82
        ttl = 14400
------------
Name:  ns1.hpturbo.com
Address: 204.12.208.82

The ns1, ns2, ns3 nameservers at dreamhost.com don't know about ns1.hpturbo.com or ns2.hpturbo.com. Only your nameservers at 204.12.208.82 know about those host and domain names.

This is a guess. When you are "logged in as root via SSH", I presume you mean that you are logged in to 204.12.208.82, the system that hosts your new nameservers, and that your resolv.conf on that system specifies nameserver 204.12.208.82. And when you do the lookup from a terminal window on your Macbook, your resolv.conf points to 192.168.0.1, the router and internet gateway on your home network, which forwards the DNS request to your ISPs DNS servers (or whatever you have specified in the configuration). When your lookup takes that path, it is hitting the dreamserver.com nameservers, not your new ns1/ns2.hpturbo.com nameservers on 204.12.208.82.

Does that sound possible?

HP_Pants 05-05-2013 11:14 AM

Quote:

Originally Posted by Z038 (Post 4945124)
If you use dig or nslookup for ns1.hpturbo.com and point the lookup to your nameserver at 204.12.208.82, you'll get NOERROR. If you don't explicitly point to your nameserver, the dig or nslookup gets NXDOMAIN. This means that the root nameservers don't know how to find your nameserver at 204.12.208.82. They are finding a different nameserver for hpturbo.com that doesn't know about your ns1 and ns2 host names.

If I look for hpturbo.com without a host name, I get back two different IP addresses.

Code:

nslookup hpturbo.com
Server:        127.0.0.1
Address:        127.0.0.1#53

Non-authoritative answer:
Name:  hpturbo.com
Address: 64.90.58.29
Name:  hpturbo.com
Address: 204.12.208.82

Now lets turn on debug and look for www.hpturbo.com

Code:

nslookup
> set debug
> www.hpturbo.com
Server:        127.0.0.1
Address:        127.0.0.1#53

------------
    QUESTIONS:
        www.hpturbo.com, type = A, class = IN
    ANSWERS:
    ->  www.hpturbo.com
        internet address = 64.90.58.29
        ttl = 10960
    AUTHORITY RECORDS:
    ->  hpturbo.com
        nameserver = ns2.dreamhost.com.
        ttl = 64032
    ->  hpturbo.com
        nameserver = ns3.dreamhost.com.
        ttl = 64032
    ->  hpturbo.com
        nameserver = ns1.dreamhost.com.
        ttl = 64032
    ADDITIONAL RECORDS:
    ->  ns1.dreamhost.com
        internet address = 66.33.206.206
        ttl = 129162
    ->  ns2.dreamhost.com
        internet address = 208.96.10.221
        ttl = 129162
    ->  ns3.dreamhost.com
        internet address = 66.33.216.216
        ttl = 129162
------------
Non-authoritative answer:
Name:  www.hpturbo.com
Address: 64.90.58.29

Now lets turn on debug and look for ns1.hpturbo.com

Code:

nslookup
> set debug
> ns1.hpturbo.com
Server:        127.0.0.1
Address:        127.0.0.1#53

------------
    QUESTIONS:
        ns1.hpturbo.com, type = A, class = IN
    ANSWERS:
    AUTHORITY RECORDS:
    ->  hpturbo.com
        origin = ns1.dreamhost.com
        mail addr = hostmaster.dreamhost.com
        serial = 2013050200
        refresh = 16269
        retry = 1800
        expire = 1814400
        minimum = 14400
        ttl = 7340
    ADDITIONAL RECORDS:
------------
** server can't find ns1.hpturbo.com: NXDOMAIN
Server:        127.0.0.1
Address:        127.0.0.1#53

Now repeat the lookup for ns1.hpturbo.com, but this time point to your nameserver at 204.12.208.82.

Code:

nslookup
> server 204.12.208.82
Default server: 204.12.208.82
Address: 204.12.208.82#53
> set debug
> ns1.hpturbo.com
Server:        204.12.208.82
Address:        204.12.208.82#53

------------
    QUESTIONS:
        ns1.hpturbo.com, type = A, class = IN
    ANSWERS:
    ->  ns1.hpturbo.com
        internet address = 204.12.208.82
        ttl = 14400
    AUTHORITY RECORDS:
    ->  hpturbo.com
        nameserver = ns2.hpturbo.com.
        ttl = 14400
    ->  hpturbo.com
        nameserver = ns1.hpturbo.com.
        ttl = 14400
    ADDITIONAL RECORDS:
    ->  ns2.hpturbo.com
        internet address = 204.12.208.82
        ttl = 14400
------------
Name:  ns1.hpturbo.com
Address: 204.12.208.82

The ns1, ns2, ns3 nameservers at dreamhost.com don't know about ns1.hpturbo.com or ns2.hpturbo.com. Only your nameservers at 204.12.208.82 know about those host and domain names.

This is a guess. When you are "logged in as root via SSH", I presume you mean that you are logged in to 204.12.208.82, the system that hosts your new nameservers, and that your resolv.conf on that system specifies nameserver 204.12.208.82. And when you do the lookup from a terminal window on your Macbook, your resolv.conf points to 192.168.0.1, the router and internet gateway on your home network, which forwards the DNS request to your ISPs DNS servers (or whatever you have specified in the configuration). When your lookup takes that path, it is hitting the dreamserver.com nameservers, not your new ns1/ns2.hpturbo.com nameservers on 204.12.208.82.

Does that sound possible?

Makes perfect sense-I only ask because I have received some pretty questionable tech support from my old hosts, Dreamhost. I have been told that you can't change the nameservers at Dreamhost, which is insane, and I have been told basically that the nameserver verification for ns1.hpturbo.com and ns2.hpturbo.com failed, so the nameserver transfer failed on Dreamhost's end. The problem is, the tech, or whoever, told me "Look, see for yourself: dig ns1.hpturbo.com. No results. Doesn't work."

Being a noob, I believed this advice, not knowing how else/where else to look. I deleted everything out of my new servers and I went through the entire process of creating a domain, etc., via directadmin again, and because I get the same results that I have been advised were indicative of failure, I wondered what I was doing wrong.

It sounds like what you are telling me is that everything seems to be configured correctly, if I change the nameservers at Dreamhost, everything may work correctly. When the DNS change propogates, a dig search will yield exactly what I am (incorrectly) looking for?

Z038 05-05-2013 02:28 PM

Yes, if you delete all your hpturbo.com DNS records from the Dreamhost nameservers, your new nameserver will be the only one answering for hpturbo.com, and all hosts you define will be found. That's assuming your new nameservers are configured correctly. Be sure to include the reverse pointers (e.g., assuming that 204.12.208.82 is your only IP address, netmask 255.255.255.255, then 82.208.12.204.in-addr.arpa. is the reverse pointer).

HP_Pants 05-05-2013 03:20 PM

Quote:

Originally Posted by Z038 (Post 4945515)
Yes, if you delete all your hpturbo.com DNS records from the Dreamhost nameservers, your new nameserver will be the only one answering for hpturbo.com, and all hosts you define will be found. That's assuming your new nameservers are configured correctly. Be sure to include the reverse pointers (e.g., assuming that 204.12.208.82 is your only IP address, netmask 255.255.255.255, then 82.208.12.204.in-addr.arpa. is the reverse pointer).

Insane-you cannot change your nameservers for dreamhost! They will ALWAYS be ns1.dreamhost.com/ns2 same. ALWAYS. What the hell?

Transferring out of Dreamhost as we speak.

Their customer support is god awful-NO ONE but one person knew this was the problem. Pretty much everyone said "wait for the DNS change to propogate." One person said "dig ns1.hpturbo.com is a bad nameserver," and finally, I'm told "no custom DNS entries evar."

Incredible.

edit: for clarity, I was told that I could not change my nameservers because no one can do this at dreamhost. That seemed dumb, so I asked someone else. They said my nameserver changes just take a while. Then someone at dreamhost said "oh, your changes to the nameservers were rejected because there is nothing at ns1.hpturbo.com-dig ns1.hpturbo.com yourself to see." So I went to this forum to try to fix the 'error.'

Now, I am back to "no one can change nameservers at dreamhost."


All times are GMT -5. The time now is 03:29 AM.