Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I would like to ask you is there a way to configure squid to redirect IPs. I want squid to read IP's from file saved in .TXT format saved on HDD or server on internet. And when user's IP matches with the IP from the TXT file squid redirects it to external URL hosted on remote server.
Second question - is there a way to configure squid to read the external TXT file every 10 minutes for example so when I manually enter new IP or remove old one squid reads it and reconfigure itself.
And when user's IP matches with the IP from the TXT file squid redirects it to external URL hosted on remote server.
You can use redirectors like squidguard.
Quote:
is there a way to configure squid to read the external TXT file every 10 minutes for example so when I manually enter new IP or remove old one squid reads it and reconfigure its
Every connection will force squid to read the config file(acls) so if the TXT file is linked to a certain acl, then it will be read everytime a coonnection is attempted, so you dont need to manually force squid to read it any other time.
I thought that squid reads squid.conf only when it starts and it keeps a copy from that squid.conf file to the RAM memory. I think that reading from HDD every time when packet passes the squid server is too slow process and will be a bottleneck.
(keeping the .TXT file on another server) eventually will be a too slow process because for every packet squid must connect to the server where its hosted the .txt file.
not for every packet, but for every client's initial connection to the squid server.
What you intend to de is usually all handled by a redirector like squidguard. you can then configure in squidguard, the time filter, which will be checked on every connection
Last edited by chitambira; 05-06-2009 at 05:52 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.