Click to See Complete Forum and Search --> : Auto DNS names for LAN


AstroDroid
02-18-2003, 11:46 PM
How can I set my DNS server on RH8 to resolve a name to an IP.

Most of the time this would be done in a hosts file, but I would like my DNS to resolve it.

I entered the line into my hostsfile

192.168.1.70 linux2server

As an aside, I do not have a domain name setup for my LAN. I have left it out.

I do also know that i could manually update all hosts files, but that is not how I want this to work.

bwkaz
02-19-2003, 10:52 AM
I set this up the other day (with a DHCP server on the LAN side as well, that auto-updated the DNS server with info on every lease change), and it was a pretty complicated mess. I was going to write a Help File (or, maybe more like a "this is how I did it, this might work for you" file) on the process during the next couple of days; watch How I Did It if you're interested.

Basically, it involves making up an entirely bogus domain name (in my case, mydomain, you could use thedomain, bogusdomain, or whatever, but DON'T add a .com or .org or something to the end of it), and setting up a DNS authority server for it on the LAN. Then you have to firewall off the DNS server so that no one from outside the LAN can talk to it; if they could, this has the potential to SCREW UP a good chunk of the Internet.

Then you set up the DHCP server to tell the DHCP clients that the IP address of the computer running the DNS server should be their nameserver, not the IP of your ISP's DNS servers. Alternatively, if you don't want to use DHCP, you can manually set the nameserver in each client's /etc/resolv.conf file (NOT their /etc/hosts ;)). Set the default search domain to "bogusdomain", "mydomain", or whatever you called it, too, with a line like search bogusdomain also in resolv.conf. Then you get rid of the /etc/hosts files (or just clean them out).

Then you set up DNS forwarding, so that your ISP's nameservers get some requests. If you don't do this, they might get suspicious if their nameservers are never hit by you, but they see traffic. Depends on the ISP's AUP, though; if you're allowed to set up internal nameservers, don't worry about this.

You also set up a root.hints so that the DNS server can do full lookup if necessary.

It took me a couple of days to figure this all out, so it'll probably take a couple of days to write it all down. But it's coming. ;)