maradns

Section: MaraDNS reference (8)
Updated: December 2001

Erre con erre cigarro
Erre con erre barril
R'apido ruedan los carros
En el ferrocarril
 

NOM

maradns - Serveur DNS  

RÉSUMÉ

maradns [ -v | -f mararc_file_location ] >> /var/log/maradns &
 

DESCRIPTION

maradns est un serveur DNS écrit en conservant sécurité, simplicité, et performance à l'esprit.

maradns possède deux types d'arguments, chacun étant optionnel.

Le premier est l'emplacement d'un fichier mararc contenant toute l'information de configuration de MaraDNS. L'emplacement par défaut de ce fichier est /etc/mararc. Ceci est précisé dans l'expression maradns -f mararc_file_locationmararc_file_location est l'emplacement de ce fichier.

Il est également possible de demander à MaraDNS de montrer son numéro de version, puis de se terminer. Ceci s'obtient en invoquant maradns ainsi maradns -v ou maradns --version

 

UTILISATION

Si MaraDNS fonctionne seulement en mode récursif, un seul fichier de configuration est nécessaire, le fichier mararc.

Pour que MaraDNS puisse fonctionner en mode autoritaire, il est nécessaire de rédiger au moins deux fichiers de configuration: le fichier mararc et un ou plusieurs fichiers de zone au format "csv1".

Le format de fichiers de zone csv1 est décrit dans la page de manuel csv1(5) Le format du fichier mararc est décrit dans la page de manuel mararc(5)

 

CONSIDÉRATIONS DE FILTRAGE

Si MaraDNS est utilisé en serveur de noms autoritaire, autoriser les flux UDP depuis tout hôte sur Internet vers le port 53 en UDP sur l'adresse IP utilisée par le serveur autoritaire.

Si MaraDNS est utilisé comme serveur de noms récursif, le pare-feu doit laisser passer les paquets suivants en provenance et à destination de l'adresse IP utilisée par le serveur :

*
Autoriser les flux UDP depuis le serveur MaraDNS vers toute machine sur Internet avec 53 comme port de destination.
*
Autoriser les flux UDP depuis toute machine sur Internet vers l'IP du serveur récursif, avec un port source de 53 et un port de destination compris entre 15000 et 19095 (inclus).
*
Autoriser les flux USP depuis les adresses utilisant le serveur MaraDNS comme serveur récursif à destination du port 53.

MaraDNS utilise un générateur de nombres aléatoires cryptographiquement fort pour générer à la fois la requête (16 bits d'entropie) et le port source de la requête (12 bits d'entropie). Ceci rend les réponses contrefaites à un serveur MaraDNS plus difficile, l'attaquant n'ayant qu'une chance sur 250 millions qu'une réponse contrefaite donnée soit considérée comme valide.

 

FREQUENLY ASKED QUESTIONS

How to I try out MaraDNS?

Read the quick start guide, which is the file named 0QuickStart in the MaraDNS distribution.

What license is MaraDNS released under?

None, actually. MaraDNS is relased to the public domain.

How do I get MaraDNS to bind to multiple IP addresses?

The current method is to run multiple copies of MaraDNS, each using its own mararc file.
  E.g:

maradns -f /etc/maradns/mararc.1 maradns -f /etc/maradns/mararc.2 etc.

If you just want to bind to all IP addresses your computer has, bind to the ip "0.0.0.0".
  I don't think this will be too hard to correctly implement, since I already have code for specifying multiple IP addresses with the IP ACL code used by the zone server. Until then, I will add this workaround to the faq.

How do I report bugs in MaraDNS?

Before reporting a bug that MaraDNS has, please read the relevent man pages. The man pages should be installed when one installs MaraDNS, and, in addition, are availble in the doc/man directory of the MaraDNS source tarball. (It is also possible that you are reading the man page right now)

Some MaraDNS man pages (namely, the man pages for maradns, askmara, zoneserver, and mararc) have a section, titled "BUGS", which list already known bugs which I feel are not important enough to fix before the 1.0 release of MaraDNS. Bug reports which mention one of these bugs will be cheerfully ignored (or given a polite "thanks for the report, in this man page the bug is already mentioned" message if I am in a particularly good mood).

Subscribe to the mailing list by sending mail to list-subscribe@maradns.org with "subscribe" as the subject line, and describe the bug by sending email to list@maradns.org.

When I try to run MaraDNS, I get a Fatal error: Error running populate_main program or a Faral error: init_cache() failed error message.

