Squid error prevents web use
-
I just upgraded pfsense to 2.1.3 and tried squid to save some bandwidth. I installed squid 2 stable and every website I try to visit comes with this error:
ERROR
The requested URL could not be retrieved
While trying to process the request:
GET / HTTP/1.1
Accept: text/html, application/xhtml+xml, /
Accept-Language: en-US
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Accept-Encoding: gzip, deflate
Host: www.google.com
DNT: 1
Connection: Keep-AliveThe following error was encountered:
•Invalid RequestSome aspect of the HTTP Request is invalid. Possible problems:
•Missing or unknown request method
•Missing URL
•Missing HTTP Identifier (HTTP/1.0)
•Request is too large
•Content-Length missing for POST or PUT requests
•Illegal character in hostname; underscores are not allowedI followed the guide on pfsense.org to set it up but soemthing must have gone wrong.
any ideas?
-
First off, using Squid to save bandwidth won't get you far these days unless you have a ton of users. Most pages these days are dynamic and your cache hits will likely be few and far between, but YMMV.
To troubleshoot your problem, some screens of your config would be nice, but check these:
Services - Proxy server - General
Make sure the "Proxy Interface" is set to "LAN"
Make sure that "Allow users on interface" is checked, or nobody gets to play
Make sure that "Transparent proxy" is checked or you will have to manually configure the proxy server address on every client
If your clients aren't on the same subnet as pfSense, then you will need to add that subnet under Access control - Allowed subnets. -
I just had similar issues with 2.1.3 and squid 2.7.9 pkg v.4.3.4
I had been running previous version, removed and installed a few times.. but just continued to get errors. Problem came down to having Transparent Proxy enabled, disabling it would obviously allow things to work (duh).
I ended up uninstalling squid… logging in with PuTTY, and removing all of squids old cache and other directories from the system (make sure you're careful obviously).
... reinstalled, reconfigured, enabled transparent proxy and was good to go.
seemed the old cache and/or some config was causing a problem.
hope that helps you too.
-
It seems both squid 2 and 3 are giving the same problem, I will try your suggestion razblack. Can I just use the File Manager to delete the /var/squid folder?
@KOM: all the settings are as you said. I had to delete squid to get online so I don't have the config file anymore. If I do that razblack suggested and it still doesn't work, I will post the config file.
-
I tried using the file browser built into pfsense, but it doesn't allow selection/deletion of files and directories it seems.
use PuTTY, it's a simple SSH tool and gives you full command line access.
http://www.putty.org/
here's a list of FreeBSD commands incase you need it too:
http://ws.edu.isoc.org/workshops/2006/ccTLD-Samoa/day1/freebsd/freebsdref-1up.pdf
-
Yes, I would remove the existing Squid package and then shell in and manually remove it with rm -r /var/squid
-
I deleted both the squid and lightsquid directory via file manager. Now squid works as it should after a reinstall. However, I couldn't get lightsquid to work (it has never worked well, can't seem to refresh the reports at all) so I am using SARG instead. Out of curiosity, I used Putty to SSH into the router. In the shell, when I issue the "ls" command I only see a bunch of directories with . in front of them and not the things I see in the file manager. Did I do something wrong?
-
Lightsquid works well for me. What kind of problems are you having?
When you shell in, you're left in the /root folder. In that folder are a bunch of files, including dot files. These files are usually config/metadata files for things like your user profile, shell settings, etc. You didn't do anything wrong that I can see.
-
Clicking "Refresh Now" and "Full Refresh" does nothing on Lightsquid. SARG works pretty well, and more settings for control too so I'll keep using it instead.
How do I navigate from root folder so I see the normal folders like /var and /etc? Just go up 1 directory?
-
Pretty much, if you know how to navigate a Linux/UNIX filesystem. cd / will get you to the root folder, not to be confused with the 'root' folder.