This is Bavaria, Germany!
First hint: take bind8 not bind9 when using it with vserver
netser:/# apt-get install bind
Do this in /etc/bind/named.conf.options:
// Sourceport for queries not only Port 53
// query-source address * port 53;
forwarders {
# T-Online
194.25.2.129;
# Uni Erlangen
131.188.3.2;
};
listen-on {
# vserver: listen only on the vserver's ip-address
10.1.1.63;
};
|
In /etc/bind/named.conf you find:
include "/etc/bind/named.conf.local";
My local domain is rosi13.de which lives in 10.1.1.x, so I write this into /etc/bind/named.conf.local:
zone "rosi13.de" IN {
type master;
file "/etc/bind/rosi13.de.zone";
allow-update {
none;
};
};
zone "1.1.10.in-addr.arpa" IN {
type master;
file "/etc/bind/1.1.10.in-addr.arpa";
allow-update {
none;
};
};
|
/etc/bind/rosi13.de.zone:
$TTL 7D
@ IN SOA localhost. root.localhost. (
; you can use M=minutes, H=hours, D=days, W=weeks,
200403191605 ; Serial: yyyymmddhhMM
3H ; refresh
15M ; Retry
1W ; Expire
1D ; minimum TTL
)
; define nameserver for this zone
rosi13.de. IN NS netser.rosi13.de.
lisa IN A 10.1.1.2
pc-horshack IN CNAME lisa.rosi13.de.
emma IN A 10.1.1.5
pc-matthias IN CNAME emma.rosi13.de.
; sony-notebook of horshack
flatworld IN A 10.1.1.6
lj IN A 10.1.1.7
hp IN CNAME lj.rosi13.de.
hplj IN CNAME lj.rosi13.de.
hplj2200 IN CNAME lj.rosi13.de.
leonie IN A 10.1.1.8
pc-claudia IN CNAME leonie.rosi13.de.
; sony-notebook of horshack when in wlan
flatword-wlan IN A 10.1.1.10
; firewall
securepoint IN A 10.1.1.11
fw IN CNAME securepoint.rosi13.de.
firewall IN CNAME securepoint.rosi13.de.
slimp IN A 10.1.1.12
slimp3 IN CNAME slimp.rosi13.de.
igel IN A 10.1.1.13
; Linux server
lillebror IN A 10.1.1.14
sirius IN A 10.1.1.15
pc-johannes IN CNAME sirius.rosi13.de.
johannes IN CNAME sirius.rosi13.de.
; virtual servers on lillebror
mail IN A 10.1.1.61
mysql3 IN A 10.1.1.62
netser IN A 10.1.1.63
ns IN CNAME netser.rosi13.de.
dns IN CNAME netser.rosi13.de.
proxy IN CNAME netser.rosi13.de.
smtp IN CNAME netser.rosi13.de.
home IN A 10.1.1.64
ap2 IN A 10.1.1.65
|
There is also a reverse-lookup file:
$TTL 7D
@ IN SOA localhost. root.localhost. (
; you can use M=minutes, H=hours, D=days, W=weeks,
200403191626 ; Serial: yyyymmddhhMM
3H ; refresh
15M ; Retry
1W ; Expire
1D ; minimum TTL
)
; nameserver for this zone
; this shall not be a cname, but an a-record
1.1.10.IN-ADDR.ARPA. IN NS netser.rosi13.de.
; define reverse lookup addresses
2 IN PTR pc-horshack.
5 IN PTR pc-matthias.
6 IN PTR flatworld-lan.
7 IN PTR lj.
8 IN PTR pc-claudia.
10 IN PTR flatworld-wlan.
11 IN PTR securepoint.
12 IN PTR slimp3.
13 IN PTR igel.
14 IN PTR lillebror.
15 IN PTR pc-johannes.
61 IN PTR mail.
62 IN PTR mysql3.
63 IN PTR netser.
64 IN PTR home.
65 IN PTR ap2.
|
Test is made by nameserver-queries. The tool for that is dig:
netser:/etc/bind# dig @10.1.1.63 lisa.rosi13.de ;; ANSWER SECTION: lisa.rosi13.de. 604800 IN A 10.1.1.2
netser:/etc/bind# dig @10.1.1.63 -x 10.1.1.2 ;; ANSWER SECTION: 2.1.1.10.in-addr.arpa. 604800 IN PTR pc-horshack.
netser:/etc/bind# dig @10.1.1.63 www.franken.de ;; ANSWER SECTION: www.franken.de. 43200 IN CNAME www2.franken.de. www2.franken.de. 43200 IN A 193.175.24.24