LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-21-2006, 06:11 AM   #1
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Rep: Reputation: 30
entries in the /etc/resolv.conf !


Hello everybody,
Long long ago, when sun was shining bright and life was good, I had FC 1. I was running a caching-only name server (named) on my PC to milk a few micro seconds in surfing. I had made the first line of /etc/resolv.conf as "nameserver 127.0.0.1". Next two entries were temporarily put by my ISP whenever I was dialling to it. And the first entry (...127.0.0.1) was available and doing my work whenever I was connected to the internet.
But Now !
Now the sky is overcast and the life is not good and I have an FC 4.
The first line of resolv.conf no longer remains there when I dial out to my ISP - the two temporary entries are there. When I disconnect, and check the file, I find the 127.0.0.0-entry is very much there. I don't know where does the hand-made entry goes when I dialout to ISP.
How can I make this hand-made entry the permanent entry in the /etc/resolv.conf. I would not want to change the attributes of the file for obvious reasons.

Any help ?


Thanks in advance.

-Prabhat Soni
 
Old 01-21-2006, 07:07 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
normally you can wop an additional line into your ifcfg-eth0 file, but fedora seems to want to be wrapping it a lot more these days. check the manpage for dhclient-script for details on how to make dhclient behave differently from the standard actiosn like overwriting resolv.conf
 
Old 01-21-2006, 07:08 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
hmm.. get's messier... then seems to get clearer...

seems that you would use /etc/dhclient.conf and looking at the example file (/usr/share/doc/dhclient-3.0.2/dhclient.conf.sample on my fc4 box) you would want to just put a line in it that says "prepend domain-name-servers 127.0.0.1;" presumably this means that dhclient should add 127.0.0.1 to the start of the list of name servers, so it'll be at the top of the new resolv.cof files too.
 
Old 01-27-2006, 12:00 AM   #4
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Original Poster
Rep: Reputation: 30
Hello acid_kewpie,
Thanks for taking time to help.
The tip given by you about putting a file dhclient.conf in the /etc directory with the line "prepend domain-name-servers 127.0.0.1" has not been able to produce the desired result.

Did I slip somewhere ?


-Prabhat Soni
 
Old 01-28-2006, 04:52 AM   #5
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Original Poster
Rep: Reputation: 30
Hello everybody
I have delved into the documentation and come up with following:
it is pppd which asks the peer for DNS addresses. These addresses are saved in environementatl varaibles DNS1 and DNS2.
Simultaneously pppd saves the old resolv.conf file under the name of resolv.conf.save, and creates a new resolv.conf with the DNS1 and DNS2 entries.

So what to do next.

-Prabhat Soni

Last edited by prabhatsoni; 01-28-2006 at 06:22 AM.
 
  


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
resolv.conf Snump Mandriva 54 10-31-2004 04:16 PM
/etc/resolv.conf mustangfanatic SUSE / openSUSE 5 10-18-2004 09:28 PM
resolv.conf ricemark20 Linux - Networking 12 11-11-2003 04:08 PM
resolv.conf dnsbum Linux - Networking 1 10-21-2003 12:00 PM
Resolv.conf tristan_vdv Linux - Networking 2 11-20-2001 06:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:35 PM.

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
Open Source Consulting | Domain Registration