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)

netdb directory roadmap

General Information

Directories used by netdb

Directory   Content
/etc/netdb   netdb "root"
/var/www/cgi-bin/netdb   root for netdb CGI scripts
/var/www/html/netdb   root for netdb GUI HTML
/home/netdb   netdb backup directory

In addtion to the directories above a netdb log file /var/log/netdb and a rollback log file /var/log/netdb.rollback is used.


Logs changes in netdb database and some intrusion attempts as well in human readable form.

File permission

In this example apache is the group which under the local web server is running. On your system a different group may be in use.

-rw-rw-r-- 1 netdb apache xxxxx Jan 29 03:06 netdb

File Format

YYYY-MM-DD hh:mm:ss, script-name, tid: what-happened (transaction)

YYYY-MM-DD hh:mm:ss, script-name: what-happened


Transactions in netdb database for rollbacks.

File permission

In this example apache is the group under which the local web server is running. On your system a different group may be in use.

-rw-rw-r-- 1 netdb apache xxxxx Jan 29 03:06 netdb.rollback

File Format

YYYY-MM-DD hh:mm:ss,tid,action,data

action is one of: add, del, add-domain, del-domain

domain data is: %domain%,%ipnetaddr%,%ipmask%,%location%,remark

entry data is: see CSV format

Files in directory /etc/netdb

netdb configuration files, scripts, binaries, templates and sources, some of them in subdirectories

File   Content
/etc/netdb/README   general information about netdb
/etc/netdb/allow   access authorization file contains users and what they are allowed to administer
/etc/netdb/htpasswd   apache password file created/maintained using apache htpasswd utility
/etc/netdb/root   contains Internet domain root for this DNS domain (eg. kostis.net)
/etc/netdb/setvars   set environment variables and PATH for use with netdb
/etc/netdb/setvars.local   set web server specific variables (HTGROUP, CGIDIR, HTMDIR)
/etc/netdb/tid   transaction id for rollbacks


/etc/netdb/allow contains a list of usernames, virtual subdomains and optional comments.

File permission

-rw-r--r-- 1 netdb netdb xxx Jan 29 03:06 allow

File Format

username list-of-virtual-subdomains [# comment]

username   must be identical to a username contained in htpasswd
list-of-virtual-subdomains   a virtual subdomain normally starts with a dot ("."), except for the "catch all" virtual subdomain "*"
virtual subdomains can be grouped (eg. using dots) and "*". Standard filename masks are applied.
virtual subdomains are separated by space (" ")
# comment   comments are optional and begin with the character "#"


netdb * # user netdb is allowed to administer everything
dafehv *.ehv *.wes # all DAF Eindhoven and Westerlo subnets


Contains a list of usernames and crypted password separated by colon (":").

File permission

-rw-r----- 1 netdb apache 21 Jan 29 03:06 htpasswd


man htpasswd

to find out how to create/administer this file. htpasswd is part of apache.

Here is how I created a new apache password file for user netdb logged in as user netdb:

cd /etc/netdb
htpasswd -c -m htpasswd
chgrp apache htpasswd
chmod 640 htpasswd

Caution: option -c will remove all other users from a password file if it already exists!

If you have already created this file and want to add a user newuser please try:

htpasswd -m /etc/netdb/htpasswd newuser

There is more to say about how to integrate netdb into apache.


/etc/netdb/root contains nothing but the Internet domain root (DNS domain name).

File permission

-rw-r--r-- 1 netdb netdb xx Jan 29 03:06 root




Shell script setting environment variables used by other netdb scripts adding /etc/netdb/bin in PATH.

File permission

-rwxr-xr-x 1 netdb netdb 1243 Jan 29 03:06 setvars


. /etc/netdb/setvars

Variables set by /etc/netdb/setvars

variable   meaning   content
NETDB   contains netdb "root" directory   /etc/netdb
ORG   contains prefix for netdb data files   netdb
DOMAINS   contains path and prefix for netdb data files   $NETDB/domains/$ORG
TMP   path to a directory for temporary files   /tmp
PRG   name of calling script    
NETDBLOG   path to netdb log file   /var/log/netdb
DATE   current date in ISO 8601 format (for log file entries)   YYYY-MM-DD hh:mm:ss
ROOTDOMAIN   content of file /etc/netdb/root   see /etc/netdb/root
NETDBVER   netdb version (eg. 3.0.6)   3.0.6

Adds $NETDB/bin to PATH if not already in PATH.

Variables set by /etc/netdb/setvars.local

variable   meaning   example content
HTGROUP   group used by your web server   apache
CGIDIR   location for CGI scripts   /var/www/cgi-bin
HTMDIR   location for HTML documents   /var/www/html


Contains last transaction id number (for rollbacks)

File permission

-rw-rw-r-- 1 netdb apache xx Jan 29 03:06 tid

Example (initial content)


Subdirectories in directory /etc/netdb

Subdirectory   Content
bin   netdb programmes and scripts
def   definitions/defaults (networks, dhcp, named)
domains   virtual subdomain netdb data files (all with prefix $ORG)
frm   template format files (with subdirectories)
htm   GUI templates for administering netdb data
src/netdb   Standard C sources