From the course: Protecting Your Network with Open-Source Software

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Setting up Squid

Setting up Squid

- [Instructor] Let's install Squid, on our Ubuntu router host and block a website. Type sudo apt install squid, S-Q-U-I-D. Press Enter. Type Y, press Enter. To specify which site to block, we need to edit the Squid configuration file. Type cd /etc/squid/, press Enter. Type ls, and press Enter. And you can see, squid.conf file, the configuration file. Now, type sudo nano squid.conf. Press Enter. Press Control + W together to do a search. Type url_regex, press Enter. And right under that line, let's add our rule here. Type acl banned, B-A-N-N-E-D, url_regex. Let's make sure, acl banned 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 "/etc/squid is the directory location where our file is going to be, and that's why I just typed it. And then, the name of the file…

Contents