[opensuse] Squid does not execute squidguard (As it should)
Hello everyone, I have some trouble with Squid and SquidGuard on openSUSE 15.1. Apparently squidGuard is not called by squid and does not use the squidGuard database, as a result everything passes the proxy. More details : Tow virtual machines based on OpenSuse leap 15.1 : - A server with Squid and squiguard (Packages: squid squidguard squidguard-doc), the firewall is down for the test. - A client with a GUI and Firefox configured to target the proxy server (Manual configuration). .. Squid configuration files : # # Recommended minimum configuration: # # Example rule allowing access from your local networks. # Adapt to list your (internal) IP networks from where browsing # should be allowed #acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN) #acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN) #acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN) #acl localnet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines #acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN) #acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN) #acl localnet src fc00::/7 # RFC 4193 local private network range #acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines acl localnet src 192.168.122.0/24 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 acl forbiddenword url_regex shopping facebook # Add pass to squidGuard program url_rewrite_program /usr/sbin/squidGuard -c /etc/squidguard.conf #url_rewrite_children 5 # # Recommended minimum Access Permission configuration: # # Deny requests to certain unsafe ports http_access deny !Safe_ports # Deny CONNECT to other than secure SSL ports http_access deny CONNECT !SSL_ports # Only allow cachemgr access from localhost http_access allow localhost manager http_access deny manager # We strongly recommend the following be uncommented to protect innocent # web applications running on the proxy server who think the only # one who can access services on "localhost" is a local user #http_access deny to_localhost # # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS # http_access deny forbiddenword http_access allow localnet # Example rule allowing access from your local networks. # Adapt localnet in the ACL section to list your (internal) IP networks # from where browsing should be allowed http_access allow localhost # And finally deny all other access to this proxy http_access deny all # Squid normally listens to port 3128 http_port 3128 # Uncomment and adjust the following to add a disk cache directory. #cache_dir ufs /var/cache/squid 100 16 256 # Leave coredumps in the first cache dir coredump_dir /var/cache/squid # # Add any of your own refresh_pattern entries above these. # refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 refresh_pattern . 0 20% 4320 .. squidguard configuration file # # CONFIG FILE FOR SQUIDGUARD # dbhome /var/lib/squidGuard/db logdir /var/log/squidGuard # # DESTINATION CLASSES: # dest adult { domainlist blacklist/domains urllist blacklist/urls expressionlist blacklist/expressions } dest shopping { domainlist shopping/domains urllist shopping/urls expressionlist shopping/expressions } acl { default { pass !adult !shopping !in-addr any none redirect http://192.168.122.233:/block.html } } I get the shopping list from this url: https://dsi.ut-capitole.fr/blacklists/index_en.php the url_regex works fine, and the squidguard executable does not seem to be called by squid. The logs entry shows only the squidguard launched by hand in my terminal. .. squidguard logs 2019-11-21 14:46:23 [5070] squidGuard 1.4 started (1574343981.465) 2019-11-21 14:46:23 [5070] db update done 2019-11-21 14:46:23 [5070] squidGuard stopped (1574343983.014) 2019-11-21 17:02:34 [7534] New setting: dbhome: /var/lib/squidGuard/db 2019-11-21 17:02:34 [7534] New setting: logdir: /var/log/squidGuard 2019-11-21 17:02:34 [7534] init domainlist /var/lib/squidGuard/db/blacklist/domains 2019-11-21 17:02:34 [7534] loading dbfile /var/lib/squidGuard/db/blacklist/domains.db 2019-11-21 17:02:34 [7534] init urllist /var/lib/squidGuard/db/blacklist/urls 2019-11-21 17:02:34 [7534] loading dbfile /var/lib/squidGuard/db/blacklist/urls.db 2019-11-21 17:02:34 [7534] init expressionlist /var/lib/squidGuard/db/blacklist/expressions 2019-11-21 17:02:34 [7534] init domainlist /var/lib/squidGuard/db/blacklist/shopping 2019-11-21 17:02:34 [7534] loading dbfile /var/lib/squidGuard/db/blacklist/shopping.db 2019-11-21 17:02:34 [7534] squidGuard 1.4 started (1574352154.779) 2019-11-21 17:02:34 [7534] squidGuard ready for requests (1574352154.780) Can you help me to understand why squidguard is not called by squid ? best regards, -- Rollniak -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 11/21/19 9:28 PM, Rollniak wrote:
The logs entry shows only the squidguard launched by hand in my terminal.
.. squidguard logs
The question is whether squidGuard can read its files with user `squid`. Can you check if everything is running correctly under that user? - Adam -- Adam Majer - amajer@suse.de SUSE Software Solutions Germany GmbH HRB 36809 (AG Nürnberg), GF: Felix Imendörffer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Adam Majer
-
Rollniak