LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-08-2008, 02:09 PM   #1
des_a
Senior Member
 
Registered: Sep 2006
Posts: 1,416
Blog Entries: 43

Rep: Reputation: 36
DNS Patch


I've got a Linux server getting it's address from DHCP on a DI-524 router. This server is the local DNS server. My server requires a few rules I've discovered to work, and one of them is that the DNS server must look for it's DNS server on itself.

So, DNS in our house goes this way: Clients in one domain get their DNS server from the router which says that the first DNS server is the Linux server connected to the router. The second DNS server is our other router. In this manner, the Internet will not cease to function if the server goes down by mistake, however the server provides extra functions.

So, if the server also points to the router, then DNS won't work because the packets will get to the router and go in a loop between the Linux server and the router. It'd go to the router, which says DNS server is the server, then the server says it's the router, which starts DNS over again.

But if the server is it's own DNS server, then the loop will end at the server, if it's functioning, otherwise it will go to the external DNS server. The external DNS server is an internal one which doesn't really do anything, except send it to the real external DNS server. That's because the routers act as DNS servers, but not as internal ones. They just pass everything to the WAN. That's the reason for DNS on the server.

The problem is that at certain times the DNS server on the Linux is changed to be the router. It seems to be only when the server gets it's DHCP address from the router. So this is an exceptional case then I'm noticing. So my idea is that unless it's a bad option in the DCHP or DNS client that changes /etc/resolv.conf, then I need to make a patch of some sort.

I could find a way to change the way things are working internally somehow, but unless that's all that's wrong, I'd just be masking the fact that this seems to be an exception to the way things are supposed to normally work. I want to make it clear that this is probably just an exception to the normal ways of doing things, and therefore, unless it's a bad option, then I can let it change the file, and then execute the patch which says, "but this is an exception", an therefore changes it right back, if the exception should happen.

So the question is, how do I catch the events? Should I maybe use the ifup script thingy? Will that catch every time the lease get's renewed? Are there any other reasons that this behavior may occur? I'm going to do this for now, unless it doesn't work.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
patch problem - can't find file to patch jnutt Linux - Kernel 3 02-10-2010 03:45 PM
Unable to patch 2.6.11.7 kernel with Reiser4 mm patch SlackwareInAZ Slackware 9 04-26-2005 06:33 AM
How to Install patch-o-matic(a iptables patch) on redhat 9? itebooks Linux - Security 1 07-23-2004 08:51 AM
debian-patch-debianlogo w/2.6.5 kernel-patch-lpp Outabux Debian 11 05-20-2004 01:21 PM
How to Apply patch for Mass Storage device to work? (uss725-2.4.20-rc2.patch) cevjr Linux - Hardware 3 04-20-2004 11:14 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration