LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxQuestions.org Member Success Stories (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/)
-   -   Tinydns - Here is an example (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/tinydns-here-is-an-example-135194/)

cli_man 01-15-2004 04:08 PM

Tinydns - Here is an example
 
I have looked around on the web and could not find hardly any documentation on setting up hosts in tinydns, any examples I found were pretty bad or incorrect to say the least so I am going to post what I got to work with the explaination in hopes of saving someone the hours I just wasted trying to find documentation.

Code:

##########################################################################################
# Full Zone Info for yourdomain.com
Zyourdomain.com:dns3.someserver.net:dnsadmin.someserver.net:2003011502:4800:1800:604800
&yourdomain.com::dns3.someserver.net:3600
&yourdomain.com::dns2.someserver.net:3600
@yourdomain.com::mail.someserver.net:10
=yourdomain.com:63.174.233.111
=www.yourdomain.com:63.174.233.111
###########################################################################################

And here is the above explained:

Code:

#
# Now lets explain each line from above as I like to get confused
#
Zyourdomain.com:dns3.someserver.net:dnsadmin.someserver.net:2003011502:4800:1800:604800
The "Z" means this is the SOA Record.
"dns3.someserver.net" is the Primary dns for this domain
"dnsadmin.someserver.net" is the Hostmaster Email Address
"2003011502" is the Serial Number
"4800" is the Refresh
"1800" is the Retry
"604800" is the Expire
########################
&yourdomain.com::dns3.someserver.net:3600
The "&" means that this is a nameserver
You could put in the IP Address between the "::" but this is not necesarry as that is already defined in the someserver domain
"3600" Is the TTL
#######################
@yourdomain.com::mail.someserver.net:10
the "@" means this is the mx record
You could put in the IP address between the "::" but look above for the why not
"mail.someserver.net" is the mail host for this domain
"10" is the Mail priority
#######################
=yourdomain.com:63.174.233.111
the "=" makes a "A" record and a "ptr" record
This record would be to make a "A" record for http://yourdomain.com
"63.174.233.111" Is the ip address for this "A" pointer
#######################

I would be happy to explain anything else on this, I am not a expert by any means, I am just getting this going, I might post back to this thread in a day or two with even more info.

piratebiter 07-07-2004 10:12 AM

I posted yesterday on software re: tinydns... I
d like to capture the DNS task on my little setup. All i want to do is do the external DNS for 2-3 websites I host. Maybe do this "split horizon" and put it right on the firewall box? any thoughts? Which box are you doing it on? firewall, webserver or ?, I just want to head out in the right direction before I begin to try to implemnent it.
thanks for the post, was clear and to the point.
Piratebiter

cli_man 07-07-2004 10:28 AM

You can do the dns on anything that has a live ip address and is running linux, I have 2 dedicated dns servers but I am hosting several hundred websites, but you can run tinydns on just about anything, I handle about 2-3 thousand queries per minute and it only takes about 1% of my cpu on a 800 MHz server.

Now if you want to do it correctly you will need to have 2 dns servers as most registars like network solutions require this, your config file will be identical for the two servers so you don't have to worry about that.

If you want any more info post back here, I feel bad that tinydns is not used more as it is so much better than Bind ever dreamed of being, I have written a nice web based frontend for tinydns I will be releasing open source on freshmeat in the near future that makes using tinydns almost brainless and makes it easier to manage a couple thousand domains but it probably wouldn't be worth it for you if you are only running a few domains.

cli_man 07-07-2004 11:14 AM

I also wanted to post a more compleate example of the records you need to setup a domain in tinydns so I am pasting one of the domains from my config.

Code:

.233.174.63.in-addr.arpa::dns1.yourdomain.net::259200
#yourdomain.net
Zyourdomain.net:dns1.yourdomain.net.:dnsadmin.yourdomain.net.:2004022302:4000:1800:604800
&yourdomain.net::dns1.yourdomain.net.:172800:::
&yourdomain.net::dns2.yourdomain.net.:172800:::
@yourdomain.net::mail.yourdomain.net.:10:86400::
Cftp.yourdomain.net:www.yourdomain.net.:86400::::
=dns1.yourdomain.net:63.174.233.1:86400::::
=dns2.yourdomain.net:63.174.233.2:86400::::
=mail.yourdomain.net:63.174.233.5:86400::::
=www.yourdomain.net:63.174.233.20:86400::::
+yourdomain.net:63.174.233.20:86400::::

#domain1.com
Zdomain1.com:dns1.yourdomain.net.:dnsadmin.yourdomain.net.:2004022302:4000:1800:604800
&domain1.com::dns1.yourdomain.net.:172800:::
&domain1.com::dns2.yourdomain.net.:172800:::
@domain1.com::mail.domain1.com.:10:86400::
Cftp.domain1.com:www.domain1.com.:86400::::
=mail.domain1.com:63.174.233.151:86400::::
=www.domain1.com:63.174.233.151:86400::::
+domain1.com:63.174.233.151:86400::::

What I have listed above is the config for 2 domains, yourdomain.net and domain1.com. I have yourdomain.net setup as the main domain that has the config for the dns servers, it also has the normal entries for web, and mail. The second domain is just a standard domain that is using the dns servers from yourdomain.net.

Also if you are in control of the ip address' for your subnet then you need to be able to do reverse lookups for mail coming in and ect. That is what the first line is so in the example above I am saying I am in control and can answer for any ip address' in the 63.174.233.0-255 range, you just have to list the ip backwards as you see and just not put in the last number (the 0).

Also one more thing that is in here that was not in my first example is the line:
+domain1.com:63.174.233.151:86400::::
This line is here so you can just go to http://domain1.com in case someone doesn't put in the www or you are too lazy to type in the whole thing.


All times are GMT -5. The time now is 04:03 AM.