localhost named # dig ns1.udderweb.com
; <<>> DiG 9.3.2 <<>> ns1.udderweb.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19473
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1
;; QUESTION SECTION:
;ns1.udderweb.com. IN A
;; ANSWER SECTION:
ns1.udderweb.com. 259200 IN A 12.158.188.216
;; AUTHORITY SECTION:
udderweb.com. 259200 IN NS ns1.udderweb.com.
udderweb.com. 259200 IN NS ns2.udderweb.com.
;; ADDITIONAL SECTION:
ns2.udderweb.com. 259200 IN A 12.158.188.217
;; Query time: 15 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Mar 28 05:57:07 2006
;; MSG SIZE rcvd: 98
localhost named # nslookup
> ns1.udderweb.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: ns1.udderweb.com
Address: 12.158.188.216
> ns2.udderweb.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: ns2.udderweb.com
Address: 12.158.188.217
> exit
localhost named # cat /etc/named/named.conf
logging {
// severity can be one of: debug info
channel "my_syslog" { syslog daemon; severity info; };
category "default" { "my_syslog"; "default_debug"; };
};
options {
directory "/var/bind";
version "Bind";
listen-on-v6 { none; };
allow-recursion { 127.0.0.1; };
pid-file "/var/run/named/named.pid";
};
// This is the master server for udderweb.com
zone "udderweb.com" {
type master;
file "pri/udderweb.com.zone";
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "pri/localhost.zone";
allow-update { none; };
notify no;
};
zone "127.in-addr.arpa" IN {
type master;
file "pri/127.zone";
allow-update { none; };
notify no;
};
localhost named # cat /etc/named/pri/udderweb.com.zone
$TTL 3D
udderweb.com. IN SOA ns1.udderweb.com. root.udderweb.com. (
28 ; Serial
1D ; Refresh
30M ; Retry
1W ; Expiry
1D ) ; Minimum
@ IN NS ns1.udderweb.com.
@ IN NS ns2.udderweb.com.
@ IN MX 0 mail.udderweb.com.
@ IN A 12.47.45.189
ns1 IN A 12.158.188.216
ns2 IN A 12.158.188.217
mail IN A 12.47.45.189
www IN A 12.47.45.189
ftp IN A 12.47.45.189
localhost named # cat /etc/named/pri/127.zone
$ORIGIN 127.in-addr.arpa.
$TTL 1W
@ 1D IN SOA localhost. root.localhost. (
15 ; Serial
3H ; Refresh
15M ; Retry
1W ; Expiry
1D ) ; Minimum
1D IN NS localhost.
* 1D IN PTR localhost.
localhost named # cat /etc/named/pri/localhost.zone
$TTL 1W
@ IN SOA ns.localhost. root.localhost. (
15 ; Serial
3H ; Refresh
15M ; Retry
1W ; Expiry
1D ) ; Minimum
IN NS 127.0.0.1
localhost. IN A 127.0.0.1
localhost named # cat /etc/hosts
# /etc/hosts: This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server. Just add the names, addresses
# and any aliases to this file...
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.8 2003/08/04 20:12:25 azarah Exp $
#
127.0.0.1 localhost
12.158.188.216 ns1.udderweb.com ns1
12.158.188.217 ns2.udderweb.com ns2
# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts