[squid-users] Squid with MySQL auth not denying pages with

prashantbhosale bhoslepu at gmail.com
Wed Apr 26 12:04:18 UTC 2017


I am setting up simple squid server for denying URL's. Below is my squid
config, URL's are getting blocked and TCP_DENIED/403 seen in access.log
file. 
But not showing error message/page shown in browser.

Another main task that I want to do is Squid authentication with MySQL.
Followed the instructions provided on
http://wiki.squid-cache.org/ConfigExamples/Authenticate/Mysql#Squid_Installation
Auth is working. But one problem is now the denied log is with
TCP_DENIED/407 instead of TCP_DENIED/403
and no user is specified in log.
1493126753.944      0 x.x.x.x TCP_DENIED/407 4510 GET
http://tg.symcd.com/MFEwTzBNMEswSTAJBgUrDgMCGgUABBRVuMwyhZnBGWkFKlkeoNe9zdlbSwQUK5o1rgEYODDhcHoF4BF2o869kBQCED3fM9dlZGIkaXhmllPjYgM%3D
- HIER_NONE/- text/html


Below is config with MySQL auth: 
ubuntu at proxy:~$ cat /etc/squid/squid.conf
auth_param basic program /usr/lib/squid3/basic_db_auth --user root
--password pass at 123 --plaintext  --persist
auth_param basic children 5 startup=5 idle=1
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours

acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http
acl CONNECT method CONNECT

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

http_access allow localhost manager
http_access deny manager

#acl db-auth proxy_auth REQUIRED
#http_access allow db-auth

acl addomain dstdomain "/etc/squid/addomains.acl"
http_access deny addomain

acl easyprivacy-regex url_regex -i "/etc/squid/easyprivacy.txt"
acl easylist-regex url_regex -i "/etc/squid/easylist.txt"
http_access deny easylist-regex
http_access deny easyprivacy-regex

http_access allow all
http_access allow localhost

http_port 3128 

coredump_dir /var/spool/squid

refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
refresh_pattern (Release|Packages(.gz)*)$      0       20%     2880

refresh_pattern .               0       20%     4320


Advanced Thanks for help!!!



--
View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-with-MySQL-auth-not-denying-pages-with-tp4682200.html
Sent from the Squid - Users mailing list archive at Nabble.com.


More information about the squid-users mailing list