This is a discussion on Squid problem. within the Linux Networking forums, part of the Linux Forums category; I am setting up Squid on a debian machine (a Knoppix 4.0.2 remaster to be specific), and am ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I am setting up Squid on a debian machine (a Knoppix 4.0.2 remaster to
be specific), and am having a problem with Squid and the dns. When I fire up the remaster on my laptop, there is no network connection. ie: no DNS entries in the resolv.conf file until I specify my SSID and WEP key to my wireless card and bring it up. Since I am staring with no network connection, I am having to start Squid with the -D option to bypass the initial DNS lookup. Here's where the problem comes in. I wrote a sript to set up my wireless card and bring it to life. Everything works fine, except Squid will not automatically reload the resolv.conf file. At this point, I have Squid running, Dansguardian running, the proper iptables rules in place, and the browser will connect to Squid/Dansguardian, just Squid sits there never looking up the correct ip. I can ping an address and it resolves fine. Here's the next catch. If I manually issue the command 'squid -k reconfigure' as root, it will pick up the new entries, and off we go. But since this is a Knoppix distribution, I eventually want to lock down the ability of the user to be able to issue these commands on their own. Defeats the purpose of a kid proof distro when the kids can stop the processes implemented to keep them safe. If anyone is still with me, it boils down to how can you get Squid to reload the resolv.conf file even if it's on a set timeframe, like each minute? I have tried with a crontab entry - no luck. I need it to be "squid" contained and not another script or program causing this. Thanks in advance, Isaac |
|
|||
|
Raqueeb,
I am running it with the internal DNS option right now. I can't put any entry in the /etc/hosts file because since this will be a Knoppix Live Cd, it could boot up anywhere, and hard coding a dns server wouldn't be a good idea. I have also recompiled it with the --disable-internal-dns option, but then it's on the hunt for a dns server running on the distribution. I will look into the cache only name server idea. I am also toying with the idea of digging into the Squid source and seeing if I can either add in a routine to get it to refresh the resolv.conf entries on a regular basis, or maybe even check to see if it's been changed since the last time Squid looked at it. A simple checksum would do. I realize it's not common for DNS entries to be unknown on bootup, and also that they don't really change much throughout the life of a machine, but in this instance, it's just a potential unknown on bootup. They may or may not be there. I guess I will also pursue this with the Squid team. Thanks, Isaac |