Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10th March 2010, 07:23 AM
tripleninez Offline
Registered User
 
Join Date: Jan 2010
Location: Toronto, Canada
Posts: 77
linuxmozilla
persistent DNS cache - howto make it permanent?

hello,

i am having a bit of an annoyance in some modifications i have made, and need a little help...
i has setup a persistent DNS cache to improve my web-browsing. it works wonders and with
my ICC built firefox my web-browsing is laser-fast, pretty much like using internet explorer in windows!

however, everytime i reboot, my modifications to /etc/resolv.conf have been replaced...

1st. the file must contain:

# Generated by NetworkManager (obviously modified by this)
nameserver 127.0.0.1 <----this is lost on reboot, and is needed to make it all work
nameserver 209.226.175.223
nameserver 198.235.216.134

i have tried to add this to - System/administration/network, but it doesn't seem to fix the problem.

2nd. my next problem is that when fedora 12 starts up, i need it to start "dnsmasq" .

i have tried to add it as a startup application, but it doesn't start automatically...
so i end up having to start it manually everytime:

sudo /etc/init.d/dnsmasq start

it is annoying, but so far i just deal with it, because my browsing is that much faster!

i am planning to post a tutorial for those interested in faster web-browsing in linux,
but until i can make the changes perminent there isn't much point.

anyone have a fix???

thanks in advance!

PS: i have tried to write a shell script to do this and every which way i try it fails

it seems ridiculous that i can use ICC to compile applications, but can't make this work, i could use help!

Last edited by tripleninez; 10th March 2010 at 08:30 AM.
  #2  
Old 10th March 2010, 11:23 AM
smurffit's Avatar
smurffit Offline
Registered User
 
Join Date: Dec 2009
Posts: 190
linuxfirefox
Re: persistent DNS cache - howto make it perminent??

How did you FF compiled with ICC? It seems a very tricky thing to me (at least on a 64bit system?!)

For your resolv.conf Problem:

Code:
sed -i '1inameserver 127.0.0.1' /etc/resolv.conf
where the 1 indicates on which linenumber the text should be insert. put this in /etc/rc.local or someting similiar.

For dnsmasq: goto so Gnome-Menu -> System -> Administration -> Services and enable it there.
__________________
Linux Registered User #503365 :)

Last edited by smurffit; 10th March 2010 at 12:59 PM.
  #3  
Old 10th March 2010, 05:33 PM
tripleninez Offline
Registered User
 
Join Date: Jan 2010
Location: Toronto, Canada
Posts: 77
linuxmozilla
Re: persistent DNS cache - howto make it perminent??

Quote:
Originally Posted by smurffit View Post
How did you FF compiled with ICC? It seems a very tricky thing to me (at least on a 64bit system?!)

For your resolv.conf Problem:

Code:
sed -i '1inameserver 127.0.0.1' /etc/resolv.conf
where the 1 indicates on which linenumber the text should be insert. put this in /etc/rc.local or someting similiar.

For dnsmasq: goto so Gnome-Menu -> System -> Administration -> Services and enable it there.
hey thanks for the tip.

i have never used the "sed" command, that's a new one for me, i will be sure to read the
manual for it.

as far as firefox, i haven't built it on a 64bit platform, but on my 32bit system it is working
great. in a week i have to build it again. right now it is making logs of my usage, so on the next build
it will be even faster/more optimized. here is the link i used:

http://forums.macnn.com/104/alternat...-planet-linux/

i wouldn't have been able to build it without this link, and the source and text file provided by LinuxDNA in this link. it's firefox 3.5 and is nice and fast. i also use the same version in OSX, except you can download that as a binary...i hope this helps intel's compiler suite is really good, but also fairly tricky to use, i have only been able to build a few very small projects on my own, as i am no programmer!

ts9

PS: if it works out for you, make sure you pass it along to others. the ICC build, is so much better
than the GCC build.

---------- Post added at 11:11 AM CST ---------- Previous post was at 10:58 AM CST ----------

hey i should add,

that when you go to build firefox, make sure your system has support for apng ( animated png ) .

if you don't have this, you may be missing buttons in your toolbar.
i made this mistake the first build...

cheerz

PS: i put a quick tutorial(all my links) up here in the forums about ICC built firefox and the persistent dns cache, i used your help too, and credited you
for the last bit you helped me with, i hope that is okay?

---------- Post added at 12:33 PM CST ---------- Previous post was at 11:11 AM CST ----------

Quote:
Originally Posted by smurffit View Post
How did you FF compiled with ICC? It seems a very tricky thing to me (at least on a 64bit system?!)

For your resolv.conf Problem:

Code:
sed -i '1inameserver 127.0.0.1' /etc/resolv.conf
where the 1 indicates on which linenumber the text should be insert. put this in /etc/rc.local or someting similiar.

For dnsmasq: goto so Gnome-Menu -> System -> Administration -> Services and enable it there.
i thought that worked, but on reboot the resolv.conf

was still missing the top line: nameserver 127.0.0.1

and checking the persistent dns cache:

dig yahoo.com

it should read time taken 0msec after being executed twice, and i verified the DNS cache
wasn't working. i wrote a shell script to deal with this, and added it to rc.local.
it still doesn't work. i manually have to execute my shell script everytime.

i can't figure it out, but atleast now i only have to execute "DNScache", and
it updates the resolv.conf. i also had to add entries to visudo to execute changes
without using a password on that script and resolve.conf

hopefully that fixes it....what a pain in the butt, if this doesn't work
i don't know what will, at all...

Last edited by tripleninez; 10th March 2010 at 04:42 PM.
  #4  
Old 10th March 2010, 06:13 PM
smurffit's Avatar
smurffit Offline
Registered User
 
Join Date: Dec 2009
Posts: 190
linuxfirefox
Re: persistent DNS cache - howto make it perminent??

The script IS working, but network-manager overrides the resolv.conf on establishing a connection.
__________________
Linux Registered User #503365 :)
  #5  
Old 10th March 2010, 06:29 PM
tripleninez Offline
Registered User
 
Join Date: Jan 2010
Location: Toronto, Canada
Posts: 77
linuxmozilla
Re: persistent DNS cache - howto make it perminent??

Quote:
Originally Posted by smurffit View Post
The script IS working, but network-manager overrides the resolv.conf on establishing a connection.
ya, i know. i have tried everything to stop it from overriding it.

the stupid thing is network(in administration) lists 127.0.0.1 as the top namserver.

i tried making it so root can't overirde resolv.conf.

it so so damn annoying, i am starting to get pissed at fedora....

is there a way to trigger a long delay, so that network manager does it's thing and then
with the delay my script does it's thing???

i don't know how to do that....


ts9
  #6  
Old 10th March 2010, 07:01 PM
marko's Avatar
marko Online
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,446
linuxfedorafirefox
Re: persistent DNS cache - howto make it perminent??

Quote:
Originally Posted by smurffit View Post

PS: if it works out for you, make sure you pass it along to others. the ICC build, is so much better
than the GCC build.
I could see some speed up but it's that huge? More likely the problem is that the Firefox mozilla rolls has to be very conservatively optimized because they want it to run on any general i386 32processor,
you probably put in all the specific optimize flags for your exact processor right?
  #7  
Old 10th March 2010, 07:04 PM
tripleninez Offline
Registered User
 
Join Date: Jan 2010
Location: Toronto, Canada
Posts: 77
linuxmozilla
Re: persistent DNS cache - howto make it perminent??

Quote:
Originally Posted by marko View Post
So don't use NetworkManager but use network instead?
no im not saying that, i don't know what to do...

i just tried to set that in there, is it is apart of fc12, and i thought it might have an effect,
but it doesn't.

like i said i'm not sure what to do....

if i have too, i will always just use my script. i odn't know what else to do...
there is another method to setting up a persistent DNS cache, but we would run into
the exact same problem, so i am stuck.

i hope somebody reads this thread who knows better than you or I,
and has a better solution, there has to be a way to make it permenant....
i just know network manager is pissing me right off...

why doesn't network manager has the ability to make an exception
or have this parameter added directly to it, a stupid design i tell you!!!

sorry i can't offer a better solution

hmmm, maybe it is possible to have firefox execute && initilize a script to modify
resolv.conf at the same time???? of course it would also have to restart dnsmasq too.....@*$@*%@

im gonna keep messing around, let me know if you figure out anything

later
  #8  
Old 10th March 2010, 07:15 PM
smurffit's Avatar
smurffit Offline
Registered User
 
Join Date: Dec 2009
Posts: 190
linuxfirefox
Re: persistent DNS cache - howto make it perminent??

