Kostis Netzwerkberatung
Konstantinos Kostis
Talstr. 25, D-63322 Rödermark
Tel. +49 6074 881056, FAX 881058
kosta@kostis.net, http://www.kostis.net/

You may use this software free of charge at your own risk

netdb 3.0.6 (2001-01-29)


/etc/netdb/def/

Header templates for dhcpd and named. It also contains a file named networks, a list of virtual subdomains and default data.

File   Function
dhcpd.conf   template header for dhcpd.conf files
named.conf   template header for named.conf files
networks   list of virtual subdomains and default data
     
Directory   Content
dhcp/   dhcpd configuration details
named/   DNS/bind headers, symbolic links to static DNS zone files
serial key

/etc/netdb/def/dhcpd.conf

Template header for a virtual subdomain (subnet) dhcpd.conf file. Must be created by your netdb admin.

Used by

Example

# dhcpd configuration for virtual subdomain %domain%
subnet
%ipnetaddr% netmask %ipmask%
{
        option subnet-mask
%ipmask% ;
        option broadcast-address
%ipbroad% ;

        option routers
%ROUTER% ;

/etc/netdb/def/named.conf

Template header for DNS/bind 8/9 named.conf file. Must be created by your netdb admin.

Used by

Example

Replace the subnet 192.168.0.0/24 used in this example by whatever you are using.

Also replace the list of DNS slaves { 192.168.0.254; } (include the master) by the actual ip addresses of your DNS servers.

Same goes for you forwarders which should be comprised by a list of DNS server ip addresses of your ISP.

// /etc/named.conf for DNS/bind 8/9 generated by netdb.mknamed.conf
//
// DO NOT EDIT THIS FILE AT ANY OTHER LOCATION THAN $NETDB/def/named.conf
//
// Global options for kostis.net and kostis.de
//
// This file assumes that DNS and netdb are running on the same machine.
//
// 194.25.2.129 is dns00.btx.dtag.de (DNS server for t-online.de users)
// 192.168.0.250 is the slave DNS server
// 192.168.0.254 is the server running netdb
// 127.0.0.0 allows for local updates (if netdb runs on the DNS Master)
// acl name update is also used in /etc/netdb/bin/netdb.mknamed.conf

acl update { 192.168.0.254; 192.168.0.250; 127.0.0.0/8; };

options
{
        directory "/var/named";
        forwarders { 194.25.2.129; };
        forward only;
        allow-transfer { 192.168.0.250; };
};

// hint file - this is identical everywhere

zone "." { type hint ; file "named.ca"; };

//
// localhost and loopback things - this is identical everywhere
//

zone "0.0.127.in-addr.arpa" { type master; file "named.local"; };

//
// The rest is generated by netdb.mknamed.conf
//
// netdb.mknamed.conf uses the files under $NETDB/def/named/ to find
// out which zones should be added. Add all zone file headers there.

/etc/netdb/def/networks

Contains a list of virtual subdomains and some default data used when creating entries for netdb.

Administered using

Syntax

domain,ipnetaddr,ipmask,location,remark

domain   virtual subdomain
ipnetaddr   ip network address
ipmask   ip subnet mask
location   location for this virtual subdomain (subnet)
remark   info only, not copied into Edit mask

Example

.ext,195.185.186.0,255.255.255.0,Internet,ISP
.usr,192.168.0.0,255.255.255.0,Kostis-Netzwerkberatung,User-LAN

/etc/netdb/def/dhcp/

/etc/netdb/def/dhcp/global

Here's your chance to configure global dhcpd values and settings. They can be changed for every virtual subdomain if needed.

#! /bin/sh

# global default lease time
export DEFLEASE=2592000

# global max lease time
export MAXLEASE=3888000

# global list of DNS servers separated by comma
export NS="live.kostis.net"

# global list of WINS servers separated by comma
export WINS="live.kostis.net"

For each virtual subdomain there can be a subdirecory with the same name except the leading dot is missing this time.

Yes, I know, it may seem confusing but filenames starting with a dot are not usally considered "hidden" so we ommit the leading dot here. An alternative would have been to use a prefix (such as $ORG again), but somehow I found that even more confusing. Let me know what you think.

In each such subdirectory a script called local sets some variables for it's virtual subdomain (subnet).

This script is called by /etc/netdb/bin/netdb.mkdhcpd.conf to gather the data needed for creating a dhcpd.conf for this virtual subdomain (subnet).

If you don't plan on creating dhcpd reservations using netdb, you may ignore this completely.

Should you on the other hand want to use it, make sure you set the following variables (using export) in your local file:

variable   function/content
ROUTER   hostname of the default gateway for this virtual subdomain (subnet)
Use neither FQDN nor ipaddr here, just plain hostname
DEFLEASE   default lease time for this virtual subdomain (in seconds)
MAXLEASE   max lease time for this virtual subdomain (in seconds)
NS   list of DNS servers in quotation marks separated by spaces. You may use hostnames, FQDNs or ipaddr here
WINS   list of WINS servers in quotation marks separated by spaces. You may use hostnames, FQDNs or ipaddr here
RANGE   start ipaddr and end ipaddr of dhcpd dynamic range (does not need to include reservations)

ROUTER must always be set. RANGE should only be set if you wish to hand out IP addresses dynamically. Global settings should normally be used for NS and WINS which means you don't set them here. DEFLEASE and MAXLEASE should also work globally most of the time except you have virtual subdomains which require different settings.

Example

/etc/netdb/def/dhcp/usr/local for virtual subdomain .usr

#! /bin/sh

# router for this subnet
export ROUTER=live

# range for dynamic ipaddresses (leave empty if you want static leases only)
export RANGE="192.168.0.11 192.168.0.99"

/etc/netdb/def/named/

For each DNS zone file you should provide a header template. Zone files have the prefix "db.".

Serial KEY is replaced by a generated key (max. 99 keys per day).

Files in this directory are used by

Example db.kostis.net

@       86400   IN      SOA     live.kostis.net. hostmaster.kostis.net. (
                        
KEY ; serial
                        10800 ; Refresh 3H
                        3600 ; Retry 1H
                        604800 ; Expire 1W
                        86400) ; def_ttl 1D

                IN      A       195.185.186.47
                IN      MX      100     mail
                IN      NS      live
;
; Loopback Interface
;
loopback        IN      A       127.0.0.1
localhost       IN      A       127.0.0.1
lo              IN      A       127.0.0.1
;
; the rest is generated by netdb
;

Example db.192.168.0

@       86400   IN      SOA     live.kostis.net. hostmaster.kostis.net. (
                        
KEY ; Serial
                        10800 ; Refresh 3H
                        3600 ; Retry 1H
                        604800 ; Expire 1W
                        86400) ; def_ttl 1D

                IN      NS      live.kostis.net.

;
; DO NOT EDIT THIS FILE DIRECTLY. APPLY ALL CHANGES TO NETDB
;

;
; the rest is generated by netdb
;