IP in /etc/resolv.conf that isn't a DNS server
Craig White
craigwhite at azapple.com
Tue Feb 8 04:06:17 UTC 2005
On Mon, 2005-02-07 at 22:29 -0500, Kevin Old wrote:
> Hello everyone,
>
> My /etc/resolv.conf file has ; generated by /sbin/dhclient-script at
> the top and the 1st IP listed as a nameserver isn't a name server.
> I'm sure I need to ask my server house about this, but was wondering
> if anyone had ideas why DNS look ups wouldn't fall to the 2nd or 3rd
> IP's in the list, as my DNS lookups are timing out.
>
> I understand I can probably use a exit hook to edit the resolv.conf
> and this is currently in there, I just don't know how to modify it to
> get rid of the first IP:
>
> [root at s15111287 dhcp]# more /etc/dhclient-exit-hooks
> #! /bin/sh
>
> if [ "x$reason" != xEXPIRE ] && [ "x$reason" != xFAIL ] && \
> [ "x$reason" != xRELEASE ] && [ "x$reason" != xSTOP ] && \
> [ -n "$new_static_routes" ] && [ -n "$new_routers" ] ; then
>
> for dest in `echo $new_static_routes|sort|uniq`; do
> route add -host $dest dev $interface
> done
> for router in $new_routers; do
> route del default gw $router || /bin/true
> route add default gw $router
> done
> fi
----
cp /etc/resolv.conf /etc/resolv.conf.bak
> /etc/resolv.conf
ifdown eth0
ifup eth0
(or substitute for other ethx device if a different device is the public
ip / gateway device)
Craig
More information about the fedora-list
mailing list