On Mon, 16 Jun 2003, David Demner wrote: In future, please wrap your lines, and don't top-post. TIA.
> RH used to use dhcpcd to get an IP address through DHCP, and there was a > flag for dhcpcd so it didn't replace the resolv.conf, but this doesn't > appear to be the case any more. They now use dhclient which doesn't > have this flag. > > Poking around, it looks like the script /sbin/dhclient-script is > responsible for replacing your resolv.conf at startup. The first > function in the fiel is called make_resolv_conf() and it overwrites the > resolv.conf. It looks like if you add > > echo nameserver 127.0.0.1 >> /etc/resolv.conf > > just below the line that reads > > echo search $new_domain_name >/etc/resolv.conf > > it should work... > > Good luck, and of course, YMMV, Try this simpler fix first. In /etc/sysconfig/network-scripts/ifcfg-eth0, include the line PEERDNS=no You can also set this by editing the interface in redhat-config-network (AKA neat) and unchecking the box on the "General" tab. The handling of PEERDNS is done in the ifup and ifup-post scripts. HTH. > > David > > -- __--__-- > > Message: 9 > Organization: Randec > Subject: Question on caching-nameserver > To: [EMAIL PROTECTED] > From: Mufit Eribol <[EMAIL PROTECTED]> > Date: Sat, 16 Jun 2001 17:18:15 +0300 > Reply-To: [EMAIL PROTECTED] > > > I have a small LAN with a cable modem for internet. I setup up a RH9 box as > a gateway with IP masq and caching-nameserver. > Internal PCs use gateway's IP (192.168.0.1) for DNS resolution. It is > working fine, But... > > ...according to docs, the gateway's /etc/resolv.conf should be as follows > > search localdomain > nameserver 127.0.0.1 > > However, when the machine rebooted, the system picks IPs from ISP and > /etc/resolv.conf changes to > > ; generated by /sbin/dhclient-script > nameserver ISP_IP1 > nameserver ISP_IP2 > > How can I make "nameserver 127.0.0.1" line in resolv.conf sticky? > > Mufit > > > -- Matthew Saltzman Clemson University Math Sciences [EMAIL PROTECTED] http://www.math.clemson.edu/~mjs -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://www.redhat.com/mailman/listinfo/redhat-list