LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   transparent squid problem (https://www.linuxquestions.org/questions/linux-networking-3/transparent-squid-problem-57698/)

Steave 05-01-2003 04:10 PM

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.

MadRabbit 05-01-2003 11:38 PM

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.

Steave 05-02-2003 02:47 AM

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

MadRabbit 05-02-2003 07:58 AM

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

Steave 05-02-2003 10:30 AM

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!

MadRabbit 05-02-2003 01:45 PM

No prob

Glad I could help

n.antonio 05-04-2003 10:56 PM

httpd_accel_host_virtual on? Is there a directive for squid.conf like this???

MadRabbit 05-05-2003 12:51 AM

Quote:

Originally posted by MadRabbit
httpd_accel_host virtual
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

http_accel_host virtual

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.