BIND basics
Peter Eddy
petere at atg.com
Tue Nov 25 11:57:15 UTC 2003
Carsten wrote:
> Dear all,
>
> I am just trying to understand BIND. I would like my DNS-Server to
> resolve it's own name. Is that possible or do I have to put it into
> /etc/hosts?
> A ping to kutter.carsten.peters.name (see zone file below) doesn't work
> either. Why?
I'm no DNS expert, but I have a few suggestions.
> - hostname of my machine: caluta.carsten.peters.name
> - IP address: 192.168.1.3
> - /etc/nsswitch.conf
> - hosts: files dns
> - /etc/hosts:
> 127.0.0.1 localhost.localdomain localhost
> - /etc/resolv.conf:
> nameserver 192.168.1.3
> nameserver 194.179.1.100 #ISP's DNS
>
your ISP's nameserver shouldn't be here, it should be in named.conf, see
below.
> DNS caching-only running and working.
> Then I added a zone to the end of /etc/named.conf
> Here is the whole file:
> ===
> // generated by named-bootconf.pl
> //
> // a caching only nameserver config
> //
> #include "/etc/rndc.key";
> options {
> /*
> * If there is a firewall between you and nameservers you want
> * to talk to, you might need to uncomment the query-source
> * directive below. Previous versions of BIND always asked
> * questions using port 53, but BIND 8.1 uses an unprivileged
> * port by default.
> */
> // query-source address * port 53;
> directory "/var/named";
forwarders {
194.179.1.100;
// could put more here if you have them
}
> };
> controls {
> inet 127.0.0.1 allow { localhost; } keys { rndckey; };
> };
> zone "." {
> type hint;
> file "named.ca";
> };
> zone "localhost" {
> allow-update { none; };
> type master;
> file "localhost.zone";
> };
> zone "0.0.127.in-addr.arpa" {
> allow-update { none; };
> type master;
> file "named.local";
> };
> zone "carsten.peters.name" {
> type master;
> file "carsten.peters.name.zone";
> };
You should have a reverse DNS zone here for carsten.peter.name
> ===
>
> Here is the new zone file:
> ===
> $TTL 86400
> caluta.carsten.peters.name. IN SOA carsten.peters.name
> root (
> 5 ; serial
> 28800 ; refresh
> 14400 ; retry
> 3600000 ; expire
> 86400 ; ttl
> )
> caluta IN NS 192.168.1.3
> caluta IN A 192.168.1.3
> kutter IN A 192.168.1.2
> ===
This looks wrong, but it could be a difference in our versions of bind.
My bind9 zone looks like this:
$TTL 604800
@ IN SOA net.home. root.net.home. (
2003070410 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
IN NS acephlaous.net.home. ; name server
IN MX 10 mail.net.home. ; Primary mail exchanger
mail IN A 209.67.232.227
antonov IN A 192.168.1.7
kalypso IN A 192.168.1.1
Peter
More information about the users
mailing list