setting up DNS - Printable Version +- Linux-Noob Forums (https://www.linux-noob.com/forums) +-- Forum: Linux Server Administration (https://www.linux-noob.com/forums/forum-8.html) +--- Forum: DNS and DHCP (https://www.linux-noob.com/forums/forum-84.html) +--- Thread: setting up DNS (/thread-3421.html) |
setting up DNS - hijinks - 2004-04-29 First.. these are the rpms you need installed Code: bind as you can see we are going to install a caching nameserver. This is the most straight foward type of DNS install.. very very easy. The hard part is figuring out the config and what all those and letters and dots mean and what should go where. Also this will not cover reverse.. most people don't need it.. if people want a reverse section i will add it Most people complain that they don't have a /etc/named.conf when they have bind installed. Well named.conf is included in the caching nameserver package. ok so now on to the install. For this install we shall setup a domain called jyrules.com. If anyone wants to buy me this it'll be glad to take it <img src="https://www.linux-noob.com/forums/public/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=" :)" border="0" alt="smile.gif" /> ok so now we edit the /etc/named.conf file you will see other entries for the localhost. We want to keep these. so at the bottom add this Code: zone "jyrules.com" { So the zone is the name of the domain. and the file is the file in /var/named i call it the domain also you can call the file whatever you want. Now lets create that zone file.. so edit a new file called /var/named/jyrules.com and lets add all this into it Code: @ IN SOA ns1.jyrules.com. admin.jyrules.com. ( ok so the first line is the SOA. I won't go into much here but just the things to change. This is THE MOST confusing part of DNS is seems. The ns1.jyrules.com means this is the main nameserver for this domain. The admin.jyrules.com reads like admin@jyrules.com this is the contact for the dns of the domain. Everytime you change your dns records.. you should change the serial number for it. This helps other servers refresh your domain so they aren't caching bad info. i do it like <year><month><day><hour> so the next lines specifiy what nameservers control this domain. I have two setup that are within my domain and one that is outside my network. The next line tells email servers which IP to send email to for a domain. mail is my primary mailserver and pvr is my secondary. It knows this my the numbers (5 and 15) whichever is lower is the primary. You can have 10 of them listed.. it will just start at the lowest and move up. So if the first 2 are down it'll go to the 3rd. my next two lines assign a name to an IP. You should only have one name assigned to an IP. THen you can use aliases after that. I always bind the domain to the main ip. Then come the aliases which are identified by the cnames. So that says if www.jyrules.com is accessed check the ip for jyrules.com. You can have a ton of these if you want. Then my last line is another A record that gets pointed to a IP outside. This is my mythtv box. Now save the file, and run the following commands Code: chkconfig named on This ensures bind is started on bootup and then starts bind. You can check your /var/log/messages file and you should get something like this Code: Apr 29 15:09:20 pvr named[4316]: loading configuration from '/etc/named.conf' Yay.. it loaded the zone and its running. Now we can change the /etc/resolv.conf to point to 127.0.0.1 Code: nameserver 127.0.0.1 If you have others listed add that one to the top. so it gets run first. Now we can debug our domain locally to see if everything is up and running Code: [root@pvr log]# nslookup jyrules.com There ya go.. looks like bind is up and running. If you have a firewall in front.. make sure port 53 tcp/udp can get through. another one from the great J to the Y setting up DNS - seeno - 2004-06-28 I need bind to listen on my ipv6 enterface but it wouldn't listen on any. as you can see in your /var/log/messages Quote:Apr 29 15:09:20 pvr named[4316]: no IPv6 interfaces foundI don't get anything like that, here's my log Code: Jun 29 01:00:27 seeno named[32165]: starting BIND 9.2.1 -u named I'm running bind-9.2.1-16, I guess this is the default included package in redhat9, unless i upgraded it using apt-get. Is there a way I could get it to listen on my ipv6 interfaces? Thanks :) setting up DNS - hijinks - 2004-06-29 try added this into your named.conf listen-on-v6 {any;}; setting up DNS - kZo - 2004-07-08 Yay, another score for linux-noob. I've been looking for a simple explaination of how DNS/BIND works, and.... well thanks Jy. setting up DNS - laforge - 2005-03-19 So.. in this setup, "66.143.31.24" is your public, outside ip address? or is "24.194.246.98" I am 100% dns naive.. Here's my understanding, and feel free to tell me if I am wrong. Every dns server basically cascades every other dns server. It would be best, of course, if I have a static IP address to my machine at my location. Assuming I do, and this information is true.. Here is the information about my current internet connection [cable modem] info as reported to my router, all these ips are obviously given to my router by the cable modem. IP Address 68.205.12.23 Subnet Mask 255.255.248.0 Default Gateway 68.205.120.1 DNS (of my isp) 24.95.227.39 24.95.227.40 65.32.1.79 How would these numbers apply to me. Additionally.. how would I go about getting the internet to know that my domain is actually at my ip address. - I am guessing I can update my registrar to point to the name servers of mydomain.com to 68.205.12.23 I'm confused .. :-) setting up DNS - hijinks - 2005-04-07 sorry i just noticed this reply. Ok 66.143.31.24 is my main server on my lan.. the other 24 is like my home computer or such i want to give a subdomain to. All dns does is make it easy for us so we don't have to memorize ip addresses. So a A name just says this hostname.. send it to this IP address. a Cname is like an alias to a A record. So I can have a million different IPs all in one dns zone setting up DNS - a-dam - 2005-12-06 Ok, I setup that and rebooted, but my box still has the cronical hostname off "193.227.247.215.247.227.193.in-addr.arpa" And i cant get my server to run as a dns server im screwed:-p |