[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

/etc/resolv.conf is being overwritten. why?



Hi, everyone.  I have checked the man pages, the FAQs, and did a
Google search to try and find an answer to this.  While I found many
leads and thought I had figured it out, I have yet to fully understand
why my /etc/resolv.conf is being overwritten.

===================================
Here's my information...
===================================

-> I'm running OpenBSD 3.0.

-> I'm using Road Runner cable modem service.

-> I have a LinkSys router doing NAT and assigning the interface IPs
dynamically.

-> I configured the interface at install for DHCP.

-> The interface has an IP address of 192.168.1.101

-> I'm have not set up DNS yet

-> /etc/hosts shows:
   127.0.0.1 localhost
   192.168.1.101 valhalla.mydomain.com valhalla

-> /etc/resolv.conf shows:
   search mydomain.com, houston.rr.com
   nameserver 24.28.99.62
   nameserver 24.28.99.63
   nameserver 24.28.99.61

===================================
Here's my problem...
===================================

I modified /etc/resolv.conf to include "mydomain.com" in the search
because no mail sent from the local machine to the local machine was
getting through because it didn't know how to resolve the address
locally and "mydomain.com" is not registered and therefore cannot be
seen by Road Runner's mail servers, the Internet, etc.

It worked as a temporary fix to my mail problem, but then something
happened.  I tried to send a message from "mydomain.com" to my
personal email address not on this local machine and it failed.  I
checked the message and it said that it couldn't resolve
"mydomain.com".  I thought that this was strange because hours ago
mail had worked locally.

I checked and /etc/resolv.conf showed:
 search houston.rr.com
 nameserver 24.28.99.62
 nameserver 24.28.99.63
 nameserver 24.28.99.61

Well I remembered that I rebooted the machine and thought that when
dhclient asked for an address, it read /etc/dhclient.conf and must
have overwritten /etc/resolv.conf with the information retrieved from
the DHCP server.  Therefore, I changed /etc/resolv.conf to include
"mydomain.com" again.  I thought I was all set, but I wrote a little
cgi script so I could check it periodically throughout the day.  And,
lo and behold it got overwritten again!

Can someone please shed some light on this for me?

Thanks,

rvb

--
"Do all your work as if you had a thousand years to live, and as you
would if you knew you must die tomorrow."

Shaker Saying