Tuesday 17 July 2012

Some Websites not open in SQUID Proxy

Websites not accessible via Squid

Problem


Some websites not accessible through Squid.

Following message is noticed in the browser

The following error was encountered: 
  • Read Error
The system returned: 
    (104) Connection reset by peer

Environment

Squid 2.6.STABLE21-6 
Squid 3.1.10-1 

Resolution

Add the following to squid.conf  and restart squid service

via off
forwarded_for delete


Root Cause/Diagnostics

Site was accessible directly. Via squid, connection would reset abruptly

Only difference when accessed via squid and directly was the addition of

X-Forwarded-For and via headers in the HTTP request

X-Forwarded-for usually contains the IP address of the host that requested the website

Example:  
X-Forwarded-For: 192.168.0.1
VIA usually has information about the proxy server
 
Example:
via: example.com 

Documentation:  forwarded_for and via

By disabling via off and setting forwarded_for delete, we disabling these headers in the HTTP request.
Disabling this header should not have any negative impact.

-----------------------------------------------------------------------------------------------





No comments:

Post a Comment