elpirata1981
09-05-2015, 15:12
Un saluto a tutti gli amici del forum,
ho un problema con la configurazione di squid, non riesco a bloccare le connessioni verso determinati siti web pur avendo creato le regole ...
# ACL generali
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.0/255.255.255.0
acl SSL_ports port 443 563
acl Safe_ports port 80 81 21 443 563 70 210 1025-65535
acl mynet0 src 0.0.0.0/0.0.0.0
acl mynet1 src 192.168.0.0/255.255.255.0
acl mynet2 src 10.0.0.0/255.0.0.0
acl mynet3 src 192.168.1.0/255.255.255.0
acl adsites url_regex -i "/etc/squid/adslist.txt"
acl hostbloccati src 45.43.197.215 45.43.197.187 45.43.199.3 45.43.197.213 45.43.197.195 45.43.197.148
acl deathtoad0 url_regex .*ads.*
acl deathtoad1 url_regex .*pagead.*
acl deathtoad2 url_regex .*doubleclick.*
acl deathtoad3 url_regex .*ib.adnxs.com.*
acl deathtoad4 url_regex .*facebook.com.*
acl CONNECT method CONNECT
# Le regole per l'accesso alla cache e a internet
http_access allow all
http_access allow localhost
http_access allow mynet0
http_access allow mynet1
http_access allow mynet2
http_access allow mynet3
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny adsites
http_access deny hostbloccati
http_access deny deathtoad0
http_access deny deathtoad1
http_access deny deathtoad2
http_access deny deathtoad3
http_access deny deathtoad4
# Ora neghiamo tutto ciò che non è concesso esplicitamente
http_access deny all
icp_access allow localhost
icp_access allow mynet0
icp_access allow mynet1
icp_access allow mynet2
icp_access allow mynet3
icp_access allow adsites
icp_access allow hostbloccati
icp_access allow deathtoad0
icp_access allow deathtoad1
icp_access allow deathtoad2
icp_access allow deathtoad3
icp_access deny deathtoad4
icp_access deny all
miss_access allow localhost
miss_access allow mynet0
miss_access allow mynet1
miss_access allow mynet2
miss_access allow mynet3
miss_access allow adsites
miss_access allow hostbloccati
miss_access allow deathtoad0
miss_access allow deathtoad1
miss_access allow deathtoad2
miss_access allow deathtoad3
miss_access deny deathtoad4
miss_access deny all
Mi dareste una mano a capire dove sbaglio ? :muro:
ho un problema con la configurazione di squid, non riesco a bloccare le connessioni verso determinati siti web pur avendo creato le regole ...
# ACL generali
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.0/255.255.255.0
acl SSL_ports port 443 563
acl Safe_ports port 80 81 21 443 563 70 210 1025-65535
acl mynet0 src 0.0.0.0/0.0.0.0
acl mynet1 src 192.168.0.0/255.255.255.0
acl mynet2 src 10.0.0.0/255.0.0.0
acl mynet3 src 192.168.1.0/255.255.255.0
acl adsites url_regex -i "/etc/squid/adslist.txt"
acl hostbloccati src 45.43.197.215 45.43.197.187 45.43.199.3 45.43.197.213 45.43.197.195 45.43.197.148
acl deathtoad0 url_regex .*ads.*
acl deathtoad1 url_regex .*pagead.*
acl deathtoad2 url_regex .*doubleclick.*
acl deathtoad3 url_regex .*ib.adnxs.com.*
acl deathtoad4 url_regex .*facebook.com.*
acl CONNECT method CONNECT
# Le regole per l'accesso alla cache e a internet
http_access allow all
http_access allow localhost
http_access allow mynet0
http_access allow mynet1
http_access allow mynet2
http_access allow mynet3
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny adsites
http_access deny hostbloccati
http_access deny deathtoad0
http_access deny deathtoad1
http_access deny deathtoad2
http_access deny deathtoad3
http_access deny deathtoad4
# Ora neghiamo tutto ciò che non è concesso esplicitamente
http_access deny all
icp_access allow localhost
icp_access allow mynet0
icp_access allow mynet1
icp_access allow mynet2
icp_access allow mynet3
icp_access allow adsites
icp_access allow hostbloccati
icp_access allow deathtoad0
icp_access allow deathtoad1
icp_access allow deathtoad2
icp_access allow deathtoad3
icp_access deny deathtoad4
icp_access deny all
miss_access allow localhost
miss_access allow mynet0
miss_access allow mynet1
miss_access allow mynet2
miss_access allow mynet3
miss_access allow adsites
miss_access allow hostbloccati
miss_access allow deathtoad0
miss_access allow deathtoad1
miss_access allow deathtoad2
miss_access allow deathtoad3
miss_access deny deathtoad4
miss_access deny all
Mi dareste una mano a capire dove sbaglio ? :muro: