 |
 |
 |
 |
| Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc. |

14th November 2008, 10:10 PM
|
|
Registered User
|
|
Join Date: Nov 2008
Posts: 3

|
|
|
Local manual DNS settings won't stick; ISP keeps overwriting, please help!
The title pretty much says it all. I already unchecked the 'aquire dns settings automatically' box, yet every time I put in the DNS servers I would LIKE to use, save the settings and reconnect, I find they've reverted to the ISP standard! It's really become quite infuriating.
This started about a week-10 days ago and has become more and more resistant to my efforts to change them.
Many thanks in advance to anyone able to keep me from pulling my hair out
|

17th November 2008, 03:25 PM
|
|
Registered User
|
|
Join Date: Nov 2008
Posts: 3

|
|
|
It was suggested to me on another forum that I should try to chmod the file to write protect it. How do I do that? What file should I chmod?
|

17th November 2008, 03:55 PM
|
 |
Banned (for/from) behaving just like everybody else!
|
|
Join Date: Jul 2007
Location: Beijing, China
Posts: 1,307

|
|
Quote:
Originally Posted by bluespruce
The title pretty much says it all. I already unchecked the 'aquire dns settings automatically' box, yet every time I put in the DNS servers I would LIKE to use, save the settings and reconnect, I find they've reverted to the ISP standard! It's really become quite infuriating.
This started about a week-10 days ago and has become more and more resistant to my efforts to change them.
Many thanks in advance to anyone able to keep me from pulling my hair out 
|
I suggest you create a file (as root) in the /etc directory with name "dhclient-INTERFACE.conf" where INTERFACE is the connection's network interface (e.g. eth0). Put the following line in the file:
Code:
supersede domain-name-servers DNS1, DNS2, DNS3;
where DNS1-3 are your preferred DNS servers. You don't have to use all three of them. Usually putting two there is fine.
After that, restart the network service, and see if it works.
__________________
I believe in nerditarianism. I read FedoraForum for the Fedora-related posts.
|

18th November 2008, 12:18 PM
|
 |
Registered User
|
|
Join Date: Jun 2005
Location: Leeds
Posts: 1,264

|
|
you can also edit you /etc/rc.local file and add
Code:
echo # DNS config > /etc/resolve.conf
echo nameserver PRIMARY_DNS >> /etc/resolve.conf
echo nameserver SECONDRY_DNS >> /etc/resolve.conf
echo nameserver TERIATRY_DNS >> /etc/resolve.con
This basically overwrites your resolve.conf (which stores your DNS settings) and adds your preferred DNS servers instead.
Just run /etc/rc.local after you edit it. It runs by itself after your machine has booted up so you edit and leave it unless your DNS changes.
aleph
Nice one. You learn something new every day.
Ibbo
__________________
A Hangover Lasts A Day, But Our Drunken Memories Last A Lifetime
--
Linux user #349545
(GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCfdjyzXscddzQvlhBedAcD7qfKmHo==zx0H
|

18th November 2008, 03:35 PM
|
|
Registered User
|
|
Join Date: Jul 2008
Posts: 800

|
|
Quote:
Originally Posted by bluespruce
It was suggested to me on another forum that I should try to chmod the file to write protect it. How do I do that? What file should I chmod?
|
Just for reference, they were talking about the immutable flag.
This is enabled by doing: chmod +i <file>
|

18th November 2008, 08:16 PM
|
|
Registered User
|
|
Join Date: Nov 2008
Posts: 3

|
|
Quote:
Originally Posted by vallimar
Just for reference, they were talking about the immutable flag.
This is enabled by doing: chmod +i <file>
|
actually, to be specific, he said to chmod +x the file /etc/resolv.conf "so its not rewriteable" (however, this is coming from a freebsd user, so neither of us are sure how accurate the info is)
What is the immutable flag?
Sorry I haven't been able to give any feedback, I haven't had the time to sit down at my own computer in a bit, but I really appreciate the suggestions!
I'll be sure to let you guys know as soon as I get things back up and running
Last edited by bluespruce; 18th November 2008 at 08:17 PM.
Reason: left something out
|

19th November 2008, 11:22 AM
|
 |
Registered User
|
|
Join Date: Jun 2005
Location: Leeds
Posts: 1,264

|
|
|
The immutable flag denotes whether a file can be modified or not. +i = immutable = no modifiable. -i is the opposite.
chmod +i file on a file that is modified at boot time (or will attempt to be modified) will no doubt issue complaint after complaint. Thus it is not the correct way to do it and the alternative options listed above should be taken up instead.
I.E
edit rc.local
or
the option given by aleph
It always better to do it right that to hack it out. hack it out and you will have to hack it again at some stage.
Ibbo
__________________
A Hangover Lasts A Day, But Our Drunken Memories Last A Lifetime
--
Linux user #349545
(GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCfdjyzXscddzQvlhBedAcD7qfKmHo==zx0H
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 18:41 (Sunday, 19-05-2013)
|
|
 |
 |
 |
 |
|
|