1MARADNS(8)                     MaraDNS reference                    MARADNS(8)
2
3
4
5Erre con erre cigarro
6Erre con erre barril
7Rápido ruedan los carros
8En el ferrocarril
9
10

NAME

12       maradns - DNS server
13

SYNOPSIS

15       maradns [ -v | -f mararc_file_location ]
16

TABLE OF CONTENTS

18       This man page has the following sections:
19
20           Name
21           Synopsis
22           Table of Contents
23           Description
24           Usage
25           Firewall Configuration
26           Frequently Asked Questions
27           Bugs
28           Unimplemented Features
29           Legal Disclaimer
30           Authors
31
32

DESCRIPTION

34       maradns is a DNS server written with security, simplicity, and
35       performance in mind.
36
37       maradns has two forms of arguments, both of which are optional.
38
39       The first is the location of a mararc file which MaraDNS obtains all
40       configuration information from.  The default location of this file is
41       /etc/mararc.  This is specified in the form maradns -f
42       mararc_file_location; mararc_file_location is the location of the
43       mararc file.
44
45       It is also possible to have MaraDNS display the version number and
46       exit. This is specified by invoking maradns in the form maradns -v or
47       maradns --version
48

USAGE

50       MaraDNS consists of two programs: maradns, an authoritative-only
51       nameserver, and Deadwood, a recursive name server. Deadwood has its own
52       man page.
53
54       In order for MaraDNS to function as an authoritative nameserver, two or
55       more files need to be set up: the mararc file and one or more "csv2"
56       (or "csv1") zone files.
57
58       The format of a csv2 zone file can be obtained from the csv2(5) manual
59       page. The configuration format of the mararc file can be obtained from
60       the mararc(5) manual page.
61
62       In order to have MaraDNS run as a daemon, the duende program is used to
63       daemonize MaraDNS. See the duende(8) manual page for details.
64

FIREWALL CONFIGURATION

66       When using the maradns authoritative nameserver, allow UDP connections
67       from all hosts on the internet to UDP port 53 for the IP that the
68       authoritative nameserver uses.
69
70       When using the Deadwood recursive nameserver:
71
72       * Allow UDP connections from the Deadwood server to any machine on the
73         internet where the UDP destination port is 53
74
75       * Allow UDP connections from any machine on the internet to the IP of
76         the recursive server, where the source port from the remote server is
77         53, and the destination port is between 15000 and 19095 (inclusive)
78
79       * Allow UDP connections from IPs that use Deadwood as a recursive DNS
80         server to port 53
81
82       Deadwood uses a strong secure RNG (RadioGatun[32]) for both the query
83       (16 bits of entropy) and the source port of the query (12 bits of
84       entropy).  This makes spoofing replies to a Deadwood recursive server
85       more difficult, since the attacker has only a one in 250 million chance
86       that a given spoofed reply will be considered valid.
87

FREQUENTLY ASKED QUESTIONS

