Installation
From DNSdoctor
Table of contents |
Requierement
To install DNSdoctor, you will need:
- ruby (http://www.ruby-lang.org/) (version 1.8)
If you want the following components/improvements, there are some extra requierements:
- Graphical User Interface
- GTK2 (http://www.gtk.org/)
- Gnome2 ruby binding (http://ruby-gnome2.sourceforge.net/) (only the GTK part is required)
- Web Interface
- Speed improvement
- libxml2 (http://xmlsoft.org/)
- ruby-libxml (http://www.rubynet.org/modules/xml/libxml/)
Installation
You can go for the easy way by using pre-existing packaging, there are known to be availables for the following operating systems:
- Debian [1] (http://packages.debian.org/unstable/net/dnsdoctor)
- Redhat
- FreeBSD [2] (http://www.freebsd.org/cgi/cvsweb.cgi/ports/dns/dnsdoctor/)
Otherwise you will need to perform the installation manually.
- You need to fetch the dnsdoctor tarball [3] (http://www.dnsdoctor.org/download/) and extract it:
version=1.0.0 wget http://www.dnsdoctor.org/download/src/dnsdoctor-${version}.tgz tar xvfz dnsdoctor-${version}.tgz cd dnsdoctor
- Now you need to use ruby to start the installer.rb scripts (you generally need to become root), the syntax is as folllow:
ruby installer.rb -DKEY1=value1 -DKEYN=valuen target1 targetn
- Existing options (use
-DKEY=value
after the installer.rb):
- RUBY
- Full path to the ruby interpreter. It is useful if you have several versions of the ruby interpreter, it will let you choose the one that you will use for dnsdoctor.
- PREFIX
- Prefix to use for the installation (default to: /usr/local/). If you are on a FreeBSD system you will choose /usr/local/, if you are on Linux you will prefer /usr, another possibility is /opt
- HTML_PATH
- Prefix to use for refering to an URL (default to: /dnsdoctor). For example the http://demo.dnsdoctor.org/ site is set to use an empty value.
- Existing options (use
- Existing targets:
- all
- install everything (ie: common cli cgi ...)
- common
- install the common part. It is requiered by the targets below and you will need to install at least one of them to have something usefull.
- cli
- install the cli part (command line interface)
- cgi
- install the cgi and a set of web pages provided as an example
ruby installer.rb all
- The last (optional) step is to edit the configuration file (dnsdoctor.conf) to adapt it to your system. Typical items that need to be changed are the programs used to test the icmp connectivity (ping), the list of rules to apply according to the TLD, ...
CGI
Here is an exemple of Apache2 (http://httpd.apache.org) configuration file,
assuming DNSdoctor has been installed in /usr/local/ (PREFIX=/usr/local
) and for html pages generated in the /dnsdoctor/ namespace (HTML_PATH=/dnsdoctor
).
The following aliases map the URL to the location of the need files on the filesystem:
AliasMatch ^/dnsdoctor/?$ /usr/local/libexec/dnsdoctor/www/html/form.html AliasMatch ^/dnsdoctor/(en|fr)/?$ /usr/local/libexec/dnsdoctor/www/html/form.html.$1 AliasMatch ^/dnsdoctor/(en|fr)/(.*)$ /usr/local/libexec/dnsdoctor/www/html/$2.$1 ScriptAlias /dnsdoctor/cgi-bin/ /usr/local/libexec/dnsdoctor/cgi-bin/ Alias /dnsdoctor/js/ /usr/local/libexec/dnsdoctor/www/js/ Alias /dnsdoctor/style/ /usr/local/libexec/dnsdoctor/www/style/ Alias /dnsdoctor/img/ /usr/local/libexec/dnsdoctor/www/img/ Alias /dnsdoctor/ /usr/local/libexec/dnsdoctor/www/html/
The directory containing the CGI (or only the file) need to have CGI permissions:
<Directory /usr/local/libexec/dnsdoctor/cgi-bin/> Options ExecCGI </Directory>
For the web pages given as an example, as they can exist in several languages (only english and french for now) you need to enable the MultiViews:
<Directory /usr/local/libexec/dnsdoctor/www/> Options MultiViews </Directory>
inetd
First you need to edit the file /etc/services, which contains information regarding the known services available in the Internet to add the following line (the port 1904 is just an example):
dnsdoctor 1904/tcp # DNSdoctor service
You also need to configure inetd, so that it is listening for the new dnsdoctor service, this is done by adding the line in inetd.conf:
dnsdoctor stream tcp nowait root /usr/local/bin/dnsdoctor dnsdoctor --INPUT=inetd
If you have an IPv6 stack installed but don't have the connectivity with the outside world add the option -4 to the dnsdoctor command.
Directory layout
Below is the directory structure used by dnsdoctor (in the case where only the PREFIX variable has been used during the installation).
PREFIX |-- bin | `-- dnsdoctor # Command line |-- etc | `-- dnsdoctor # Configuration directory | |-- dnsdoctor.conf # Main configuration file | |-- rootservers # List of the root servers (YAML file) | |-- reverse.profile # Profile for checking reverse delegation | |-- ... # ... | `-- default.profile # Default set of rules to be used |-- libexec | `--dnsdoctor | |-- cgi-bin | | `-- diagnose.cgi # CGI | |-- html # HTML directory (javascript, css, pics, ...) | | |-- en # English version | | |-- ... # ... | | `-- fr # French version | |-- locale # Localisation files | |-- test # test set | |-- lib # Extra libraries (NResolv, Address, ...) | `-- dnsdoctor # Core component `-- share `-- doc `-- dnsdoctor # Documentation