This error message should not be visible. If it appears, subscribe to the mailing list (see above), and describe your problem by sending email to list@maradns.org. Be sure to include the following information:

*
The contents of your /etc/maradns/mararc file
*
The contents of any files in /etc/maradns
*
The full output MaraDNS generates

I am trying to register a domain under the .au or the .de name space, and my registrar is not taking my domain name

Both the German registrar and the Australian registrars require a RR_ANY request to return NS and SOA records. MaraDNS can do this if you add the following line to your mararc file:

default_rrany_set = 15

After I start MaraDNS, I can not see the process when I run netstat -na

Udp services do not have a prominent "LISTEN" when netstat is run.

When MaraDNS is up, the relevent line in the netstat output looks like this:

udp        0      0 127.0.0.4:53            0.0.0.0:* 

While on the topic of netstat, if you run netstat -nap as root, you can see the names of the processes which are providing internet services.

What string library does MaraDNS use?

MaraDNS uses her own string library, which is called the "js_string" library. Man pages for most of the functions in the js_string library are in the folder doc/man of the MaraDNS distribution

Why is MaraDNS public domain instead of BSD or GPL licensed?

So that MaraDNS can be integrated with Python without trouble. While Python is, I believe, currently GPL compatable, Python was not GPL-compatible at the time I decided on a license for MaraDNS.

Why does MaraDNS use a multithreaded model?

The multithreaded model is, plain and simple, the simplest way to write a functioning recursive DNS server. There is a reason why MaraDNS, pdnsd, and BIND 9 all use the multithreaded model.

I feel that XXX feature should be added to MaraDNS

Before sending mail to the list with a feature request, please read the UNIMPLEMENTED FEATURES section of the MaraDNS man page, which has a list of feature requests other people have already sent me. If you do not see your requested feature in this section of the man page, send an email to the mailing list so that I can add your feature request to the UNIMPLEMENTED FEATURES section of the MaraDNS man page.

Feature requests which include a patch which implements the feature in question are may even be implemented by MaraDNS, as long as the patch comes with a declaration that the patch is public domain.

Note that MaraDNS is currently "frozen". In other words, new features will not be added until after the 1.0 release.

Is there any process I need to follow to add a patch to MaraDNS?

Yes. Send a patch to me in email, along with a statement that you place the contents of the patch in to the public domain. If I find that the patch works well, I will integrate it in to MaraDNS.

Can MaraDNS act as a secondary nameserver?

Yes, but not in the same manner as traditional DNS servers.

MaraDNS' philosophy for the 1.0 release is simplicity and security. Since it is simpler to make the programs that handle the getting and serving of zone files separate applications, I have elected to use this approach for the 1.0 release.

I feel that one of UNIX's great strengths is the ability to use a series of small, simple programs together to perform complex tasks. This is the approach I am taking with MaraDNS 1.0.

The "core" of a DNS server ideally is doing little more than the following:

*
Converting data from external sources in to the DNS server's internal format using modules.
*
Caching data loaded from "slow" sources of data. (External DNS servers, SQL servers, etc.)
*
Converting DNS packets to requests for data from said sources.
*
Converting data from said sources into DNS packets.

(Now, with the way I coded the recursive section of MaraDNS, I have strayed from that ideal, but that is another story)

What is the difference between an authoritative and a recursive DNS server?

A recursive DNS server is a DNS server that is able to contact other DNS servers in order to resolve a given domain name label. This is the kind of DNS server one points to in /etc/resolve.conf

An authoritative DNS server is a DNS server that a recursive server contacts in order to find out the answer to a given DNS query.

The getzone client isn't allowing me to add certain hostnames to my zone

For security reasons, MaraDNS' getzone client does not add records which are not part of the zone in question. For example, if someone has a zone for example.com, and this record in the zone:

P1.1.1.10.in-addr.arpa.|86400|dns.example.com.

MaraDNS will not add the record, since the record is out-of-bailiwick. In other words, it is a host name that does not end in .example.com.

There are two workarounds for this issue:

*
Create a zone file for 1.1.10.in-addr.arpa., and put the PTR records there.
*
Use rcp, rsync, or another method to copy over the zone files in question.

I have having problems transferring zones from MaraDNS' zone server to a BIND zone transfer client

BIND is rather picky about what kind of data it will accept from a zone server. Make sure the following is true with your domain:

