How to open ports in Squid Proxy?
I have recently installed the Squid Proxy on my VPS and everything seems to be working fine except opening ports.
I am able to access the local IP of the machine using but when I try to access the VPS through its local IP or it fails to load or gives an error. I have set up the firewall to allow all traffic from the outside world. My Squid proxy is setup as shown in the following figure. Am I missing something? Any help would be much appreciated. Thanks in advance.
In squid.conf you can open ports manually or automatically. Use option httpport port and httpportbindip ip-address (you'll need 2 lines, one for listening and another for binding).
If you're looking for a dynamic solution you can use this configuration: httpport 8080. Httpportbindip 10.
How do I use squid proxy?
I have set up a squid proxy (following this tutorial) on the server, now how do I use it? For instance, how do I get users who are behind the proxy to use my website and how do I configure users that are not behind the proxy to use my website? Thank you for the help! The key part is in "how do I get users who are behind the proxy to use my website", where the main issue is the user's IP address (it needs to be in the list of allowed accesses), but also the user's "cookies" (their userID) and possibly the user's name (to distinguish between multiple users with the same userID). The way the "cookies" work in this case is that when the browser sends a request to a site it includes a "cookie" that identifies the client. In your case there's no need to store cookies, as they're included in every request already - see You can store the userID either as a global cookie, so that all requests are sent with the same ID (it will still be sent in the header of each request) or you can store it as a temporary cookie to only affect the current request. To allow users that are not behind the proxy to access your site, just remove the 'all' from the line: ALLPROXY @proxy.host @Proxy.port
You can also set up a single access that applies to everyone (not as easy as the 'all' line, but easier than the '
EDIT: The cookie problem in Firefox is well documented at the Mozilla forums: EDIT 2: The squid FAQ has a section on cookies: Specifically, Squid 1.3 has an option "UseRequestHeaderCookie" which allows you to read the cookies from the client as part of the HTTP request headers. There's an example in the document, but it doesn't seem to work in the current version of Squid.
Related Answers
What is Squid proxy used for?
Squid proxy is a very powerful software for HTTP proxies. In addition...
What is a Squid Proxy used for?
Squid Proxy is a proxy server software designed to filter and cont...
Does squid proxy support HTTPS?
The Squid Proxy supports HTTP, HTTPS and SSL. Squid Proxies are ver...