transparent squid problem
hi people!
I'm trying to set up a transparent squid proxy on my linux router and run into the following problem: The Squid proxy seems to run fine. If I configure my IE to use the proxy to access the internet everything works fine. But when I forward traffic to port 80 to the proxy-port on the gateway machine and try to access the Internet as if there were no proxy, squid gives me the following error: While trying to retrieve the URL: / The following error was encountered: Invalid URL Some aspect of the requested URL is incorrect. Possible problems: Missing or incorrect access protocol (should be `http://'' or similar) Missing hostname Illegal double-escape in the URL-Path Illegal character in hostname; underscores are not allowed at least the portredirection seems to work :) Any hints? Thanx in advance, Steave. BTW using opera doesn't change anything. |
You need a line sorta like this in your firewall setup:
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport www -j REDIRECT --to-port 8080 and you need a line sorta like this in your squid.conf: http_port 8080 And your firewall needs to let replies back in. |
The error-message is generated by squid -- so port-redirection is definitely working.
The internet access works via NAT and through the proxy (if not accessed transparently), so I think the firewall isn't the problem either I guess it's a configuration problem in either squid or my IE/Opera |
Hmmm.... I'm using squid in transparent proxy mode too, thru NAT, and none of my IE users needed any additiional configuration: just left all the proxy settings blank on IE. Same with Mozilla/Netscape, no proxy settings needed, ran right "out of the box".
As far as I remember, the stuff I posted above was all I did to get transparent proxying. I've also got the following lines in squid.conf: httpd_accel_host virtual httpd_accel_with_proxy on httpd_accel_uses_host_header on I thought they were mostly for http acceleration but maybe they have an effect on proxying too |
hooray!
it worked! you obviously need httpd_accel_uses_host_header on (which is also stated in my heavily commented squid.conf) and httpd_accel_host_virtual on (which isn't even mentioned in my squid.conf) thanx for your help! |
No prob
Glad I could help |
httpd_accel_host_virtual on? Is there a directive for squid.conf like this???
|
Quote:
that is how I have it. It is documented in the comments that come in the default squid.conf file |
All times are GMT -5. The time now is 10:45 PM. |