*
Make sure that the authoritative NS records are at the top of your zone, immediately after the SOA record
*
Make sure that your authoritative NS records are NS records for your zone
*
To work around a known bug in MaraDNS, make sure you have at least one non-NS record between the authoritative NS records for your zone and any delegation NS records that exist in the zone.

Here is an example bad zone file:

Sexample.com.|86400|example.com.|hostmaster@example.com.|1|86400|3600|6048000|86400
Nbad.example.com.|86400|ns1.example.com.
Nbad.example.com.|86400|ns2.example.com.
Nsubdomain.example.com.|86400|ns.subdomain.example.com.
Aexample.com.|12345|10.2.3.4

Here is the same zone file, with corrections:

Sexample.com.|86400|example.com.|hostmaster@example.com.|1|86400|3600|6048000|86400
Nexample.com.|86400|ns1.example.com.
Nexample.com.|86400|ns2.example.com.
Aexample.com.|12345|10.2.3.4
Nsubdomain.example.com.|86400|ns.subdomain.example.com.

Is MaraDNS portable?

While I intend to have MaraDNS be a portable DNS server which will compile on a variety of unices, right now all of MaraDNS's work development is being done on Linux. In terms of proprietary oses, I know that SCO Open Server, SCO UNIXware and Solaris have issues running a UDP or TCP server in a chroot() environment. Word is that, with Solaris and UNIXware, placing /dev/tcp and /dev/udp in the chroot() jail will allow a server like MaraDNS to function.

See below for why MaraDNS has problems as a recursive nameserver in Solaris.

How do I compile MaraDNS on OpenBSD?

There are two ways to do this:

To use the native thread suport you have to add -pthread to the CFLAGS.

To use the GNU pthread you need to install the pth package and add -L/usr/local/lib/pth to the linker.

(Florin Iucha provided this tip)

Can I use MaraDNS in Windows?

Yes.

Provided, of course, that one has the Cygwin environment which emulates a UNIX environment in Windows.

First, download <A href= http://www.maradns.org/download/maradns-0.8.35.tar.bz2>MaraDNS-0.8.35. Second, download the <A href= http://www.maradns.org/download/maradns-0.8.35.cygwin.patch>The patch that allows MaraDNS to compile on Cygwin (Thanks, Gerrit, for the patch)

Note that I personally do not use Windows, so I have not been able to verify that this patch doesn't introduce new bugs in to MaraDNS. However, word is that this patch does allows MaraDNS to compile on Windows.

I am using MaraDNS on Solaris, and MaraDNS refuses to start

There is a known issue with MaraDNS having memory leaks when used as a recursive nameserver on the Solaris operating system. This problem does not exist in Linux, so I can not currently resolve this issue. Until I can get access to a Solaris box, or a Solaris developer sends me a patch which fixes this problem (and confirms that the patch works), Solaris can not function as a recursive DNS server.

The workaround is to use MaraDNS only as an authoritative nameserver.

 

BOGUES

Si une résolution demande un enregistrement A, et que l'entregistrement est un CNAME pointant vers une liste d'adresses IP, le resolver récursif de MaraDNS retourne la première IP listée avec le CNAME.

Si une résolution demande un enregistrement A, et que cet enregistrement est un CNAME pointant vers un autre CNAME (ou plus), bien que MaraDNS retourne l'adresse IP correcte (tant que le glueless level n'est pas atteint), MaraDNS retournera erronément que le premier CNAME de la chaîne pointe directement vers l'IP.

Si un enregistrement NS pointe vers une liste d'adresses IP, et que l'enregistrement en question est "glueless" (c'est à dire que MaraDNS a du retourner jusqu'aux root servers pour en trouver l'adresse), le resolver récursif de MaraDNS ne listera que la première adresse IP comme serveur de noms.

Lorsque le resolver récursif de MaraDNS reçoit une réponse "host not there", au lieu d'utiliser le SOA minimum comme TTL de la réponse "host not there" (cf. RFC1034 §4.3.4), MaraDNS utilise le TTL de la réponse SOA.

MaraDNS conserve les enregistrements NS dans le cache pendant une journée au lieu du TTL renvoyé par le serveur distant.

MaraDNS n'a qu'un support très limité du transport de données DNS sur TCP. En particulier, MaraDNS n'utilise DNS sur TCP que pour les transferts de zones, gérés par le programme conjoint zoneserver (voir zoneserver(8) pour son usage).

MaraDNS gère la requête "any record" (255) en ne retournant qu'un enregistrement A et MX (optionnellement: enregistrements NS et SOA), au lieu de retourner tout enregistrement associé au nom concerné. Les seuls endroits où j'ai eu connaissance de l'utilisation de la requête "any record" sont les MTAs, et les registrars des TLD .de et .au. En mode récursif, une requête "any record" est traduite en deux requêtes A et MX, que MaraDNS concatène.

MaraDNS ne retourne jamais un NXDOMAIN (rien dans la réponse, SOA dans la section d'autorité, code d'erreur "name error" [3]). Si un label de nom DNS n'existe pour aucun RR, MaraDNS retournera malgré tout un "no host" (rien dans la réponse, SOA, code d'erreur 0), impliquant que le nom d'hôte existe pour au moins un type de RR.

Si un enregistrement wildcard MX existe sous la forme "*.example.com" et qu'il y a un enregistrement A pour "www.example.com", mais pas d'enregistrement MX pour "www.example.com", le comportement correct (RFC1034 §4.3.3) serait de retourner "no host" (rien dans la réponse, SOA présent, code de retour 0) pour une requête MX de www.example.com. À la place, MaraDNS retourne l'enregistrement MX associé à "*.example.com".

Les enregistrements "astérisque" (que la RFC1034 nomme "wildcards") ne peuvent être associés à des RR de type NS.

Le resolver récursif de MaraDNS s'arrête de résoudre lorsqu'il trouve une réponse dans la section AR. Ceci présente un problème dans le cas où on nom d'hôte donné et son adresse sont enregistrés auprès des root servers, et que l'IP n'est plus à jour. Si ceci se produit, un serveur "plus proche" du root server donnera l'adresse IP obsolète, même si les DNS autoritaires pour la zone connaissent l'IP correcte. Notez que résoudre ceci augmenterait le trafic DNS.

MaraDNS, comme toute autre implémentation DNS connue, ne supporte un QDCOUNT que de 0 ou 1.

 

FONCTIONS NON MISES EN OEUVRE

Les fonctions suivantes ne seront pas mises en oeuvre dans la prochaine version 1.0 de MaraDNS :

MaraDNS ne devient pas un démon. Il est possible d'utiliser un shell avec contrôle de tâche pour faire de MaraDNS un processus en mode démon, par exemple :

nohup maradns > /dev/null &

MaraDNS n'utilise pas syslog ou toute autre commodité de journalisation pour les messages générés par MaraDNS. À la place, les messages sont journalisés sur la sortie standard. Il est possible d'utiliser une redirection du shell pour journaliser vers un fichier, par exemple :

touch /var/log/maradns
nohup maradns >> /var/log/maradns &

MaraDNS n'a pas de support d'une "zone par défaut" qui permettrait d'ajouter ou retirer des zones sans modifier le fichier de configuration de MaraDNS.

MaraDNS, comme tous les autres serveurs DNS connus, n'a pas de support SQL.

MaraDNS n'a pas de support pour autoriser certaines adresses à ne résoudre qu'un certain nombre d'hôtes en interrogeant le serveur DNS, ou bien de résoudre différemment selon l'adresse IP réalisant la requête.

MaraDNS ne supporte pas IPv6.

MaraDNS n'a pas de gestion des signaux. Envoyer un signal HUP à MaraDNS termine le processus au lieu de dire à MaraDNS de relire ses fichiers de configuration.

À l'exception de résoudre certains types de RR non présents dans la RFC1035, MaraDNS ne supporte aucune fonction DNS non présente dans la RFC1034 ou RFC1035.

MaraDNS, conformément à la RFC1035 §4.3.3, n'autorise l'usage de "wildcards" qu'au début d'un nom DNS. Par exemple, un enregistrement comme "foo.*.example.com" ou "www.*" ne fonctionnera pas.

 

LEGAL DISCLAIMER

THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 

AUTEUR

Sam Trenholme http://www.samiam.org/

 

TRADUCTEUR

Traduit en français par Thomas Seyrat <thomas@glou.net>


 

Index

NOM
RÉSUMÉ
DESCRIPTION
UTILISATION
CONSIDÉRATIONS DE FILTRAGE
FREQUENLY ASKED QUESTIONS
BOGUES
FONCTIONS NON MISES EN OEUVRE
LEGAL DISCLAIMER
AUTEUR
TRADUCTEUR

Time: 09:27:45 GMT, December 28, 2001