34

I want to enable access to all requests on Squid3 server ie. request from anywhere to anywhere through the proxy server should be allowed.

I've already tried adding this to the end of config file /etc/squid3/squid.conf:

acl all src 0.0.0.0/0
http_access allow all

I'm still getting the TCP_DENIED_REPLY error:

1490004026.216      0 10.142.224.249 TCP_DENIED_REPLY/403 3546 GET http://www.fb.com/ - HIER_NONE/- text/html

How do I do get this working?

FacePalm
  • 10,992
  • 5
  • 48
  • 50

2 Answers2

51

You need to edit the squid config file to enable access. The default location for the squid file on ubuntu is : /etc/squid3/squid.conf

The following lines enable access to all requests:

# allow all requests    
acl all src 0.0.0.0/0
http_access allow all

# Make sure your custom config is before the "deny all" line
http_access deny all

Note: Make sure you insert this before the final deny block in the squid config file:

If you'd like to debug your requests , use the following line in your config file:

debug_options ALL,1 33,2 28,9

This enables extensive logging for every request. The logs can be found in /var/log/squid3/cache.log

FacePalm
  • 10,992
  • 5
  • 48
  • 50
  • 3
    make sure you just enter " squid -k reconfigure" after modifying the config file. – sheraz ahmed Nov 13 '18 at 05:38
  • 11
    why would you put a `deny all` line after an `allow all` line? – Walrus the Cat Jan 03 '19 at 20:04
  • 1
    probably because rules are matched one by one in that order, so the first rule to catch a request decides its fate. – ratijas Apr 07 '19 at 17:48
  • 7
    Squid 3.5.20 tells me `ERROR: '0.0.0.0/0' needs to be replaced by the term 'all'`. I therefore only added the line `http_access allow all` at the beginning of the file, and it seems to work too (and without the error). – Dawn Drescher Jun 27 '19 at 12:06
  • 2
    And remove the "transparent" keyword from ```http_port 3128 transparent``` just in case if you added it – Topera Jun 02 '20 at 19:26
1

after solving the denying problem you can easily see all requests in

/var/log/squid/access.log