There is a solution in Ubuntu, but i guess it's not applicable on F12
http://www.thejackol.com/2008/05/20/...dy-herongutsy/
__________________
Linux Registered User #503365 :)
  #9  
Old 10th March 2010, 07:56 PM
tripleninez Offline
Registered User
 
Join Date: Jan 2010
Location: Toronto, Canada
Posts: 77
linuxmozilla
Re: persistent DNS cache - howto make it perminent??

Quote:
Originally Posted by marko View Post
I could see some speed up but it's that huge? More likely the problem is that the Firefox mozilla rolls has to be very conservatively optimized because they want it to run on any general i386 32processor,
you probably put in all the specific optimize flags for your exact processor right?
of course i optimize it for my cpu, actually no, i didn't use "native-cpu settings". i use SSE2 optimization.
but i always optimize code. just like everything else on my laptop in fedora. my kernel, any software i actually use all the time, and firefox with the DNS cache it is WAAAAAYYYY FAAAASSSTTTEERRR!!!!! that's where the bottle neck is both in OSX and Linux.

and to clarify i am no computer scientist/programmer....

have you ever hear about how firefox in WINE is faster than the native linux firefox???? it's true, and quite pathetic for us linux users, don't you think??? the windows version is intel-optimized, unlike the linux one.so i would rather have my Native version be faster than using wine + firefox ( not that i do that, i tested it and it is true! ).

so if you are used to compiling things or good @ following instructions and you have intel's compiler, it is DEFINETLY worth it, and doesn't take much effort to compile. maybe 4-5 steps and a few modifications to files. the boys @ LinuxDNA have done all of the hard work, involving modifying the source code.

i have another post with all of the links, you should be able to find in the software section of the forum..posted today...

---------- Post added at 02:26 PM CST ---------- Previous post was at 02:20 PM CST ----------

Quote:
Originally Posted by smurffit View Post
There is a solution in Ubuntu, but i guess it's not applicable on F12
http://www.thejackol.com/2008/05/20/...dy-herongutsy/
dude, i think you just solved the problem, i applied the command:

sudo chattr +i /etc/resolv.conf (stops network manager from overwriting resolv.conf)

i am rebooting right now, we will see

and linux is linux, if the tools exist in fedora it shouldn't matter that
it was designed for ubuntu, or that his tutorial is for ubuntu...

i'll post when i reboot (this might be solved!)

if so, your the man cool guy!!!

---------- Post added at 02:32 PM CST ---------- Previous post was at 02:26 PM CST ----------

Quote:
Originally Posted by smurffit View Post
There is a solution in Ubuntu, but i guess it's not applicable on F12
http://www.thejackol.com/2008/05/20/...dy-herongutsy/
YUP, that did it!!!!

however, i word of caution. this solution isn't necessarily the best for laptop users, but is perfect
for desktops (as they don't move around and chances are use the same DNS nameservers all the time.)

i almost never use this laptop anywhere but home, so i dont care...

nice one brother!!!

it works!!!

---------- Post added at 02:48 PM CST ---------- Previous post was at 02:32 PM CST ----------

i think by using either + or -

you can make changes permanent(+) or allow network manager to change (-)

but i still need to test that..

rebooting again!

lol

---------- Post added at 02:56 PM CST ---------- Previous post was at 02:48 PM CST ----------

Quote:
Originally Posted by smurffit View Post
There is a solution in Ubuntu, but i guess it's not applicable on F12
http://www.thejackol.com/2008/05/20/...dy-herongutsy/
sudo chattr +i /etc/resolv.conf

permanent change to resolv.conf

or

sudo chattr -i /etc/resolv.conf

to allow changes

i am marking this solved!!!

thanks for the link, i am a happy man!!!!
Closed Thread

Tags
dns cache, dnsmasq, setting replaced

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Make group change on device permanent Jimls Using Fedora 4 1st January 2010 05:19 AM
How to make a symbolic link permanent royeo Using Fedora 2 6th October 2006 06:04 PM
How do I make static routes permanent? cquisenb Servers & Networking 4 23rd September 2006 03:34 PM
How to make duplex settings permanent? rgates Servers & Networking 1 8th March 2006 07:06 AM
Make a >mount --bind permanent? Church13 Servers & Networking 4 21st March 2005 04:09 PM


Current GMT-time: 06:04 (Sunday, 19-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat