How to Install and Configure Squid Proxy in Ubuntu 20.4.1
- 00:38 Yum install httpd -y
- 01:24 systemctl start httpd
- 01:27 systemctl enable httpd
- 01:37 systemctl status httpd
- 01:48 yum install php php-zip php-soap php-cli php-common php-gd php-mbstring php-mcrypt php-mysqlnd php-xml
- 02:20 wget https://opensolution.org/download/home.html?sFile=Quick.Cms_v6.6-en.zip
- 03:20 mv quickcms /var/www/
- 03:36 chown -R apache:apache /var/www/quickcms
- 03:56 chmod -R 755 /var/www/quickcms
- 04:14 vim /etc/httpd/conf.d/quickcms.conf
- 06:05 systemctl restart httpd
To Install and configure Squid proxy server in Ubuntu 20.4.1
Introduction:
Squid is a web proxy cache server that provides proxy and cache services for HTTP (HyperText Transport Protocol), FTP (File Transfer Protocol), and other network protocols.
Installation process:
Run lsb_release command to check the installed version of OS as follows.
root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
Install Squid:
To install Squid enter the mentioned command:
root@linuxhelp:~# apt install squid
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libdbi-perl libecap3 squid-common squid-langpack
Suggested packages:
libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl
squidclient squid-cgi squid-purge resolvconf smbclient winbind
The following NEW packages will be installed:
libdbi-perl libecap3 squid squid-common squid-langpack
0 upgraded, 5 newly installed, 0 to remove and 180 not upgraded.
Need to get 3,666 kB of archives.
After this operation, 15.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://in.archive.ubuntu.com/ubuntu focal/main amd64 libecap3 amd64 1.0.1-3.2ubuntu1 [17.4 kB]
After completing the above step, open the squid configuration file by using the following command:
root@linuxhelp:~# vim /etc/squid/squid.conf
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
include /etc/squid/conf.d/*
acl localnet src 192.168.7.237
acl blocksite dstdomain "/etc/squid/blocksite"
http_access deny blocksite
http_access allow localnet
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
#http_access allow localnet
http_access allow localhost
# And finally deny all other access to this proxy
http_access allow all
After the configuration is completed. Let open block site file to block the particular website by using the following command.
root@linuxhelp:~# vim /etc/squid/blocksite
facebook.com
Once the above step is completed, restart the squid server by using the below command
root@linuxhelp:~# systemctl restart squid
After completed open the client machine browser and follow the below steps Go to the settings Select Advanced option Open Proxy settings Turn ON proxy server Enter IP address and Port number Facebook is not working Amazon is working
With this method the Installation process of SQUID on Ubuntu comes to end.
Comments ( 0 )
No comments available