• 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 Server on Linux Debian 11.3

  • 00:24 lsb_release -a
  • 00:34 apt-get install squid
  • 01:06 systemctl start squid
  • 01:22 systemctl status squid
  • 01:43 vi /etc/squid/squid.conf
  • 03:28 vi /etc/squid/block.txt
  • 04:06 service squid reload
{{postValue.id}}

To Install and Configure Squid Server on Linux Debian 11.3

Introduction:

A proxy server acts as a gateway between the user and the internet and is used to restrict websites and browsers from particular users.

Step 1: Check the OS version by using the below command

root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye

Step 2: Once the OS version is checked, now install the squid server by using the below command

root@linuxhelp:~# apt-get install squid
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
The following NEW packages will be installed:
After this operation, 15.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Processing triggers for ufw (0.36-7.1) ...
Rules updated for profile 'OpenSSH'
Firewall reloaded
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.31-13+deb11u3) ...

Step 3: After the squid is installed, now start the squid service by using the below command

root@linuxhelp:~# systemctl start squid

Step 4: After the squid service is started. Check the status of the squid service by using the below command

root@linuxhelp:~# systemctl status squid
● squid.service - Squid Web Proxy Server
     Loaded: loaded (/lib/systemd/system/squid.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2022-06-23 23:40:24 IST; 5s ago
       Docs: man:squid(8)
    Process: 35570 ExecStartPre=/usr/sbin/squid --foreground -z (code=exited, status=0/SUCCESS)
   Main PID: 35573 (squid)
      Tasks: 4 (limit: 6156)
     Memory: 15.8M
        CPU: 228ms
     CGroup: /system.slice/squid.service
             ├─35573 /usr/sbin/squid --foreground -sYC
             ├─35575 (squid-1) --kid squid-1 --foreground -sYC
             ├─35576 (logfile-daemon) /var/log/squid/access.log
             └─35577 (pinger)

Jun 23 23:40:24 linuxhelp squid[35575]: Adaptation support is off.
Jun 23 23:40:24 linuxhelp squid[35575]: Accepting HTTP Socket connections at local=[::]:3128 remote=[::] F>
Jun 23 23:40:24 linuxhelp systemd[1]: Started Squid Web Proxy Server.
Jun 23 23:40:25 linuxhelp squid[35575]: storeLateRelease: released 0 objects

Step 5: After the squid server status is checked. Let configure some rules using squid.conf file by using the below command

root@linuxhelp:~# vi /etc/squid/squid.conf

#INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
include /etc/squid/conf.d/*
acl newlist src 192.168.6.127
acl blok dstdomain "/etc/squid/block.txt"
http_access deny newlist blok
http_access allow newlist

#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

Step 6: After the configuration is complete. Let configure block.txt by using the below command

root@linuxhelp:~# vi /etc/squid/block.txt
google.com

Step 7: After the configuration is complete, now reload the squid service by using the below command

root@linuxhelp:~# service squid reload

Step 8: Open the setting on browser and Click the network setting option as shown in the below image snap 1

snap 2

Step 9: Configure Proxy Access to the Internet. Enter the Google.com, the site is blocked by squid proxy service. Enter into the Instagram, this page will be allowed by the squid server. snap 3

snap 4

snap 5

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to install and configure Squid server on Linux Debian 11.3. Your feedback is much welcome.

Tags:
jackson
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is the port number of squid proxy?

A

The port number of squid proxy is 3128.

Q

Where is the squid proxy configuration location?

A

The location of the squid proxy configuration file is /etc/squid/squid.conf.

Q

Which command is used to restart the squid service?

A

To restart the squid service use systemctl

Q

Which protocols support the squid server?

A

The squid server supports HTTP, FTP, SSL, and DNS protocols.

Q

What is the file format of Squid stores data?

A

Squid stores data file format is UFS(Universal Flash Storage).

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 Isaiah ?
What is the use of SUID & SGID commands

How to set the special permissions to the files and folders using SUID and SGID commands...

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.