89    INDEX
90
91           1. I'm using an older version of MaraDNS
92
93           2. How do I try out MaraDNS?
94
95           3. What license is MaraDNS released under?
96
97           4. How do I report bugs in MaraDNS?
98
99           5. Some of the postings to the mailing list do not talk about
100           MaraDNS!
101
102           6. How do I get off the mailing list?
103
104           7. How do I set up reverse DNS on MaraDNS?
105
106           8. I am on a slow network, and MaraDNS can not process recursive
107           queries
108
109           9. When I try to run MaraDNS, I get a cryptic error message.
110
111           10. After I start MaraDNS, I can not see the process when I run
112           netstat -na
113
114           11. What string library does MaraDNS use?
115
116           12. Why does MaraDNS use a multi-threaded model?
117
118           13. I feel that XXX feature should be added to MaraDNS
119
120           14. I feel that MaraDNS should use another documentation format
121
122           15. Is there any process I need to follow to add a patch to
123           MaraDNS?
124
125           16. Can MaraDNS act as a primary nameserver?
126
127           17. Can MaraDNS act as a secondary nameserver?
128
129           18. What is the difference between an authoritative and a recursive
130           DNS server?
131
132           19. The getzone client isn't allowing me to add certain hostnames
133           to my zone
134
135           20. Is MaraDNS portable?
136
137           21. Can I use MaraDNS in Windows?
138
139           22. MaraDNS freezes up after being used for a while
140
141           23. What kind of Python integration does MaraDNS have
142
143           24. Doesn't "kvar" mean "four" in Esperanto?
144
145           25. How scalable is MaraDNS?
146
147           26. I am having problems setting upstream_servers
148
149           27. Why doesn't the MaraDNS.org web page validate?
150
151           28. How do MX records work?
152
153           29. Does MaraDNS have support for SPF?
154
155           30. I'm having problems resolving CNAMES I have set up.
156
157           31. I have a NS delegation, and MaraDNS is doing strange things.
158
159           32. I am transferring a zone from another server, but the NS
160           records are these strange "synth-ip" records.
161
162           33. Where is the root.hints file?
163
164           34. Are there any plans to use autoconf to build MaraDNS?
165
166           35. How do I change the compiler or compile-time flags with
167           MaraDNS' build process?
168
169           36. Will you make a package for the particular Linux distribution I
170           am using?
171
172           37. I am using the native Windows port of MaraDNS, and some
173           features are not working.
174
175           38. MaraDNS isn't starting up
176
177           39. You make a lot of releases of MaraDNS; at our ISP/IT
178           department, updating software is non-trivial.
179
180           40. I have star records in my zones, and am having problems with
181           NXDOMAINs/IPV6 resolution
182
183           41. I have a zone with only SOA/NS records, and the zone is not
184           working.
185
186           42. I am having problems registering my domain with AFNIC (the
187           registrar for .fr domains)
188
189           43. I can't see the full answers for subdomains I have delegated
190
191           44. MaraDNS 1 has a problem resolving a domain
192
193           45. MaraDNS 1.2 has issues with NXDOMAINS and case sensitivity.
194
195           46. Can MaraDNS offer protection from phishing and malicious sites?
196
197           47. Does maradns support star (wildcard) records?
198
199           48. I'm having problems using MaraDNS with some *NIX command line
200           applications like telnet
201
202           49. My virus scanner reports that MaraDNS or Deadwood has a virus
203
204           50. I can not subscribe to the MaraDNS mailing list
205
206           51. How does MaraDNS respond to EDNS (RFC2671) packets?
207
208           52. How to I get MaraDNS to always give the same IP to all DNS
209           queries?
210
211           53. Why did you change MaraDNS' tagline?
212
213           54. How do you stop MaraDNS from taking part in a distributed
214           denial-of-service attack?
215
216           55. What about DNS-over-TCP?
217
218           56. How do I use MaraDNS with systemd?
219
220           57. Why doesn't MaraDNS use IP_FREEBIND?
221
222           58. Is there a web interface for MaraDNS?
223
224           59. What does the message “don’t forget the trailing dot” mean?
225
226           60. Does MaraDNS support newer top level domains?
227
228    ANSWERS
229
230    1. I'm using an older version of MaraDNS
231
232       Upgrade to MaraDNS 2.0.  Here is an upgrade guide.
233
234       MaraDNS 1.4 is only supported for critical security updates; this
235       support is being phased out and MaraDNS 1 will no longer be supported
236       on June 21, 2015.
237
238    2. How do I try out MaraDNS?
239
240       Read the quick start guide, which is the file named 0QuickStart in the
241       MaraDNS distribution.
242
243    3. What license is MaraDNS released under?
244
245       MaraDNS is released with the following two-clause BSD-type license:
246
247           Copyright (c) 2002-2015 Sam Trenholme and others
248
249           TERMS
250
251           Redistribution and use in source and binary forms, with or without
252           modification, are permitted provided that the following conditions
253           are met:
254
255           1. Redistributions of source code must retain the above copyright
256           notice, this list of conditions and the following disclaimer.
257
258           2. Redistributions in binary form must reproduce the above
259           copyright notice, this list of conditions and the following
260           disclaimer in the documentation and/or other materials provided
261           with the distribution.
262
263           This software is provided 'as is' with no guarantees of correctness
264           or fitness for purpose.
265
266    4. How do I report bugs in MaraDNS?
267
268       Post your bug report as a Github issue.
269
270    5. Some of the postings to the mailing list do not talk about MaraDNS!
271
272       As of September 2013, the mailing list has become moderated and only
273       postings on the mailing list are relevant MaraDNS announcements.
274
275    6. How do I get off the mailing list?
276
277       Send an email to list-unsubscribe@maradns.org, or an email to list-
278       request@maradns.org with "unsubscribe" as the subject line.
279
280       The mailing list will send you an email confirming the unsubscribe
281       request; this email needs to be replied to in order to get off the
282       list.
283
284    7. How do I set up reverse DNS on MaraDNS?
285
286       Reverse DNS (sometimes called "reverse mapping") is set up by using PTR
287       (pointer) records. For example, the PTR record which performs the
288       reverse DNS lookup for the ip 10.2.3.4 looks like this in a CSV2 zone
289       file:
290
291           4.3.2.10.in-addr.arpa. PTR www.example.com.
292
293       It is also possible to use a special "FQDN4" which automatically sets
294       up the reverse mapping of a given record:
295
296           www.example.com. FQDN4 10.2.3.4
297
298       If you wish to have a PTR (reverse DNS lookup; getting a DNS name from
299       a numeric IP) record work on the internet at large, it is not a simple
300       matter of just adding a record like this to a MaraDNS zonefile. One
301       also needs control of the appropriate in-addr.arpa. domain.
302
303       While it could make logical sense to contact the IP 10.11.12.13 when
304       trying to get the reverse DNS lookup (fully qualified domain name) for
305       a given IP, DNS servers don't do this. DNS server, instead, contact the
306       root DNS servers for a given in-addr.arpa name to get the reverse DNS
307       lookup, just like they do with any other record type.
308
309       When an internet service provider is given a block of IPs, they are
310       also given control of the DNS zones which allow them to control reverse
311       DNS lookups for those IPs. While it is possible to obtain a domain and
312       run a DNS server without the knowledge or intervention of an ISP, being
313       able to control reverse DNS lookups for those IPs requires ISP
314       intervention.
315
316    8. I am on a slow network, and Deadwood can not process recursive queries
317
318       Deadwood, by default, only waits two seconds for a reply from a remote
319       DNS server. This default can be increased by adding a line like this in
320       the mararc file:
321
322           timeout_seconds = 5
323
324
325       Note that making this too high will slow MaraDNS down when DNS servers
326       are down, which is, alas, all too common on today's internet.
327
328    9. When I try to run MaraDNS, I get a cryptic error message.
329
330       There is usually some context of where there is a syntax error in a
331       data file before the cryptic error message. For example, when there is
332       a syntax error in a csv2 zone file, MaraDNS will tell you exactly at
333       what point it had to terminate parsing of the zone file.
334
335       If MaraDNS does return a cryptic error message without letting you know
336       what is wrong, let us know in a Github issue so that we can fix the
337       bug. MaraDNS is designed to be easy to use; cryptic error messages go
338       against this spirit.
339
340    10. After I start MaraDNS, I can not see the process when I run netstat
341    -na
342
343       Udp services do not have a prominent "LISTEN" when netstat is run.
344
345       When MaraDNS is up, the relevant line in the netstat output looks like
346       this: udp 0 0 127.0.0.1:53 0.0.0.0:*
347
348       While on the topic of netstat, if you run netstat -nap as root on Linux
349       and some other *nix operating systems, you can see the names of the
350       processes which are providing internet services.
351
352    11. What string library does MaraDNS use?
353
354       MaraDNS uses its own string library, which is called the "js_string"
355       library. Man pages for most of the functions in the js_string library
356       are in the folder doc/man of the MaraDNS distribution
357
358    12. Why does MaraDNS use a multi-threaded model?
359
360       MaraDNS 2.0 no longer uses threads.
361
362       It took me three years to rewrite MaraDNS' recursive resolver as a
363       separate non-threaded daemon. This has been done, and now all recursion
364       is done with Deadwood which does not need threads.
365
366    13. I feel that XXX feature should be added to MaraDNS
367
368       There are no plans to add new features to MaraDNS or Deadwood at this
369       time.
370
371    14. I feel that MaraDNS should use another documentation format
372
373       The reason that MaraDNS uses its own documentation format is to satisfy
374       both the needs of translators to have a unified document format and my
375       own need to use a documentation format that is simple enough to be
376       readily understood and which I can add features on an as needed basis.
377
378       The documentation format is essentially simplified HTML with some
379       special tags added to meet MaraDNS' special needs.
380
381       This gives me more flexibility to adapt the documentation format to
382       changing needs. For example, when someone pointed out that it's not a
383       good idea to have man pages with hi-bit characters, it was a simple
384       matter to add a new HIBIT tag which allows man pages to be without hi-
385       bit characters, and other document formats to retain hi-bit characters.
386
387       Having a given program have its own documentation format is not without
388       precedent; Perl uses its own "pod" documentation format.
389
390    15. Is there any process I need to follow to add a patch to MaraDNS?
391
392       I no longer accept third party patches
393
394    16. Can MaraDNS act as a primary nameserver?
395
396       Yes.
397
398       The zoneserver program serves zones so that other DNS servers can be
399       secondaries for zones which MaraDNS serves. This is a separate program
400       from the maradns server, which processes authoritative UDP DNS queries,
401       and Deadwood which processes recursive DNS queries.
402
403       See the DNS master document in the MaraDNS tutorial for details.
404
405    17. Can MaraDNS act as a secondary nameserver?
406
407       Yes.
408
409       Please read the DNS slave document, which is part of the MaraDNS
410       tutorial.
411
412    18. What is the difference between an authoritative and a recursive DNS
413    server?
414
415       A recursive DNS server is a DNS server that is able to contact other
416       DNS servers in order to resolve a given domain name label. This is the
417       kind of DNS server one points to in /etc/resolv.conf. MaraDNS uses the
418       Deadwood daemon to process recursive DNS queries.
419
420       An authoritative DNS server is a DNS server that a recursive server
421       contacts in order to find out the answer to a given DNS query. The
422       maradns daemon processes authoritative DNS queries.
423
424    19. The fetchzone client isn't allowing me to add certain hostnames to my
425    zone
426
427       For security reasons, MaraDNS' fetchzone client does not add records
428       which are not part of the zone in question. For example, if someone has
429       a zone for example.com, and this record in the zone:
430
431       1.1.1.10.in-addr.arpa. PTR dns.example.com.
432
433       MaraDNS will not add the record, since the record is out-of-bailiwick.
434       In other words, it is a host name that does not end in .example.com.
435
436       There are two workarounds for this issue:
437
438       * Create a zone file for 1.1.10.in-addr.arpa., and put the PTR records
439         there.
440
441       * Use rcp, rsync, or another method to copy over the zone files in
442         question.
443
444    20. Is MaraDNS portable?
445
446       MaraDNS is developed in CentOS 6 and Windows 7.  MaraDNS may or may not
447       compile and run on other systems.
448
449    21. Can I use MaraDNS in Windows?
450
451       Yes. There is both a partial mingw32 (native win32 binary) port and a
452       full Cygwin port of MaraDNS; both of these ports are part of the native
453       build of MaraDNS. Deadwood has full Windows support, including the
454       ability to run as a service.
455
456    22. MaraDNS freezes up after being used for a while
457
458       If using your ISP's name servers or some other name servers which are
459       not, in fact, root name servers, please make sure that you are using
460       the upstream_servers dictionary variable instead of the root_servers
461       dictionary variable.
462
463       If you still see MaraDNS freeze up after making this correction, please
464       send a bug report as a Github issue.
465
466    23. What kind of Python integration does MaraDNS have
467
468       The mararc file uses the same syntax that Python uses; in fact, Python
469       can parse a properly formatted mararc file.
470
471       There is no other integration with Python.
472
473    24. Doesn't "kvar" mean "four" in Esperanto?
474
475       Indeed, it does. However the use of "kvar" in the MaraDNS source code
476       only coincidentally is an Esperanto word. "kvar" is short for "Kiwi
477       variable"; a lot of the parsing code comes from the code used in the
478       Kiwi spam filter project.
479
480    25. How scalable is MaraDNS?
481
482       MaraDNS is optimized for serving a small number of domains as quickly
483       as possible. That said, MaraDNS is remarkably efficnent for serving a
484       large number of domains, as long as the server MaraDNS is on has the
485       memory to fit all of the domains, and as long as the startup time for
486       loading a large number of domains can be worked around.
487
488       The "big-O" or "theta" growth rates for various MaraDNS functions are
489       as follows, where N is the number of authoritative host names being
490       served:
491
492       Startup time                            N
493       Memory usage                            N
494       Processing incoming DNS requests        1
495
496       As can be seen, MaraDNS will process 1 or 100000 domains in the same
497       amount of time, once the domain names are loaded in to memory.
498
499    26. I am having problems setting upstream_servers
500
501       upstream_servers is only supported by Deadwood, and is no longer
502       supported in MaraDNS 2.0.  The upstream_servers dwood3rc variable is
503       set thusly:
504
505           upstream_servers["."] = "10.3.28.79, 10.2.19.83"
506
507       Note the ["."].
508
509       Note that the upstream_servers variable needs to be initialized before
510       being used via upstream_servers = {} (the reason for this is so that a
511       dwood3rc file has 100% Python-compatible syntax). A complete dwood3rc
512       file that uses upstream_servers may look like this:
513
514       ipv4_bind_addresses = "127.0.0.1"
515       chroot_dir = "/etc/maradns"
516       recursive_acl = "127.0.0.1/8"
517       upstream_servers = {}
518       upstream_servers["."] = "10.1.2.3, 10.2.4.6"
519
520    27. Why doesn't the MaraDNS.org web page validate?
521
522       HTML pages on the MaraDNS.org web site should validate as HTML 4.0
523       Transitional. However, the CSS will not validate.
524
525       I have designed MaraDNS' web page to be usable and as attractive as
526       possible in any major browser released in the last ten years. Cross-
527       browser support is more important than strict W3 validation. The reason
528       why the CSS does not validate is because I need a way to make sure
529       there is always a scrollbar on the web page, even if the content is not
530       big enough to merit one; this is to avoid the content jumping from page
531       to page. There is no standard CSS tag that lets me do this. I'm using a
532       non-standard tag to enable this in Gecko (Firefox's rendering engine);
533       this is enabled by default in Trident (Internet Explorer's rendering
534       engine). The standards are deficient and blind adherence to them would
535       result in an inferior web site.
536
537       There are also two validation warnings generated by redefinitions which
538       are needed as part of the CSS filters used to make the site attractive
539       on older browsers with limited CSS support.
540
541       On a related note, the reason why I use tables instead of CSS for some
542       of the layout is because Microsoft Internet Explorer 6 and other
543       browsers do not have support for the max-width CSS property. Without
544       this property, the web page will not scale down correctly without using
545       tables.  Additionally, tables allow a reasonably attractive header in
546       browsers without CSS support.
547
548    28. How do MX records work?
549
550       How MX records work:
551
552       * The mail transport agent (Sendmail, Postfix, Qmail, MS Exchange,
553         etc.)  looks up the MX record for the domain
554
555       * For each of the records returned, the MTA (mail transport agent)
556         looks up the IP for the names.
557
558       * It will choose, at random, any of the MXes with the lowest priority
559         number.
560
561       * Should that server fail, it will try another server with the same
562         priority number.
563
564       * Should all MX records with a given priority number fail, the MTA will
565         try sending email to any of the MX records with the second-lowest
566         priority value.
567
568       As an aside, do not have MX records point to CNAMEs.
569
570    29. Does MaraDNS have support for SPF?
571
572       SPF, or sender policy framework, is method of using DNS that makes it
573       more difficult to forge email. MaraDNS has full support for SPF, both
574       via TXT records and RFC4408 SPF records.
575
576       SPF configuration is beyond the scope of MaraDNS' documentation.
577       However, at the time this FAQ entry was last updated (July, 2013),
578       information and documentation concerning SPF is available at
579       http://openspf.org. The BIND examples will work in MaraDNS csv2 zone
580       files as long as the double quotes (") are replaced by single quotes
581       ('). For example, a SPF TXT record that looks like example.net. IN TXT
582       "v=spf1 +mx a:colo.example.com/28 -all" in a BIND zone file will look
583       like example.net. TXT 'v=spf1 +mx a:colo.example.com/28 -all' in a
584       MaraDNS zone file. MaraDNS can also make the corresponding SPF record,
585       which will have the syntax example.net. SPF 'v=spf1 +mx
586       a:colo.example.com/28 -all'.
587
588       Use '\x7e' to put a tilde ("~" character) in a SPF record:
589
590       example.com. SPF 'v=spf1 +mx a:colo.example.com/28 '\x7e'all'
591
592    30. I'm having problems resolving CNAMES I have set up.
593
594       This is probably because you have set up what MaraDNS calls a dangling
595       CNAME record.
596
597       Let us suppose we have a CNAME record without an A record in the local
598       DNS server's database, such as:
599
600            google.example.com. CNAME www.google.com.
601
602       This record, which is a CNAME record for "google.example.com", points
603       to "www.google.com". Some DNS servers will recursively look up
604       www.google.com, and render the above record like this:
605
606            google.example.com. CNAME www.google.com.
607            www.google.com. A 66.102.7.104
608
609       For security reasons, MaraDNS doesn't do this. Instead, MaraDNS will
610       simply output:
611
612            google.example.com. CNAME www.google.com.
613
614       Some stub resolvers will be unable to resolve google.example.com as a
615       consequence.
616
617       If you set up MaraDNS to resolve CNAMEs thusly, you will get a warning
618       in your logs about having a dangling CNAME record.
619
620       If you want to remove these warnings, add the following to your mararc
621       file:
622
623            no_cname_warnings = 1
624
625       Information about how to get MaraDNS to resolve dangling CNAME records
626       is in the tutorial file dangling.html
627
628    31. I have a NS delegation, and MaraDNS is doing strange things.
629
630       This is only an issue in MaraDNS 1.4. MaraDNS 2.0 does not allow the
631       same IP to both authoritatively and recursively resolve records.
632
633    32. I am transferring a zone from another server, but the NS records are
634    these strange "synth-ip" records.
635
636       MaraDNS expects, in csv2 zone files, for all delegation NS records to
637       be between the SOA record and the first non-NS record.
638
639       If a zone looks like this:
640
641       example.net. +600 soa ns1.example.net.
642       hostmaster@example.net 10 10800 3600 604800 1080
643       example.net. +600 mx 10 mail.example.net.
644       example.net. +600 a 10.2.3.5
645       example.net. +600 ns ns1.example.net.
646       example.net. +600 ns ns3.example.net.
647       mail.example.net. +600 a 10.2.3.7
648       www.example.net. +600 a 10.2.3.11
649
650       Then the NS records will be "synth-ip" records.
651
652       The zone should look like this:
653
654       example.net. +600 soa ns1.example.net.
655       hostmaster@example.net 10 10800 3600 604800 1080
656       example.net. +600 ns ns1.example.net.
657       example.net. +600 ns ns3.example.net.
658       example.net. +600 mx 10 mail.example.net.
659       example.net. +600 a 10.2.3.5
660       mail.example.net. +600 a 10.2.3.7
661       www.example.net. +600 a 10.2.3.11
662
663       This will remove the "synth-ip" records.
664
665       To automate this process, this awk script is useful:
666
667       fetchzone whatever.zone.foo 10.1.2.3 | awk '
668       {if($3 ~ /ns/ || $3 ~ /soa/){print}
669       else{a = a "\n" $0}}
670       END{print a}' > zonefile.csv2
671
672       Replace "whatever.zone.foo" with the name of the zone you are fetchin
673       10.1.2.3 with the IP address of the DNS master, and zonefile.csv2 with
674       the name of the zone file MaraDNS loads.
675
676    33. Where is the root.hints file?
677
678       MaraDNS (actually, Deadwood), unlike BIND, does not need a complicated
679       root.hints file in order to have custom root servers. In order to
680       change the root.hints file, add something like this to your dwood3rc
681       file:
682
683       root_servers["."] =  "131.161.247.232,"
684       root_servers["."] += "208.185.249.250,"
685       root_servers["."] += "66.227.42.140,"
686       root_servers["."] += "66.227.42.149,"
687       root_servers["."] += "65.243.92.254"
688
689       Note that there is no "+=" in the first line, and the last line does
690       not have a comma at the end. Read the recursive tutorial document for
691       more information.
692
693    34. Are there any plans to use autoconf to build MaraDNS?
694
695       No.
696
697       In more detail, MaraDNS does not use autoconf for the following
698       reasons:
699
700       * Autoconf is designed to solve a problem that existed in the mid 1990s
701         but does not exist today: A large number of different incompatible C
702         compilers and libc implementations. These days, most systems are
703         using gcc as the compiler and some version of glibc as the libc.
704         There is no longer a need, for example, to figure out whether a given
705         implementation of getopt() allows '--' options.  MaraDNS's
706         ./configure script can be run in only a second or two; compare this
707         to the 3-5 minute process autoconf's ./configure needs.
708
709       * Autoconf leaves GPL-tained files in a program's build tree. MaraDNS
710         is licensed under a BSD license that is not GPL-compatible, so
711         MaraDNS can not be distributed with these GPL-licensed files.
712
713       This leads us to the next question:
714
715    35. How do I change the compiler or compile-time flags with MaraDNS' build
716    process?
717
718       To change the compiler used by MaraDNS:
719
720       * Run the ./configure script
721
722       * Open up the file Makefile with an editor
723
724       * Look for a line that starts with CC
725
726       * If there is no line that starts with CC, create one just before the
727         line that starts with FLAGS
728
729       * Change (or create) that line to look something like CC=gcc296 In this
730         example, the 2.96 version of gcc is used to compile MaraDNS.
731
732       * Note that it is important to not remove anything from this line you
733         do not understand; doing so will make MaraDNS unable to compile or
734         run. So, if the CC line looks like
735         CC=gcc $(LDFLAGS) -DNO_FLOCK and you want to compile with
736         gcc 2.96, change the line to look like
737         CC=gcc296 $(LDFLAGS) -DNO_FLOCK retaining the flags added
738         by the configuration script.
739
740       Changing compile-time flags is a similar process:
741
742       * Run the ./configure script
743
744       * Open up the file Makefile with an editor
745
746       * Look for a line that starts with FLAGS
747
748       * Change (or create) that line to look something like FLAGS=-O3 In this
749         example, MaraDNS is compiled with the -O3 option.
750
751       * Note that it is important to not remove anything from this line you
752         do not understand; doing so will make MaraDNS unable to compile or
753         run. So, if the FLAGS line looks like
754         FLAGS=-O2 -Wall -DSELECT_PROBLEM and you want to compile at
755         optimization level three, change this line to look like
756         FLAGS=-O2 -Wall -DSELECT_PROBLEM retaining the flags added
757         by the configuration script. -DSELECT_PROBLEM for example, is needed
758         in the Linux compile or MaraDNS will have problems with freezing up.
759
760    36. Will you make a package for the particular Linux distribution I am
761    using?
762
763       No.
764
765       There is, however, a CentOS 5-compatible RPM spec file in the build
766       directory.
767
768    37. I am using the native Windows port of MaraDNS, and some features are
769    not working.
770
771       Since Windows 32 does not have some features that *NIX OSes have, the
772       native Windows port does not have all of the features of the *NIX
773       version of MaraDNS. In particular, the following features are disabled:
774
775       * ipv6 (this is actually a mingw32, not a Windows deficiency)
776
777       * The chroot_dir mararc variable
778
779       * The maradns_gid and maradns_uid mararc variables
780
781       * The maxprocs mararc variable
782
783       * The synth_soa_serial variable can not have a value of 2
784
785       * There is no DNS-over-TCP support
786
787       If any of the above features are desired, try compiling MaraDNS using
788       Cygwin. Note that the Cygwin port of MaraDNS does not have ipv6
789       support, and that while chroot_dir works in Cygwin, it does not have
790       the security that the *NIX chroot() call has.
791
792    38. MaraDNS isn't starting up
793
794       This is usually caused by a syntax error in one's mararc file, or by
795       another MaraDNS process already running. To see what is happening, look
796       at your system log (/var/log/messages in Centos 3) to see what errors
797       MaraDNS reports. If you do not know how to look at a system log, you
798       can also invoke MaraDNS from the command line as root; any errors will
799       be visible when starting MaraDNS.
800
801    39. You make a lot of releases of MaraDNS; at our ISP/IT department,
802    updating software is non-trivial.
803
804       Regularly updating software is required to keep something as
805       complicated as a DNS server secure; there is not a DNS server out there
806       so secure that it never needs to be updated.
807
808       Since MaraDNS is finished, updates usually only happen about once a
809       year.
810
811       The last security bug which required a MaraDNS update was made before
812       January 30, 2015.
813
814    40. I have star records in my zones, and am having problems with
815    NXDOMAINs/IPV6 resolution
816
817       This was a bug in MaraDNS 1.2 which has long since been fixed.
818
819    41. I have a zone with only SOA/NS records, and the zone is not working.
820
821       MaraDNS 1.2 had a bug where it did not correctly process zones without
822       any "normal" records. Upgrade to MaraDNS 2.0.
823
824    42. I am having problems registering my domain with AFNIC (the registrar
825    for .fr domains)
826
827       Because of an issue with AFNIC (who, annoyingly enough, check the RA
828       bit when registering a domain), in order to register a domain with
829       AFNIC using MaraDNS as your DNS server, the following steps need to be
830       followed:
831
832       * MaraDNS version 1.4 or 2.0 needs to be used; if you're using an older
833         version of MaraDNS, upgrade.
834
835       * It is necessary to have recursion disabled, if using MaraDNS 1.4,
836         either by compiling MaraDNS without recursive support (./configure
837         --authonly ; make), or by making sure MaraDNS does not have recursion
838         enabled (by not having recursive_acl set in one's MaraDNS 1.4 mararc
839         file)
840
841       If one wishes to both register domains with AFNIC and use MaraDNS 1.4
842       as a recursive DNS server, it is required to have the recursive server
843       be a separate instance of MaraDNS on a separate IP. It is not possible
844       to have the same DNS server both send DNS packets in a way that both
845       makes AFNIC happy and allows recursive queries.
846
847       Note also: AFNIC gives warnings about reverse DNS lookups; more
848       information about this issue can be found in the FAQ entry about
849       reverse DNS mappings (question 7). In addition, AFNIC requires DNS-
850       over-TCP to work; information on configuring MaraDNS to have this can
851       be found in the DNS-over-TCP tutorial.
852
853    43. I can't see the full answers for subdomains I have delegated
854
855       To have the subdomains be visible to MaraDNS 1.4 recursive nameservers,
856       add the following to your mararc file:
857
858       recurse_delegation = 1
859
860    44. MaraDNS 1 has a problem resolving a domain
861
862       This issue should be fixed in MaraDNS 2.0.
863
864       Here's what happening: I have rewritten the recursive resolver for
865       MaraDNS.  The old code was always designed to be a placeholder until I
866       wrote a new recursive resolver.
867
868       The new recursive resolver is called "Deadwood"; right now it's fully
869       functional and part of MaraDNS 2.0. More information is here:
870
871       http://maradns.blogspot.com/search/label/Deadwood
872
873       http://maradns.samiam.org/deadwood/
874
875       Since the old recursive code is a bit difficult to maintain, and since
876       I in the process of rewriting the recursive code, my rule is that I
877       will only resolve security issues with MaraDNS 1.0's recursive
878       resolver.
879
880    45. MaraDNS 1.2 had issues with NXDOMAINS and case sensitivity.
881
882       There was a known bug in MaraDNS 1.2.12 where, should a client ask for
883       a non-existent record in all caps, MaraDNS 1.2.12 will return a
884       NXDOMAIN instead of a "not there" reply. Upgrade to 2.0.
885
886    46. Can MaraDNS offer protection from phishing and malicious sites?
887
888       Deadwood can block up to about 20,000 domains.  More details are in the
889       Deadwood FAQ.
890
891    47. Does maradns support star (wildcard) records?
892
893       Yes.
894
895       MaraDNS supports both having stars at the beginning of records and the
896       end of records. For example, to have anything.example.com.  have the IP
897       10.1.2.3, add this line to the zone file for example.com:
898
899       *.example.com. A 10.1.2.3
900
901       To have stars at the end of records, csv2_default_zonefile has to be
902       set. The mararc parameter bind_star_handling affects how star records
903       are handled. More information is in the mararc man page.
904
905    48. I'm having problems using MaraDNS with some *NIX command line
906    applications like telnet.
907
908       Some *NIX command line networking applications, such as telnet and ssh,
909       try to do either a reverse DNS lookup (IP-to-host name conversion) or
910       an IPv6 lookup. This slows things down and sometimes causes the
911       applications to not work at all.
912
913       For people who do not need IPv6 lookups, add the following line to
914       one's mararc file to have MaraDNS respond to all IPv6 lookups with a
915       bogus "not found" reply:
916
917       reject_aaaa = 1
918
919       If knowing the hostname a given IP has isn't important, these kinds of
920       lookups can also be disabled:
921
922       reject_ptr = 1
923
924    49. My virus scanner reports that MaraDNS or Deadwood has a virus
925
926       This can be caused either by a poorly written anti-virus program
927       reporting a false positive, or because a virus on your system has
928       infected your copy of MaraDNS/Deadwood.
929
930       Please use GPG to verify that the file which your scanner reports
931       having a virus in has not been altered.  In addition, please scan the
932       file with AVG (free for non-commercial use) to verify your virus
933       scanner has not reported a false positive.
934
935       If you have verified the GPG signature of the program and AVG reports a
936       virus, please let us know with a Github issue.  Otherwise, please use a
937       better virus scanner and make sure there are no viruses on your
938       computer.
939
940    50. I can not subscribe to the MaraDNS mailing list
941
942       Please note that the mailing list is no longer used to handle MaraDNS
943       support requests. Please file a Github issue at
944       https://github.com/samboy/MaraDNS/issues to file a MaraDNS bug report.
945
946       The procedure for subscribing to the mailing list is as follows:
947
948       * Send an email to list-request@maradns.org with "Subscribe" as the
949         subject, or an email to list-subscribe@maradns.org
950
951       * You will get an email from list-request@maradns.org asking you to
952         confirm your subscription. This can be done by replying to the
953         message, or, more simply, by clicking on the link in the message.
954
955       * Once you click on that link, click on the button marked "subscribe to
956         list list"
957
958       * You will now get a message stating 'Welcome to the "list" mailing
959         list'.
960
961       * Note that the mailing list is moderated and only relevant MaraDNS
962         announcements are approved. People who need help should read the
963         manuals or search the MaraDNS webpage for support.
964
965       If you get an email from list-request@maradns.org with the subject "The
966       results of your email commands", you did not correctly send an email to
967       list-request@maradns.org with the subject "Subscribe".
968
969       If you do not get the email from list-request@maradns.org asking you
970       for a confirmation, ensure that this email is not in your "spam" or
971       "junk mail" folder. If you are unable to get these emails at your email
972       address, please get a gmail email account, which can successfully
973       subscribe to the MaraDNS mailing list. Note that subscription
974       confirmation emails may be in Gmail's "promotions" tab.
975
976    51. How does MaraDNS respond to EDNS (RFC2671) packets?
977
978       MaraDNS 2 (both the authoritative maradns server and the recursive
979       Deadwood server) responds to EDNS packets by ignoring the OPT record
980       and acting as if it the packet did not have an OPT record.
981
982       MicroDNS (available in the tools/misc directory of any MaraDNS 2
983       release) responds to EDNS queries the same way Deadwood 2.9.03 did: By
984       giving back "NOTIMPL" instead of answering the query with the default
985       IP. NanoDNS, in the interest of minimizing code side, responds to EDNS
986       requests by returning NOTIMPL in the header, giving the OPT query in
987       the AN section of the response, and giving the default IP in the AR
988       section of the DNS reply packet.
989
990    52. How to I get MaraDNS to always give the same IP to all DNS queries?
991
992       There are three ways to have MaraDNS always give the same IP in reply
993       to any DNS query given to it:
994
995       * The best way to do this is to set up a default zonefile that causes
996         any and all A queries to always give the IP (and also allows all AAAA
997         queries to always give out the same IP6, all SPF or TXT queries to
998         give out the same SPF record, etc.).
999
1000       * Another possibility, if someone just wants a simple DNS server that
1001         always gives out the same IP address to any and all DNS queries, is
1002         to use the MicroDNS program, available in tools/misc, as well as
1003         having its own web page.
1004
1005       * If MicroDNS is too bloated, there is also NanoDNS, which I will
1006         include the source code of below:
1007
1008       /*Placed in the public domain by Sam Trenholme*/
1009       #include <arpa/inet.h>
1010       #include <string.h>
1011       #include <stdint.h>
1012       #define Z struct sockaddr
1013       #define Y sizeof(d)
1014       int main(int a,char **b){uint32_t i;char q[512]
1015       ,p[17]="\xc0\f\0\x01\0\x01\0\0\0\0\0\x04";if(a>
1016       1){struct sockaddr_in d;socklen_t f=511;bzero(&
1017       d,Y);a=socket(AF_INET,SOCK_DGRAM,0);*((uint32_t
1018       *)(p+12))=inet_addr(b[1]);d.sin_family=AF_INET;
1019       d.sin_port=htons(53);bind(a,(Z*)&d,Y);for(;;){i
1020       =recvfrom(a,q,255,0,(Z*)&d,&f);if(i>9&&q[2]>=0)
1021       {q[2]|=128;q[11]?q[3]|=4:1;q[7]++;memcpy(q+i,p,
1022       16);sendto(a,q,i+16,0,(Z*)&d,Y);}}}return 0;}
1023
1024       NanoDNS takes one argument: The IP we return. This program binds to all
1025       IP addresses a given machine has on the UDP DNS port (port 53). For
1026       example, to make a DNS server that binds to all IPs your system has and
1027       return the IP 10.11.12.13 to any UDP DNS queries sent to it, compile
1028       the above C program, call it NanoDNS, and invoke it with NanoDNS
1029       10.11.12.13 Note that NanoDNS does not daemonize, nor log anything, nor
1030       have any other space-wasting features.
1031
1032    Why did you change MaraDNS' tagline?
1033
1034       I have changed MaraDNS' tagline from "MaraDNS: A security-aware DNS
1035       server" to "MaraDNS: A small open-source DNS server" because MaraDNS
1036       does not support DNSSEC. I have blogged about this:
1037
1038           http://samiam.org/blog/20120326.html
1039
1040    How do you stop MaraDNS from taking part in a distributed denial-of-
1041    service attack?
1042
1043       While I do not have time to implement rate limiting, CentOS 6 does
1044       support response rate limiting at the firewall level.  The following
1045       iptables commands allow a given IP to only send MaraDNS/Deadwood 20 DNS
1046       queries every four seconds:
1047
1048       iptables -A INPUT -p udp --dport 53 -m state --state NEW -m recent
1049       --set --name DDOS --rsource
1050
1051       iptables -A INPUT -p udp --dport 53 -m state --state NEW -m recent
1052       --update --seconds 4 --hitcount 20 --name DDOS --rsource -j DROP
1053
1054       To verify they are applied:
1055
1056       iptables --list
1057
1058       To save these commands in CentOS so they are applied at system boot
1059       time:
1060
1061       iptables-save > /etc/sysconfig/iptables
1062
1063       Disclaimer
1064
1065       These incantations work in CentOS 6 but may or may not work in other
1066       versions of Linux. I do not support non-CentOS6 Linux installs of
1067       MaraDNS.
1068
1069    What about DNS-over-TCP?
1070
1071       For people who want DNS-over-TCP, instructions are in the DNS-over-TCP
1072       tutorial. Note that Windows users will have to use Cygwin to have DNS-
1073       over-TCP.
1074
1075       However, DNS-over-TCP is not necessary. DNS-over-TCP is optional as per
1076       section 6.1.3.2 of RFC1123; any program or web service that considers
1077       no DNS-over-TCP an error is not RFC-compliant.
1078
1079       Not having DNS-over-TCP is more secure, because it gives attackers a
1080       smaller surface to attack.
1081
1082    How do I use MaraDNS with systemd?
1083
1084       While I like systemd, it is not part of CentOS 6 nor, obviously,
1085       Windows 7. That in mind, I have no plans to support systemd until 2017,
1086       when I plan to update MaraDNS' supported operating systems.
1087
1088       However, Tomasz Torcz has kindly made some systemd files for MaraDNS,
1089       which people are free to use.
1090
1091       As an aside, I do not like the fact that Debian will probably not make
1092       systemd the default init; I do not think this kind of fragmentation is
1093       good for Linux.
1094
1095    Why doesn't MaraDNS use IP_FREEBIND?
1096
1097       IP_FREEBIND is a non-POSIX Linux-specific extension to POSIX's
1098       netinet/in.h, and, as such, has no place in MaraDNS' code. MaraDNS
1099       strives to use POSIX-compliant calls so that it can compile on as many
1100       systems as possible.
1101
1102       When I say that Windows 7 and CentOS 6 are the only supported operating
1103       systems for MaraDNS, this does not mean that MaraDNS will not compile
1104       and run on other systems; it merely means that I can not provide
1105       support for Github bug reports for people who want to run MaraDNS in
1106       Minix, one of the open-source BSD variants, or what not.
1107
1108    Is there a web interface for MaraDNS?
1109
1110       The Kloxo-MR control panel has MaraDNS support.
1111
1112    What does the message “don’t forget the trailing dot” mean?
1113
1114       It means to not forget the tailing dot.
1115
1116       Hostnames in zone files need to be properly terminated; if a hostname
1117       is in the form “foo.example.com”, this name will not parse and return
1118       an error with a note to not forget the trailing dot.
1119
1120       To fix this, put a trailing dot at the end of the hostname, so it looks
1121       like “foo.example.com.” (observe that dot at the end) instead of
1122       “foo.example.com”
1123
1124    Does MaraDNS support newer top level domains?
1125
1126       MaraDNS does not impose any limitations on the top level domain used in
1127       zone files and other places, as is fully compatible with newer top
1128       level domains like “today.”
1129
1130       Note that, if using an internationalized domain name, it needs to be
1131       translated in to Punycode first. For example, if using the domain name
1132       “ñ.com.”, it needs to be in the form “xn--ida.com.” in MaraDNS’ mararc
1133       and zone files.
1134

BUGS

1136       In the unusual case of having a csv2 zone file with Macintosh-style
1137       newlines (as opposed to DOS or UNIX newlines), while the file will
1138       parse, any errors in the file will be reported as being on line 1.
1139
1140       The system startup script included with MaraDNS assumes that the only
1141       MaraDNS processes running are started by the script; it stops all
1142       MaraDNS processes running on the server when asked to stop MaraDNS.
1143
1144       MaraDNS needs to use the zoneserver program to serve DNS records over
1145       TCP. See zoneserver(8) for usage information.
1146
1147       MaraDNS does not use the zone file ("master file") format specified in
1148       chapter 5 of RFC1035; however bind2csv2.py can convert the majority of
1149       such zone files.
1150
1151       MaraDNS default behavior with star records is not RFC-compliant.  In
1152       more detail, if a wildcard MX record exists in the form
1153       "*.example.com", and there is an A record for "www.example.com", but no
1154       MX record for "www.example.com", the correct behavior (based on RFC1034
1155       section 4.3.3) is to return "no host" (nothing in the answer section,
1156       SOA in the authority section, 0 result code) for a MX request to
1157       "www.example.com".  Instead, MaraDNS returns the MX record attached to
1158       "*.example.com".  This can be changed by setting bind_star_handling to
1159       1.
1160
1161       Star records (what RFC1034 calls "wildcards") can not be attached to NS
1162       records.
1163
1164       MaraDNS, like every other known DNS implementation, only supports a
1165       QDCOUNT of 0 or 1.
1166

UNIMPLEMENTED FEATURES

1168       These are features which I do not plan to implement in MaraDNS.
1169
1170       MaraDNS does not have a disk-based caching scheme for authoritative
1171       zones.
1172
1173       MaraDNS' UDP server only loads zone files while MaraDNS is first
1174       started.  UDP Zone information can only be updated by stopping MaraDNS,
1175       and restarting MaraDNS again. Note that TCP zone files are loaded from
1176       the filesystem at the time the client requests a zone.
1177
1178       MaraDNS does not have support for allowing given host names to only
1179       resolve for a limited range of IPs querying the DNS server, or for host
1180       names to resolve differently, depending on the IP querying the host
1181       name.
1182
1183       MaraDNS only allows wildcards at the beginning or end of a host name.
1184       E.g. names with wildcards like "foo.*.example.com". "www.*" will work,
1185       however, if a default zonefile is set up. Likewise, MaraDNS does not
1186       have regular expression hostname substitution.
1187
1188       MaraDNS does not have support for MRTG or any other SNMP-based logging
1189       mechanism.
1190
1192       THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS OR
1193       IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1194       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1195       DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
1196       ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1197       DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1198       OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1199       HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
1200       STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
1201       IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1202       POSSIBILITY OF SUCH DAMAGE.
1203

AUTHORS

1205       Sam Trenholme (http://www.samiam.org) is responsible for this man page.
1206
1207       MaraDNS is written by me, Sam Trenholme, with a little help from my
1208       friends. Naturally, all errors in MaraDNS are my own (but read the
1209       disclaimer above).
1210
1211       Here is a partial list of people who have provided assistance:
1212
1213       Floh has generously set up a FreeBSD 4, FreeBSD 6, and Mac OS X system
1214       so that I can port MaraDNS to more platforms.
1215
1216       Albert Lee has provided countless bug reports, and, nicely enough,
1217       patches to fix said bugs. He has also made improvements to the code in
1218       the tcp "zoneserver".
1219
1220       Franky Van Liedekerke has provided much invaluable assistance. As just
1221       one example, he provided invaluable assistance in getting MaraDNS to
1222       compile on Solaris. In addition, he has provided much valuable SQA
1223       help.
1224
1225       Christian Kurz, who has provided invaluable bug reports, especially
1226       when I had to re-implement the core hashing algorithm.
1227
1228       Remmy, who is providing both the web space and a mailing list for
1229       maradns.org.
1230
1231       Phil Homewood, who provided invaluable assistance with finding and
1232       fixing bugs in the authoritative portion of the MaraDNS server. He
1233       helped me plug memory leaks, find uninitialized variables being used,
1234       and found a number of bugs I was unable to find.
1235
1236       Albert Prats kindly provided Spanish translations for various text
1237       files.
1238
1239       Shin Zukeran provided a patch to recursive.c which properly makes a
1240       normal null-terminated string from a js_string object, to send as an
1241       argument to open() so we can get the rijndael key for the PRNG.
1242
1243       D Richard Felker III has provided invaluable bug reports. By looking at
1244       his bug reports, I have been able to hunt down and fix many problems
1245       that the recursive nameserver had, in addition to at least one problem
1246       with the authoritative nameserver.
1247
1248       Ole Tange has also given me many valuable MaraDNS bug reports.
1249
1250       Florin Iucha provided a tip in the FAQ for how to compile MaraDNS on
1251       OpenBSD.
1252
1253       Roy Arends (one of the BIND developers, as it turns out) found a
1254       serious security problem with MaraDNS, where MaraDNS would answer
1255       answers, and pointed it out to me.
1256
1257       Code used as the basis for the psudo-random-number generator was
1258       written by Vincent Rijmen, Antoon Bosselaers, and Paulo Barreto. I
1259       appreciate these programmers making the code public domain, which is
1260       the only license under which I can add code to MaraDNS under.
1261
1262       Ross Johnson and others have made a Win32 port of the Pthreads library;
1263       this has made a native win32 port of MaraDNS possible.
1264
1265       I also appreciate the work of Dr. Brian Gladman and Fritz Schneider,
1266       who have both written independent implementations of AES from which I
1267       obtained test vectors. With the help of their hard work, I was able to
1268       discover a subtle security problem that previous releases of MaraDNS
1269       had.
1270
1271
1272
1273
1274MARADNS                          January 2002                       MARADNS(8)
Impressum