In view of the fact that my previous question was fundamentally incorrectly formulated, I ask for help in setting up bind.

My actions

  1. /etc/bind/named.conf
  include "/etc/bind/named.conf.options";
 include "/etc/bind/named.conf.local";
 include "/etc/bind/named.conf.default-zones"; 
  1. /etc/bind/named.conf.local
  zone "dev" {
         type master;
         file "/etc/bind/dev.hosts";
 };

 zone "0.168.192.in-addr.arpa" {
         type master;
         file "/etc/bind/192.168.0.in-addr.arpa";
 }; 
  1. /etc/bind/dev.hosts
  $ TTL 38400
 @ IN SOA garmayev.dev.  garmayev.gmail.com.  (
  1192648703
  10,800
  3600
  604800
  38400)
 ;
 @ IN NS localhost.
 virtual IN A 192.168.0.49
          IN TXT "Virtual PC for server"
          IN HINFO "Debian 7.8"
 www.garmayev IN CNAME garmayev 
  1. /etc/bind/192.168.0.in-addr.arpa
  $ TTL 3600
 @ IN SOA garmayev.dev.  garmayev.garmayev.dev (
                    20060204;  Serial
                    3600;  Refresh
                    900;  Retry
                    3,600,000;  Expire
                    3600);  Minimum
 @ IN NS localhost.
 49 IN PTR virtual. 

All other files are “boxed”, i.e. without changes

now with ping garmayev.dev, the ping goes to 127.0.53.53, although the idea is to go 192.168.0.49.

How can I reconfigure it ?

    2 answers 2

    What is specified in /etc/bind/dev.hosts not a priority for the domain. In the domain itself, 127.0.53.53 is specified, and it is not strange that when 127.0.53.53 gives it to check the A record, use the dig command in the terminal if you have Linux . Here is my output from the terminal:

      dig garmayev.dev A ; <<>> DiG 9.9.5-3ubuntu0.5-Ubuntu <<>> garmayev.dev a ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53656 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;garmayev.dev. IN A ;; ANSWER SECTION: garmayev.dev. 3599 IN A 127.0.53.53 ;; Query time: 51 msec ;; SERVER: 127.0.1.1#53(127.0.1.1) ;; WHEN: Mon Jun 20 09:51:27 EEST 2016 ;; MSG SIZE rcvd: 46 

      You probably need to add the appropriate line to /etc/bind/dev.hosts:

      garmayev IN A 192.168.0.49