1820095 Members
3364 Online
109608 Solutions
New Discussion юеВ

squid proxy problem

 
SOLVED
Go to solution
Marco_113
Frequent Advisor

squid proxy problem

Hi all,
i've a red hat 8.0 with proxy squid.
The problem is
How can i say squid that for a specific IP it must not cache the content of url??

I want that from my client on the network, if i request a specific IP, it don't ask to squid cache, but receive the url information directly from the url IP, also if the page is not changed at all.

I'm also unable to say my client to ignore proxy for local IP resolution even if i've checked it on the browser.
Then anyone can tell me what is the relationship between the squid cache and the client browser cache?

Thanks
15 REPLIES 15
Alexander Chuzhoy
Honored Contributor

Re: squid proxy problem

You didn't say what your clients are:
Microsoft Explorer:
Tools->Internet Options->Connection->Lan settings->
check the button on your client's browser to bypass proxy server for local addresses.
Then under advanced add the URL to the list of such "local addresses"

Mozilla:
Edit->Preferences->Advance->Proxies->
add an address to: "no proxy for"
Marco_113
Frequent Advisor

Re: squid proxy problem

My browser is explorer;
I've already checked the setting to ignore local IP.

The point is:
in my lan i've a server (call it Marco) that refresh its info every 2 minutes;
If from my client (with browser exclusion of proxy) i connect to that server, i will see always the same old information till i don't clean the local cache of my client.

If i control the /var/log/messages/access on squid server i see the entries from my client to the server Marco.
Why???
So the problems are two

1) I'm unable to ignore proxy for local server
2) It seems that the proxy flags the client cache so that i continue to receive old information from local server


Alexander Chuzhoy
Honored Contributor

Re: squid proxy problem

The client will hold pages in it's cache even when you work with squid unless you configure it not to.
Specify on your client to "check for new version of stored pages" every visit to the page.
Senthilmurugan
Frequent Advisor

Re: squid proxy problem

Hello Marco,

Are you using Transparent proxy or direct proxy?
1. If you are using transparent proxy, i think you probably redirecting all the http (80) request to the proxy port (squid). So inorder to make your Specific IP not to be chached by squid you can prevent http requests of the particular IP address from being redirected.

#/sbin/iptables -t nat -A PREROUTING -p tcp --dport 80 -s / -d ! / -j REDIRECT --to-port

For example,
if the
Squid machines IP is 192.168.1.10 and your IP is 192.168.1.22 and the Squid is running in 2134 then your iptable rules can be

/sbin/iptables -t nat -A PREROUTING -p tcp --dport 80 -s 192.168.1.22/255.255.255.0 -d ! 192.168.1.10/255.255.255.0 -j REDIRECT --to-port 2134
2. If you are using Direct Proxy. you can change your Browser setting not to use the proxy server.

Regards,
Senthil murugan
Muthukumar_5
Honored Contributor

Re: squid proxy problem

1. We can specify on squid to not cache the specific ip related ip-address as,

acl specific-ip dst ip-address

Or use urlpath or urlpath_regex acl's to setup the acl setting for the particular ip-address needed to be not cache.

no_cache acl

It will do not cache the requested url with that ip-address

2. IF you don't want to cache all requests from the specific client then,

define an acl as,

acl client src /

# Make no cache for client acl
no_cache client

And more if you don't want the squid cache the directly don't use proxy on proxy mode of squid operation.

To make not to use for the specific url don't go through squid then go to proxy settings and set not to use proxy for that caching..

tool --> internet options --> connections --> lan settings --> advanced --> specify the url informations there...

3. Difference between browser cache and squid cache is as simple,

url header management, freshness check, content control, etc.
Easy to suggest when don't know about the problem!
Marco_113
Frequent Advisor

Re: squid proxy problem

The problem is not yet solved....

In my browser config, i've:
1) IP of proxy server squid
2) Ignore for local address
3) A list of IP url to ignore (in advanced setting)

In my squid config:

1)An acl with a dst IP to ignore
2) no_cache deny IP acl

