T
T
Thiago Alvarez2019-02-28 21:14:08
Domain Name System
Thiago Alvarez, 2019-02-28 21:14:08

Hosts do not see the domain. Bind9 on Centos?

Hello.
Began to study dns, put bind on centos.
the server itself and hosts nslookup'it and pings by name,
but hosts (windows 7) on virtual machines do not do this, it only pings by ip.
everything is allowed in the firewall.
/etc/named.conf:

options {
        listen-on port 53 { 127.0.0.1; 172.16.1.1; };      
        directory       "/var/named
         .......................
}

zone "home" IN {
        type master;
        file "home.zone";
};

/var/named/home.zone:
$TTL 3H
@         IN       SOA    ns.home. root.ns.home.(
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minim
              IN      NS      ns.home.

ns          IN      A       172.16.1.1
antonio  IN      A       172.16.1.16
john       IN      A       172.16.1.17

By the way, there is also dhcp, maybe in the conf file I made up
/etc/dhcp/dhcpd.conf:

subnet 172.16.1.0 netmask 255.255.255.0 {
  range 172.16.1.10 172.16.1.30;
  option domain-name-servers 172.16.1.1;
  option routers 172.16.1.1;
  option broadcast-address 172.16.1.255;
  default-lease-time 600;
  max-lease-time 7200;
}

[[email protected] ~]# nslookup antonio
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:   antonio.home
Address: 172.16.1.16


[[email protected] ~]# ping antonio
PING antonio.home (172.16.1.16) 56(84) bytes of data.
64 bytes from 172.16.1.16 (172.16.1.16): icmp_seq=1 ttl=128 time=0.601 ms
64 bytes from 172.16.1.16 (172.16.1.16): icmp_seq=2 ttl=128 time=0.505 ms
64 bytes from 172.16.1.16 (172.16.1.16): icmp_seq=3 ttl=128 time=0.431 ms

C host Antonio
5c782837d8e61061375003.png
xs what's the problem. On ubuntu server everything worked the first time. Trouble with centos

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
H
hint000, 2019-03-01
@thiago_alvarez

/etc/named.conf

options {
...
               allow-query { 172.16.1.0/24; localhost; };
};

To allow requests from the local network. Without this, bind listens on the port but rejects requests.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question