Answer the question
In order to leave comments, you need to log in
BIND inside NAT (home ns, smb, nfs, httpd server + router)
Hello!
Everything was simple when I set up direct domain names with an external address on web servers, because the provider issued ns, and there was simply nothing to get confused. I understand the essence of the DNS, but I got confused in the technologies.
Task : there is a home piece of hardware on Centos 6.5 with all sorts of software for home needs (media server, file server, etc.). There is an Asus RT-N56U router, on which, as far as I understand, the dnsmasq DNS server hangs . I have never worked with him.
In the router, the default server host is bound in hosts as 192.168.1.210 CENTOS .
In the end, the following should turn out:
1) Local domains are resolved from all hosts within the network
2) The internal server sees the Internet
Question:how to create a local first-level domain on an internal server (for example: home. ) and bind second-level domains to it, such as server.home, plex.home , etc.?
Current BIND zone setting:
$TTL 3600
home. IN SOA ns1.home. ns2.home. 5 3H 15M 1W 1M
IN NS ns1.home.
IN NS ns2.home
ns1 IN A 192.168.1.210
ns2 IN A 192.168.1.210
server IN A 192.168.1.210
plex IN A 192.168.1.210
torrent IN A 192.168.1.210
options {
listen-on port 53 {
127.0.0.1;
192.168.1.210;
};
forwarders {
80.251.112.80;
80.251.112.81;
8.8.8.8;
8.8.4.4;
};
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
key "rndc-key" {
algorithm hmac-md5;
secret "f+fP6AgSLzqx4aIalWeLiw==";
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "home" IN {
type master;
file "/var/named/home.zone";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "/var/named/home.rev.zone";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
Answer the question
In order to leave comments, you need to log in
In the bind on the server, you need to enable forwarder (so that it can resolve other zones). As an option, just set it up correctly so that it can resolve everything itself (in debian, such a setting consists in apt-get install bind9).
On the router, you need to give out the address of your server as a dns server to all clients via dhcp. Any other ns can be a backup, just in case the server crashes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question