• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Help me with /etc/named.conf please

kevinthenerd

Platinum Member
I have a very small home network that looks like this:

192.168.0.1 - gateway and DHCP
192.168.0.* - my mom's computer (gets IP from DHCP)
192.168.0.100 - a server running Red Hat Linux 9
192.168.0.101 - Win98 computer for gaming, etc.

I want to set up on the Red Hat machine a DNS daemon that caches queries to the dns server (let's call the ISP's DNS 12.34.56.78... I don't want to reveal my ISP). If the IP exists in the cache, the RH9 server will provide it. If not, the RH9 server will ask the ISP's DNS and give it that way and store it for future use.

I hear this is easy, but I can't figure out how to do this. (Setting up the Win98 machine to look for a DNS at 192.168.0.100 is the easy part.)

I guess my main questions would be these:

Assuming I compiled the latest version of bind from source to /usr/local, what would be the best way to start the named on bootup?

Given this information, what would my /etc/named.conf look like?

Would the performance difference be noticeable? (cable to ISP, 100MB to local server)

Thanks.

(Edited some spelling.)
 
One more question. If the IP of a remote machine changes, is there an easy way to update the RH9 server without rebuilding the whole DNS table and without manually editing a file?

Thanks
 
I don't know about redhat, but I think it gets started in rc.conf in my freebsd box, which is currently in pieces🙂
Speed difference? depends on how fast you get an nslookup or dig request resolved now. Chances are, no big performance improvement for the work.
I use it to test out webserver things, such as virtual hosting of many websites on a server, and also to resolve local machines by name.
If you are still looking for named.conf stuff, I will have my server up later on, maybe tomorrow. I had it forward requests as you intend, with the cached stuff being mostly manual entries for various test scenarios.
 
Well, I answered a couple of questions, but I still have one issue...

I'm starting it with rc.local, a quick-and-dirty way of loading anything on bootup.

/usr/local/sbin/named

It's working, and it's doing its cache thing, but I have a feeling that the cache is only in the memory, not a file. The DNS lookup was a little slower after the RH9 box was reboot. (I reboot it to test this theory.)

If it's going to a file (and the delay was loading that file into RAM), where would it be? Nothing in /var/named looks like it's changing when I access new sites.
 
Originally posted by: skyking
I don't know about redhat, but I think it gets started in rc.conf in my freebsd box, which is currently in pieces🙂
Speed difference? depends on how fast you get an nslookup or dig request resolved now. Chances are, no big performance improvement for the work.
I use it to test out webserver things, such as virtual hosting of many websites on a server, and also to resolve local machines by name.
If you are still looking for named.conf stuff, I will have my server up later on, maybe tomorrow. I had it forward requests as you intend, with the cached stuff being mostly manual entries for various test scenarios.

I sincerely appreciate the effort. I know it wasn't starting by default in RH9. I did this:

ps -A | grep named

and it yielded nothing
 
by default rh sets up bind as a chaching server to start it type

/etc/init.d/named start

to have it start at bootup use chkconfig like so

chkconfig --levels 345 named on

this will start named on runlevels 345 adjust as needed. then point all your internal mahines dns servers to the lan ip of the rh9 box voila your own dns up and running.
 
Originally posted by: n0cmonkey
The cache is stored in memory, as it should be.

I'm always messing with the insides of this particular box, and I was hoping there was a way to store it in a hard drive cache file available for editing, etc.
 
Originally posted by: kevinthenerd
Originally posted by: n0cmonkey
The cache is stored in memory, as it should be.

Or, is there possibly a way to dump that piece of memory to a file and restore it at a later time?

Yes, you can probably do that. I am not sure exactly why you would want to though. IPs can change at any time. Keeping a static cache is probably a bad idea. It kind of breaks DNS...
 
Originally posted by: n0cmonkey
Originally posted by: kevinthenerd
Originally posted by: n0cmonkey
The cache is stored in memory, as it should be.

Or, is there possibly a way to dump that piece of memory to a file and restore it at a later time?

Yes, you can probably do that. I am not sure exactly why you would want to though. IPs can change at any time. Keeping a static cache is probably a bad idea. It kind of breaks DNS...

Here's why: The machine is reboot frequently due to hardware tweaking (and toying). Every time I reboot, the cache starts all over, and it's even slower than when I started because of the extra hop to the ISP's DNS.

I have noticed a slight increase in performance on DNS lookups, so this idea was well worth it. Some poorly-written port scanners make a DNS request every time a port is scanned, and this makes that process a lot faster.

Does Windows 98 with IE6 cache DNS information?

In reality, this isn't very practical. Half of the reason why I want to do this stuff is to learn about how this stuff works on a deeper level than a book will show you.

Edit: I manage a system at my university, but it's summer now, and I'm home. I periodically do port scans as a quick-and-dirty way to look for trojans.
 
Originally posted by: kevinthenerd
Originally posted by: n0cmonkey
Originally posted by: kevinthenerd
Originally posted by: n0cmonkey
The cache is stored in memory, as it should be.

Or, is there possibly a way to dump that piece of memory to a file and restore it at a later time?

Yes, you can probably do that. I am not sure exactly why you would want to though. IPs can change at any time. Keeping a static cache is probably a bad idea. It kind of breaks DNS...

Here's why: The machine is reboot frequently due to hardware tweaking (and toying). Every time I reboot, the cache starts all over, and it's even slower than when I started because of the extra hop to the ISP's DNS.

I have noticed a slight increase in performance on DNS lookups, so this idea was well worth it. Some poorly-written port scanners make a DNS request every time a port is scanned, and this makes that process a lot faster.

Does Windows 98 with IE6 cache DNS information?

In reality, this isn't very practical. Half of the reason why I want to do this stuff is to learn about how this stuff works on a deeper level than a book will show you.

Edit: I manage a system at my university, but it's summer now, and I'm home. I periodically do port scans as a quick-and-dirty way to look for trojans.

Pick up the DNS bible at your local bookstore or library. It is also known as BIND and DNS. Its a great book that will explain everything, and there is probably a new version out for BIND 9.
 
Thanks for the suggestion. I'm currently reading a bind manual I downloaded from the main website. (bind9arm.pdf)

I found out that I can use this command to dump the database:
rndc dumpdb
 
Back
Top