LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   configuring squid to block URLs (https://www.linuxquestions.org/questions/linux-networking-3/configuring-squid-to-block-urls-669246/)

amitkush 09-11-2008 11:34 AM

configuring squid to block URLs
 
Hello all!
I have HP Proliant ML350 G5 running RHEL AS4. How can I configure squid to block the contents based on keywords or block URLs to impose restrictions.
Also, can I impose restrictions by declaring ACL using IP address and MAC address together? If yes, then how?
Thanks
Amit

TB0ne 09-11-2008 12:23 PM

Quote:

Originally Posted by amitkush (Post 3277279)
Hello all!
I have HP Proliant ML350 G5 running RHEL AS4. How can I configure squid to block the contents based on keywords or block URLs to impose restrictions.
Also, can I impose restrictions by declaring ACL using IP address and MAC address together? If yes, then how?
Thanks
Amit

I'd suggest reading the squid and squid-guard documentation. For example:

To deploy the web-site blocking mechanism in Squid, add the following entries to your Squid configuration file (in my system, it's called squid.conf and it's located in the /etc/squid directory):

acl bad url_regex "/etc/squid/squid-block.acl" http_access deny bad

The file /etc/squid/squid-block.acl contains web sites or words you want to block. You can name the file whatever you like. If a site has the URL or word listed in squid-block.acl file, it won�t be accesible to your users.
Be aware that if you use keywords to block on (say playboy, or sex), that by blocking sites containing the word 'sex', you will also block sites such as http://www.sussexcounty.com, etc. To resolve this problem, you can put those sites in a special file called squid-noblock.acl:

http://www.sussexcounty.com

The documentation you already have with Squid tells you more in greater detail.

amitkush 09-13-2008 11:56 AM

Thanks! I will give it a try.
What about acl using IP address and MAC address combination.


All times are GMT -5. The time now is 03:25 PM.