• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

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
{{postValue.id}}

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 SNAP1 Select Advanced option SNAP2 Open Proxy settings SNAP3 Turn ON proxy server SNAP4 Enter IP address and Port number SNAP5 Facebook is not working SNAP6 Amazon is working SNAP7

With this method the Installation process of SQUID on Ubuntu comes to end.

Tags:
noah
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

How to install the squid server on ubuntu OS?

A

To install squid server on ubuntu OS use # apt install squid.

Q

How to open the squid configuration file?

A

To open the squid configuration file use # vim /etc/squid/squid.conf

Q

How to restart the squid server?

A

To restart the squid server use # systemctl

Q

What is the default port number of the squid server?

A

The default port number of the squid server is 3128

Q

How to check the status of the squid server?

A

To check the status of the squid server use # systemctl status squid.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Jayce ?
What are the types of table used in IPtables

What are the various types of table used in IPtables and how to use that for my server security?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.