Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOTABUG: MaraDNS star record question #55

Closed
dns-admin opened this issue Mar 21, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@dns-admin
Copy link

commented Mar 21, 2019

Hi,

I planed to use MaraDNS as an authoritative DNS server. I've read the MaraDNS authoritative Documents, but did not see if it support catch all. I only see the % symbol to match the domain.

But when I Want all the host like: *.example.com point to 127.0.0.1, How can I make it possible ? Can I just add the *.example.com. 10.10.10.10 ~ to the zone file ?

@samboy

This comment has been minimized.

Copy link
Owner

commented Mar 22, 2019

It looks like the man page for CSV2 zone files does not have a section describing star records or using the % symbol (EDIT: Now it does, because of this ticket). However, the man page does have an example zone file which uses both:

# This is an example csv2 zone file

# First of all, csv2 zone files do not need an SOA record; however, if
# one is provided, we will make it the SOA record for our zone
# The SOA record needs to be the first record in the zone if provided
# This is a commented out record and disabled.

#% 	SOA	% email@% 1 7200 3600 604800 1800 ~

# Second of all, csv2 zone files do not need authoritative NS records.
# If they aren't there, MaraDNS will synthesize them, based on the IP
# addresses MaraDNS is bound to.  (She's pretty smart about this; if
# Mara is bound to both public and private IPs, only the public IPs will
# be synthesized as NS records)


#% 	NS 	a.% ~
#%	NS	b.% ~

# Here are some A (ipv4 address) records; since this is the most
# common field, the zone file format allows a compact representation
# of it.
a.example.net. 	10.10.10.10 ~
# Here, you can see that a single name, "b.example.net." has multiple IPs
# This can be used as a primitive form of load balancing; MaraDNS will
# rotate the IPs so that first IP seen by a DNS client changes every time
# a query for "b.example.net." is made
b.example.net.  10.10.10.11 ~
b.example.net.  10.10.10.12 ~

# We can have the label in either case; it makes no difference
Z.EXAMPLE.NET. 	10.2.3.4 ~
Y.EXAMPLE.net.  10.3.4.5 ~

# We can use the percent shortcut.  When the percent shortcut is present,
# it indicates that the name in question should terminate with the name
# of the zone we are processing.
percent.%	a 		10.9.8.7 ~

# And we can have star records
#*.example.net.  A		10.11.12.13 ~

# We can have a ttl in a record; however the ttl needs a '+' before it:
# Note that the ttl has to be in seconds, and is before the RTYPE
d.example.net. +86400 A 10.11.12.13 ~

f.example.net. # As you can see, records can span multiple lines
        	A 	10.2.19.83 ~

# This allows well-commented records, like this:
c.example.net. 		# Our C class machine
        +86400  	# This record is stored for one day
        A       	# A record
        10.1.1.1 	# Where we are 
        ~               # End of record

# We can even have something similar to csv1 if we want...
e.example.net.|+86400|a|10.2.3.4|~
h.example.net.|a|10.9.8.7|~
# Here, we see we can specify the ttl but not the rtype if desired
g.example.net.|+86400|10.11.9.8|~

# Here is a MX record
% mx 10 mail.% ~
mail.% +86400 IN A 10.22.23.24 ~

# We even have a bit of ipv6 support
a.example.net. 		aaaa 	fd4d:6172:6144:4e53:1:2:3::4:f ~

# Not to mention support for SRV records
_http._tcp.%    srv   0 0 80 a.% ~

# TXT records, naturally
example.net.    txt 'This is some text' ~

# Starting with MaraDNS 1.2.08, there is also support for SPF records,
# which are identical to TXT records.  See RFC4408 for more details.
example.net.    spf 'v=spf1 +mx a:colo.example.com/28 -all' ~

Also, I edited your comment to fix its formatting. Please read the GitHub mastering markdown page for information on how to use GitHub markdown syntax.

Not a bug, closing.

@samboy samboy closed this Mar 22, 2019

Repository owner locked as resolved and limited conversation to collaborators Mar 22, 2019

@samboy

This comment has been minimized.

Copy link
Owner

commented Mar 22, 2019

Locking conversation: Not a bug report.

@samboy samboy changed the title Is MaraDNS Support Catch-All ? NOTABUG: Is MaraDNS Support Catch-All ? Mar 22, 2019

@samboy samboy changed the title NOTABUG: Is MaraDNS Support Catch-All ? NOTABUG: MaraDNS star record support Mar 22, 2019

@samboy samboy changed the title NOTABUG: MaraDNS star record support NOTABUG: MaraDNS star record question Mar 23, 2019

@samboy

This comment has been minimized.

Copy link
Owner

commented Mar 23, 2019

Added documentation for star records and % in zone files: 703eb19 and 67f7c52

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.