LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Restrict users to browse in Squid. (https://www.linuxquestions.org/questions/linux-networking-3/restrict-users-to-browse-in-squid-488179/)

sapheroth 09-30-2006 12:44 AM

Restrict users to browse in Squid.
 
i wanted to restrict a specific proxy to restrict users to browse the internet for specific time...
i entered the following code in the access list

(i entered this followind code at the bottom of acl section)
acl FOO src 10.11.3.30/255.255.255.0
acl WORKING time MTWFHA 08:00-14:00

(and entered this code at the top of http_access portion)
http_access deny FOO WORKING
http_access deny FOO

where 10.11.0.30 is the proxy server.

when i restart the squid, i didnt get any error msg that means that the work is ok...
but the useres are still able to browse the internet....

plz tell me what the problem with this code.

regards.

amitsharma_26 09-30-2006 02:42 AM

Quote:

Originally Posted by sapheroth
(i entered this followind code at the bottom of acl section)
acl FOO src 10.11.3.30/255.255.255.0
acl WORKING time MTWFHA 08:00-14:00

(and entered this code at the top of http_access portion)
http_access deny FOO WORKING
http_access deny FOO

where 10.11.0.30 is the proxy server.

I dont see many things wrong in that.. but i suggest if you are blocking one single host, then you should have 255.255.255.255 as a subnet mask up there. Try modifying with that.

bonowax 09-30-2006 03:42 AM

Hi;

According to that portion of your config file, your proxy server and the hosts you want to block access to the internet, reside on different subnets... Is that so or was it a typo?...
As an example I usually do it this way:

....
....
acl FOO src 10.11.3.0/255.255.255.0 # Defines a trusted subnet
acl WORKING time MTWFHA 08:00-14:00 # Defines a time window to allow/deny access
....
....
....
http_access allow FOO !WORKING # Allows FOO to access but not during WORKING
http_access deny all

Hope this helps...

Cheers


All times are GMT -5. The time now is 03:48 AM.