The problem is that if i refresh or open the page i receive old info.
If i clean the local cache of browser i see the new information.

I've tried to set in browser cache to get new information every time i open the page, but it doesn't work

I think the problem is my browser cache, but then, why my browser works well if i don't set the proxy???

Thanks
Muthukumar_5
Honored Contributor

Re: squid proxy problem

As for as setting to no cache for requests on the browser ( client browser ) and squid proxy are OK.

information display --> client browser <--> squid <--> actual webserver

If you try to access an url request on clien browser, then it will try to check the contents being cached on browser FIRST. So that it is a effect from SQUID.

So try to use make browser as not to cache contents. ( remove browser cache ) there.

If you try now it will work as your expectation.
Easy to suggest when don't know about the problem!
Marco_113
Frequent Advisor

Re: squid proxy problem

Ok,
you 're saying that the only solution is to disable the cache on my client browser??
I've a IE 5.0, how can i do it?

I think you're right, but now my question is:

What is the utility of a proxy server if i've this problem.
It doesn't see that the content of a page is changed?
Muthukumar_5
Honored Contributor

Re: squid proxy problem

On I.E as,

go to browser tools --> internet options --> settings --> never

that is all, it won't cache anything there and make storage folder size to 0 there.

Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: squid proxy problem

What is the utility of a proxy server if i've this problem.
It doesn't see that the content of a page is changed?

---

When your client browser is having "storage folder" which stores the web page and mofication files there.

So, when you try to request the browser will try to check content pages on it's storage folder, then it will try to use squid.

Squid will try to check the contents on it's storage ( cache directory ) first then sends request to the actual webserver ,, returned information and meta tag informations of thaat page is stored on cache-dir and sent it to client browser.

If you set no_cache on squid for the particular ip then, squid won't cache them on cache directory,

or if you set don't use squid proxy for that request on i.e ( browser) then request will not sent via squid there.
Easy to suggest when don't know about the problem!
Marco_113
Frequent Advisor

Re: squid proxy problem

in my browser:
browser tools --> internet options --> settings --> never
means never search pages newest than those stored!

Anyway,
In my browser i've flagged to ignore proxy for an IP specific, but it doesn't work because i see in /var/log/messages/squid/access the GET queries to that IP

On squid server i have an acl with dst IP (that one i want to not be cached) and then no_cache deny acl

But it still doesn't work....


Marco_113
Frequent Advisor

Re: squid proxy problem

Is possible that the problem is on the server web that i query??

I don't know, may be that it's unable to comunicate the squid server its changes...

Senthilmurugan
Frequent Advisor

Re: squid proxy problem

What your Squid log says when you acces a particular page?

watch the squidlog using:

#tail -f /PATH/TO/SQUIDLOG/access.log


Paste the access.log output of your access. Did it shows TCP_HIT or TCP_MISS ? Or nothing when you access a page?


Regards,
Senthil Murugan
Muthukumar_5
Honored Contributor
Solution

Re: squid proxy problem

On I.E,

We have to set atleast the size of stroage folder to browser cache to 1 MB. But we can manage the setting as,

tools --> ie. otpions --> settings --> every visit to the page

It will go to that page every time without checking the stored page.

On Squid,

acl ip dst
no_cache deny ip

Restart the squid there.

See what did you get on the cache.log entries and store.log entries for that ip based url there.

and more how did you set ip-address url on i.e browser??

give the details to adopt your requirement and give perfect solution.
Easy to suggest when don't know about the problem!
Marco_113
Frequent Advisor

Re: squid proxy problem

Ok,
i solved the problem:


On squid server, it's ok with an acl with IP to not cache and no_cache deny

On my browser, on Browser tool-> internet setting->settings, i put research automatically new pages;

On Browser tool->Internet setting->Connection->LAn setting, i 've flagged Ignore proxy for local address and in advanced setting i put the name (as resolved by my dns server) of server to ifnore proxy.
So it works.

Probably the problem was that i put the IP address of the server and not the name as resolved by dns in advanced settings...

Thank everybody