From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707 Description of problem: When dhclient receives a new lease and the setting PEERDNS is set to something else than 'no' it updates the /etc/resolve.conf to use the correct DNS servers specified by the DHCP server. For most systems this is just fine. However my ADSL ISP provides me with IP information (including DNS servers) using DHCP which is used by the system I have configured as my gateway (NAT/firewall/etc). On this system I have a local ISC DNS server running which is used as local DNS and caching name server for the systems in my LAN. This DNS server should use the provided ISP DNS servers as forwarders, preferably automatically. What this patch does: If the PEERDNS setting for an interface is set to "named" then for that interface a config file is created/rewritten and the named service is reloaded. Using this feature: 1) Make your /etc/named.conf config file look something like this (only relevant fragment here): options { directory "/var/named/"; include "/etc/named.forwarders.eth0.conf"; }; 2) service named start 3) Edit /etc/sysconfig/network-scripts/ifcfg-eth0 so the line with PEERDNS looks like this PEERDNS=named 4) Perhaps a good idea setting /etc/resolv.conf to read nameserver 127.0.0.1 5) ifup eth0 There is no risk for existing systems because this code only works iff 1) The PEERDNS is set to named ..... MANUALLY 2) The /etc/named.conf is updated to include the right config fragment ..... MANUALLY Version-Release number of selected component (if applicable): dhclient-3.0.1rc14-1 How reproducible: Always Steps to Reproduce: As described above. Additional info:
Created attachment 102231 [details] The ORIGINAL /sbin/dhclient-script I started with.
Created attachment 102232 [details] The enhanced version of /sbin/dhclient-script I created.
Created attachment 102233 [details] The patch
This is a good fix for a specific customized environment ; it could be implemented using the /etc/dhclient-enter-hooks /etc/dhclient-exit-hooks scripts already catered for by dhclient-script (see man dhclient-script). As such, I think the right place for this fix is in those customization scripts, and not in the general purpose distribution.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2004-566.html