Salve!
Gentile forum ho la necessità di creare una whitelist sulla mia macchina, la quale permetta di navigare alla stessa ed alle eventuali mi net i soli siti specificati in un file. Inutile dire che ho modificato il file “squid.info” ed al riavvio dello stesso ricevo un messaggio di errore.
Riporto maggiori informazioni qui sotto:
- il contenuto del file “squid.info”:
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 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
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
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
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 localnet
#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 8080
Uncomment and adjust the following to add a disk cache directory.
cache_dir ufs /var/spool/squid 100 16 256
Leave coredumps in the first cache dir
coredump_dir /var/spool/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
#MIE REGOLE
ACL whitelist dstdomain “/root/whitelist”
http_access allow whitelist
Dopo aver aggiunto le righe “MIE REGOLE” e riavviato il proxy con : systemctl restart squid ricevo il seguente errore:
- Errore dopo il riavvio di squid:
[root@localhost ~]# systemctl restart squid
Job for squid.service failed because the control process exited with error code. See “systemctl status squid.service” and “journalctl -xe” for details.
- utilizzando il comando “systemctl status squid” ottengo il seguente output:
dic 27 10:58:14 localhost.localdomain squid[3616]: Bungled /etc/squid/squid.conf line 81: http_access all…list
dic 27 10:58:14 localhost.localdomain squid[3616]: FATAL: Bungled /etc/squid/squid.conf line 81: http_acc…list
dic 27 10:58:14 localhost.localdomain squid[3616]: Squid Cache (Version 3.5.10): Terminated abnormally.
dic 27 10:58:14 localhost.localdomain squid[3616]: CPU Usage: 0.036 seconds = 0.024 user + 0.012 sys
dic 27 10:58:14 localhost.localdomain squid[3616]: Maximum Resident Size: 45104 KB
dic 27 10:58:14 localhost.localdomain squid[3616]: Page faults with physical i/o: 0
dic 27 10:58:14 localhost.localdomain systemd[1]: squid.service: Control process exited, code=exited status=1
dic 27 10:58:14 localhost.localdomain systemd[1]: Failed to start Squid caching proxy.
dic 27 10:58:14 localhost.localdomain systemd[1]: squid.service: Unit entered failed state.
dic 27 10:58:14 localhost.localdomain systemd[1]: squid.service: Failed with result ‘exit-code’.
Spero in un aiuto risolutivo!
Grazie a tutto il forum.