Re: [squid-users] Squid as transparent proxy show squid error pages in browser

From: Frantisek Remias <fandaremail_at_gmail.com>
Date: Thu, 10 Jan 2013 14:11:52 +0100

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_at_treenet.co.nz>
>
> 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
Received on Thu Jan 10 2013 - 13:12:01 MST

This archive was generated by hypermail 2.2.0 : Thu Jan 10 2013 - 12:00:03 MST