[[http://tmade.de|Home tmade.de]]
[[http://wiki.tmade.de|Home Wiki]]
===== BIND =====
Install on Suse:
yast2 -i bind bind-chrootenv bind-devel bind-utils
vi /var/lib/named/master/domain_name
Local Test of service function:
dig @192.168.1.6 -x 192.168.1.6
Other Systems:
apt-get install bind bind-chrootenv bind-devel bind-utils
rpm -i package1.rpm packageX.rpm
Config files on Suse based systems (others on simular places/ names):
/var/lib/named/master/domain_name
/etc/named.conf
/etc/named.d/forwarders.conf
Content examples:
== /var/lib/named/master/homenet.de[domain_name] ==
opensuse:/var/lib/named/master # cat homenet.de
$TTL 2D
@ IN SOA opensuse.homenet.de. root.opensuse.homenet.de. (
10 ; serial
3H ; refresh
1H ; retry
1W ; expiry
1D ) ; minimum
homenet.de. IN NS homenet.de.
tmade IN A 192.168.1.6
test IN A 192.168.1.1
== /etc/named.conf ==
opensuse:/etc # cat named.conf
options {
include "/etc/named.d/forwarders.conf";
query-source address * port 53;
listen-on { 127.0.0.1; 192.168.1.6; };
allow-query { 127.0.0.1; 192.168.1.0/24; };
};
logging {
category queries { log_file; };
category xfer-in { log_file; };
category xfer-out { log_file; };
category default { log_file; };
channel log_file { file "/var/log/bind" versions 5 size 5M; };
};
zone "homenet.de" in {
allow-transfer { any; };
file "master/homenet.de";
type master;
};
== /etc/named.d/forwarders.conf ==
opensuse:/etc/named.d # cat forwarders.conf
# Copyright (c) 2001-2004 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
# Forwarders file for PPPD updates (only)
#
# /etc/named.d/forwarders.conf
forwarders { 192.168.1.1; };
==== Testing ====
opensuse:/etc # named-checkconf /etc/named.conf
opensuse:/etc #
opensuse:/etc # dig homenet.de
; <<>> DiG 9.4.1-P1 <<>> homenet.de
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35056
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;homenet.de. IN A
;; AUTHORITY SECTION:
homenet.de. 86400 IN SOA opensuse.homenet.de. root.opensuse.homenet.de. 10 10800 3600 604800 86400
;; Query time: 2 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Nov 2 22:54:23 2010
;; MSG SIZE rcvd: 78
opensuse:/etc # named-checkzone -d homenet.de /var/lib/named/master/homenet.de
loading "homenet.de" from "/var/lib/named/master/homenet.de" class "IN"
zone homenet.de/IN: NS 'homenet.de' has no address records (A or AAAA)
zone homenet.de/IN: loaded serial 10
OK
opensuse:/etc #named-checkzone -d 1.168.192.in-addr.arpa /var/lib/named/master/reverse-192.168.1
See also:
http://www.brennan.id.au/08-Domain_Name_System_BIND.html