Get the Bind9 package
apt-get install bind9 bind9-dnsutils
Configure named.conf.option
File: /etc/bind/named.conf.option options { directory "/var/cache/bind"; auth-nxdomain no; # conform to RFC1035 // contains a list of servers to which queries should // be forwarded (up to three servers may be listed) forwarders { 1.1.1.1; 8.8.8.8; }; // prefer usage of the name server declared in the // forwarders section forward first; // network interfaces to listen on and optionally the // port for IPv4/IPv6 (default: 'port 53'/'any') listen-on port 53 { 127.0.0.1; 192.168.168.231; }; listen-on-v6 { none; }; // may be needed if a firewall stands between the local // server and the internet //query-source address * port 53; //transfer-source * port 53; //notify-source * port 53; // networks or IP addresses to accept queries from // (default: allow from all hosts) allow-query { 127.0.0.1; 192.168.168.0/28; }; // hosts allowed to make recursive queries allow-recursion { 127.0.0.1; 192.168.168.0/28; }; // hosts are allowed to receive zone transfers //allow-transfer { none; }; allow-transfer { 127.0.0.1; }; // specifies, whether notify messages are sent to // other name servers when the the zone data is changed notify no; };
Zone Configuration
Your local zone must be specified like this
File: /etc/bind/named.conf.local zone "myDomainToConfigure.local" { type master; file "/etc/bind/db.myDomainToConfigure.local"; }; zone "168.168.192.in-addr.arpa" { type master; file "/etc/bind/db.168.168.192"; }; Don't forget the fucking "." dot after ur FQDN-Domain-Name Create ur domain database Files. Set the serial to the Date of now. Change myBindServerName and myMailServer to ur network configuration File: /etc/bind/db.myDomainToConfigure.local $TTL 3600 @ IN SOA myBindServerName.myDomainToConfigure.local. root.myDomainToConfigure.local. ( 2022031601 ; serial 3600 ; refresh 600 ; retry 1D ; expire 3600 ) ; minimum @ IN NS myBindServerName.linowebserver.org. ; nameserver @ IN MX 10 myMailServer.linowebserver.org. ; mailserver ; domain to IP mappings @ IN A 192.168.168.1 myBindServerName. IN A 192.168.168.1 myMailServer. IN A 192.168.168.2 ur clients..... File: /etc/bind/db.168.168.192 $TTL 3600 168.168.192.in-addr.arpa. IN SOA myBindServerName.myDomainToConfigure.local. root.myBindServerName.myDomainToConfigure.local. ( 2022031601 ; serial 3600 ; refresh 600 ; retry 1D ; expire 3600 ) ; minimum IN NS myBindServerName.myDomainToConfigure.local. ; IP to domain mappings 1 IN PTR myBindServerName.myDomainToConfigure.local. 2 IN PTR myMailServer.myDomainToConfigure.local. x IN PTR ur clients ...
Keep in ur mind
- U Have to create the “db” files manual of ur Network-Configuration.
- Change the searial to the actually Date followed by 01
- all domains entrys followed by a dot.
- change the PTR DB file to ur networ-configuation
- change the IP and Hostname to ur configuration