[SOLVED] how to deny block https sites for some users
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Squid is also capable of reading files containing lists of web sites and/or domains for use in ACLs. In this example we create to lists in files named /usr/local/etc/allowed-sites.squid and /usr/local/etc/restricted-sites.squid.
# Add this to the bottom of the ACL section of squid.conf
acl home_network src 192.168.1.0/24
acl business_hours time M T W H F 9:00-17:00
acl GoodSites dstdomain "/usr/local/etc/allowed-sites.squid"
acl BadSites dstdomain "/usr/local/etc/restricted-sites.squid"
#
# Add this at the top of the http_access section of squid.conf
#
http_access deny BadSites
http_access allow home_network business_hours GoodSites
these addresses to the files need to be logical, and kept in a non-user space.
If you don't want to restrict the times, leave out that line...
eg. "acl business_hours time M T W H F 9:00-17:00"
These files may contain....another example from linuxhomenetworking
Have you searched LQ for previous threads about this issue? I know for a fact that there are several, because I have participated in some. In any case, what you want could be done like this:
Why are you using URL regular expressions? That wasn't suggested anywhere on this thread. Also, the second http_access (which is presumably spelled properly in your actual squid.conf) would give total access to all clients in 192.168.1.0/24, which makes the first http_access pointless.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.