Установил dns сервер на ubuntu 16.04, установил имя gis-server.my для компа в локальной сети с ip 192.168.0.111. ping, nslookup и host на gis-server.my работают. Как мне теперь сделать, чтобы с любого компа в локальной сети можно было в браузере открыть адрес gis-server.my.
Файл /etc/bind/named.conf.options
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
// forwarders {
// 0.0.0.0;
// };
//========================================================================
// If BIND logs error messages about the root key being expired,
// you will need to update your keys. See https://www.isc.org/bind-keys
//========================================================================
dnssec-validation auto;
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
forwarders {
8.8.8.8;
8.8.4.4;
};
listen-on{
127.0.0.1;
192.168.0.1;
192.168.0.111;
};
};
Файл /var/lib/bind/db.my
;
:
; BIND data file for local loopback interface
;
$TTL 604800 ; 1 week
@ IN SOA gis-server.my. root.gis-server.my. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS gis-server.my.
@ IN A 192.168.0.1
@ IN AAAA ::1
gis-server IN A 192.168.0.111
Файл /var/lib/bind/db.192.my
;
; BIND data file for local loopback interface
;
$TTL 604800 ; 1 week
@ IN SOA gis-server.my. root.gis-server.my. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS gis-server.
111 IN PTR gis-server.my.
Файл /etc/bind/named.conf.local
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
key DHCP_UPDATER {
algorithm HMAC-MD5.SIG-ALG.REG.INT;
secret 'secretcode';
};
zone "my"{
type master;
file "/var/lib/bind/db.my";
allow-update { key DHCP_UPDATER; };
};
zone "0.168.192.in-addr.arpa"{
type master;
file "/var/lib/bind/db.192.my";
allow-update { key DHCP_UPDATER; };
};
Результат nslookup gis-server.my
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: gis-server.my
Address: 192.168.0.111
Результат nslookup 192.168.0.111
Server: 127.0.0.1
Address: 127.0.0.1#53
111.0.168.192.in-addr.arpa name = gis-server.my.
Результат host gis-server.my
gis-server.my has address 192.168.0.111
Файл /etc/hosts
127.0.0.1 localhost
127.0.1.1 file-server
192.168.0.1 gateway
192.168.0.111 arcgis-server
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters