From the course: Protecting Your Network with Open Source Software

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Setting up Squid

Setting up Squid

From the course: Protecting Your Network with Open Source Software

Start my 1-month free trial

Setting up Squid

- [Instructor] Let's install Squid and block a website. Type sudo apt-get install squid. Press Enter. Type Y. And press Enter. To specify which site to block, we need to edit the configuration file. Type cd /etc/squid/. Press Enter. Type ls and squid.conf is the configuration file. Now type sudo nano squid.conf. Press Enter. Press Control and W together to do a search. Type url_regex. Press Enter. Let's add our rule here. Type acl space banned, B-A-N-N-E-D, space, url_regex. Here regex stands for regular expression used to specify search patterns. Our search pattern is a portion of a URL. We use the label banned to name this rule. We'll be using a file to store the banned URLs. Therefore, we need to specify where the file is. Type a double quotation mark. /etc/squid/ and then the name of the file, blocked. And close the double quotation mark. Now find a line that says insert your own…

Contents