LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-14-2009, 09:25 AM   #1
kashif2131971
Member
 
Registered: Mar 2008
Posts: 60

Rep: Reputation: 16
resolv.conf overwrite


using redhat enterprise 4:
my resolv.conf is over write by the internet provider

my hostname is pc1.homeserver.in
my domainname is homeserver.in

before connecting to internet by resolv.conf is:

nameserver 192.168.1.1
and domain is resolv by dig command but everythink goes fine.

but when I connect to internet the resolv.conf change to

; generated by /sbin/dhclient-script
nameserver 192.168.15.1

because of this my own domain is not resolv its my local domain
help me out of this problem

Last edited by kashif2131971; 07-14-2009 at 09:28 AM. Reason: more clear understanding
 
Old 07-14-2009, 09:36 AM   #2
jspsandhu
Member
 
Registered: Dec 2004
Location: Slough, UK
Distribution: Fedora, FreeBSD, RHEL
Posts: 85

Rep: Reputation: 15
Try

sudo vim /etc/dhcp3/dhclient.conf

Edit the following two lines to read as

supersede domain-name “mydomain.com”;
prepend domain-name-servers 192.168.1.1


Wait trying to test this

Also if not above you can try to add /etc/dhclient-enter-hooks that
contains the following:-

make_resolv_conf( ) {
logger -t "dhclient-enter-hooks" "Doing nothing to /etc/resolv.conf"
}

Last edited by jspsandhu; 07-14-2009 at 09:44 AM. Reason: Unsure about the distro shall get back
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
DNS Hosts.conf or resolv.conf problem mac_casey SUSE / openSUSE 0 03-26-2006 10:21 AM
resolv.conf Snump Mandriva 54 10-31-2004 05:16 PM
resolv.conf?? wrat Linux - Newbie 3 06-14-2004 05:37 PM
resolv.conf ricemark20 Linux - Networking 12 11-11-2003 05:08 PM
Resolv.conf tristan_vdv Linux - Networking 2 11-20-2001 07:49 PM


All times are GMT -5. The time now is 06:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration