Search squid archive

Re: Squid as transparent proxy show squid error pages in browser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Frantisek,

This is no squid problem.
since it's intercept proxy the client tries to do a dns lookup for the www.example.com but since it dosn't have any way to get the dns result for this domain it shows the client the problem it has.
Firefox dont know to what IP send the requests.
In this situation the client dont even send a request at all that squid can intercept.

Handle this kind of network issues in another level then squid\application.

Regards,
Eliezer

On 1/10/2013 3:11 PM, Frantisek Remias wrote:
OK, the problem is that it still show browser default error message
like before when the domain cannot be resolved

The error message is like

"Server not found. Check if the address for typing errors such as
ww.example.com of www.example.com" in firefox.

I need to show custom page instead of this browser default page when
there is no internent connection

2013/1/10 Amos Jeffries <squid3@xxxxxxxxxxxxx>

On 10/01/2013 9:38 p.m., Frantisek Remias wrote:

Hello,

thank you for the response.

If I set the browser to use proxy a there is temporarily no internet
connection..then it shows the custom page (the ERR_DNS_FAIL one). BTW:
Is it possible to define another custom page when the internet
connection is not available (so it will shows different one when there
is DNS problem and another if internet connection is unavailable?)


How is Squid to know about connection unavailable? It is not making a
connection, just doing DNS lookup at this point to determine where the
connection might go in future. It is entirely possible (and normal) that
routing make the DNS go through one upstream link and HTTP packets through
another.


If I dont set the browser to use proxy (meaning it will use
transparent mode proxy). It shows default browser error message like
"Internet Explorer cannot display the webpage" or "Server not
found...Firefox cant found the server at www.".... in firefox. What I
need is to show the squid custom page in this case there isnt internet
connection available


Interfaces these days offer scripted hooks. So...

You configure Squid with:
   http_port 3128 intercept name=port1
   http_port 3129 intercept name=port2
   acl port2 myportname port2
   deny_info ERR_CUSTOM port2
   http_access deny port2

Then you make a script which changes the iptables rules sending traffic to
port #2 of Squid when the link goes down and sending traffic to port #1 of
Squid when it goes up.

Amos


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux