Configured bind on your server by this instruction

At first everything was fine, but then it stopped working normally. Now, when I do ping, it says to me that the domain lies with me locally, that is, it gives out 127.0.0.1.

In the browser, the domain opens, but the wrong page that lies on the server is just empty.

I open it on my laptop.

Contents of the /etc/resolv.conf file

# # Mac OS X Notice # # This file is not used by the host name and address resolution # or the DNS query routing mechanisms used by most processes on # this Mac OS X system. # # This file is automatically generated. # nameserver 192.168.0.1 

The / etc / hosts file is too big, but there definitely isn’t my domain or ip address

running on the server tcpdump -nn 'port 53' get

 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes 13:32:20.573548 IP 74.125.46.5.60391 > 5.9.39.171.53: 36322 [1au] AAAA? w4u.com.ua. (50) 13:32:20.573740 IP 5.9.39.171.53 > 74.125.46.5.60391: 36322* 0/1/1 (85) 13:32:21.054549 IP 74.125.46.7.48455 > 5.9.39.171.53: 3169 [1au] MX? w4u.com.ua. (50) 13:32:21.054743 IP 5.9.39.171.53 > 74.125.46.7.48455: 3169* 0/1/1 (85) 13:33:03.815489 IP 74.125.46.11.63214 > 5.9.39.171.53: 16086 [1au] AAAA? w4u.com.ua. (39) 13:33:03.815678 IP 5.9.39.171.53 > 74.125.46.11.63214: 16086* 0/1/1 (85) 13:33:03.937458 IP 74.125.46.10.34917 > 5.9.39.171.53: 60364 [1au] MX? w4u.com.ua. (50) 13:33:03.937631 IP 5.9.39.171.53 > 74.125.46.10.34917: 60364* 0/1/1 (85) 13:33:26.736812 IP 5.9.39.171.10641 > 8.8.8.8.53: 58998+% [1au] PTR? 188.198.175.61.in-addr.arpa. (56) 13:33:26.751585 IP 8.8.8.8.53 > 5.9.39.171.10641: 58998 NXDomain 0/1/1 (113) 

running the command on the laptop host w4u.com.ua get

 w4u.com.ua has address 127.0.0.1 

although running the command on another server I received the correct ip

  • specify (directly in the question) on which computer you are running the ping ... command ping ... list the contents of /etc/resolv.conf , /etc/hosts on this computer, and the result of the $ hostname and $ hostname --fqdn on the same computer. - aleksandr barakin
  • @Diefair, "nameserver 192.168.0.1" is whose address? Probably from him well to you and not that address is given? - MAN69
  • Um, in tcpdump there should be another entry "A? W4u.com.ua". Do you have no entries for w4u.com.ua in / etc / hosts? Could it be worth nscd (DNS caching daemon), or DNSmasq, or a local copy of bind? - MANKK
  • like there is nothing like that - Diefair
  • @Diefair, then specify more about the entry "nameserver 192.168.0.1" - who owns this address? What and how is it configured? I mean that can refer to the DNS. In addition, according to your comment to my answer, I realized that there is still your DNS registered: "in the file is - domain w4u.com.ua search w4u.com.ua nameserver 5.9.36.17". So what is there at the moment? - MAN69K

2 answers 2

Configured bind on your server

That is, bind on a separate server, not on the same machine, where do you ping from? Check out the work this way:

 dig @<адрес_сервера_с_bind> <имя_домена> ANY 

That is, for example, as follows:

 dig @8.8.8.8 ya.ru ANY 

If you give what you need, then bind itself works. It is possible that your computer simply does not access the server where the bind is located. In this case, it is worth checking the parameters in the /etc/resolv.conf file. And also / etc / hosts.

Use tcpdump in the same way to make sure that you get a response from your DNS:

 tcpdump -nn '(src IP_вашего_DNS or dst IP_вашего_DNS) and port 53' 

Launch host w4u.com.ua in the next console and see if there will be a packet exchange with your server. You can reduce to this form:

 tcpdump -nn 'port 53' 

what to see with whom your computer communicates.

  • gives what you need. but the domain does not open. the /etc/resolv.conf and / etc / hosts files are fine - Diefair
  • Can I register something wrong with the domain name registrar? I created two records ns1 and ns2, created type A. for their records, and if I entered them in the browser, the server opens - Diefair
  • @Diefair, ns1 and ns2 - one of them is your server. and second? - aleksandr barakin
  • @Diefair, you can have a good example - what NSs did you specify for the domain, what records on them, what in the resolv.conf file? You can not real name / IP, but at least in some form that would understand what and how you spelled out. - MAN69
  • ns1.w4u.com.ua, ns2.w4u.com.ua. in the file is - domain w4u.com.ua search w4u.com.ua nameserver 5.9.36.17 - Diefair

the main thing : the described problem has nothing to do with the name server you mentioned.


I open it on my laptop.
Contents of the /etc/resolv.conf file
192.168.0.1
running the command on the laptop host w4u.com.ua get
w4u.com.ua has address 127.0.0.1

Most likely, it is the name server on the machine 192.168.0.1 that gives this answer. You can check this, for example, with the command:

 $ host w4u.com.ua 192.168.0.1 

however, the option is not excluded that this name is spelled as a computer name. You can check this, for example, with the command:

 $ hostname --fqdn 

Another possible option is the result of the influence of information from the /etc/hosts . if you do not want to give its full content, try temporarily commenting out all the lines ( # at the beginning of the line) and repeat the request.


Another hypothesis is based on a strange comment in the above file:

 # This file is not used by the host name and address resolution # or the DNS query routing mechanisms used by most processes on # this Mac OS X system. 

Perhaps, some specificity of this operating system affects.

  • checked on 3 different computers - the same result, also writes that 127.0.0.1 - Diefair
  • command host w4u.com.ua 192.168.0.1 ? Well, check the settings of this machine with ip-address 192.168.0.1 . - aleksandr barakin