Monday, August 27, 2012

dishtv.in is not accessible via Squid

Problem


dishtv.in website is 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.

dishtv.in was accessible after making this change.

Disabling this header should not have any negative impact (AFAIK)







19 comments:

gunasaikia said...

Thank you ranjithrajaram. It really helped me. It solved a long pending issue of me.

Diego Zavala Trujillo said...

Thanks Gunasaikia for the link.

Hi Ranjith Rajaram I tried the solution you propose, and it seems not to work for me.

You think are the network configuration on my server? I am using squid 2.7Stable on Ubuntu server 10.04LTS.

The strange thing is that I have 2 scenarios in the same server (proxy), one going out through a fortinet and a second one going out through a infinitum (domestic internet) to internet.

The problem that I can not reach the corre-gto.com.mx webpage is when my server goes out through a fortinet. The problem goes away when my server goes out through a infinitum.

I do not control fortinet, and I do not know how it is configure. This is managed by another mate. On the other hand, clients that do not use proxy, can reach the web page with out any problem.

thanks and great day.

Unknown said...

Thank you
it realy help me...

Unknown said...

Thank you very much Ranjithrajaram...

It really helped me. It solved a long pending issue of me....

Unknown said...

Hi Ranjithrajaram...

If possible please provide us your email ID so that it will help us in the future in such type issues.

Regards,
Sandip
Pune

Email:- sandip.yadav143@rediffmail.com

Unknown said...

I added squid.conf
via off

squid -k parse
WARNING: HTTP requires the use of Via

Tux the Blogger said...

Great Blog Ranjith.

I am facing another issue on yahoo chat . Unable to access yahoo chat using Squid Proxy (Allowed all Squid URLs, Allowed 5050 and all required ports, Changed Squid configuration as per yahoo recommendation).
Client machine is trying establich a connection directly with Yahoo Server. All these 5050 port connection not coming to proxy and its directly hitting at Firewall.

Ravi Vagadia said...

Thanks, it was really helpful

Amit said...

Thanks great blog....

Amit said...
This comment has been removed by the author.
jp said...

I am using Squid2.6. Using that annauniversity website home page not opening through squid. If I access directly without squid it works fine.I analysed in access.log it stores TCP_MISS for that page but it gives blank page

What is the problem in squid

Erick.exe said...

man this helped me a lot thank for sharing knowledge...

Unknown said...

DishTv with now HD channel and its easy to rechange now visit link
Dishtv recharge in pakistan 

Unknown said...

DishTv with now HD channel and its easy to rechange now visit link
Dishtv recharge in pakistan 

Unknown said...
This comment has been removed by the author.
Unknown said...

Thanks Buddy

Unknown said...

Thanks a lot, this helped me :D

Karthick sekar said...

Hi I am a java developer. I am getting the same error while connecting to the web service. What is RC : 104 and what do I do to avoid it? There are two severs on the sevice provider under a load balancer. If the service provider shut down one server my pending request goes to the failed server and leading to RC: 104 on java web service. It is not routed via the active server. Is there a way to correct it?

Tan Tiong Meng said...

Thanks for sharing. It works for me by adding ==> via off.