Setup Squid3 Proxy Server on Debian

  • Last Created On Dec 10, 2024
  • 8
0 0

Installation

Install Squid3 and Apache tools.

apt-get install squid3 apache2-utils

We will use Apache htpasswd to generate a password. If you don’t want to install additional packages, you can use perl to generate your password.

Backup and replace Squid3 Configuration

Backup current Squid3 settings.

cp /etc/squid3/squid.conf /etc/squid3/squid.conf.bak

Open and replace the content in /etc/squid3/squid.conf with following:

http_port 3128

auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/.passwd
auth_param basic children 1
auth_param basic credentialsttl 1 minute
auth_param basic casesensitive off

acl auth proxy_auth REQUIRED
acl localhost src 127.0.0.0/8

http_access allow auth
http_access allow localhost
http_access deny all

cache deny all

forwarded_for delete
request_header_access Via deny all

Notes: The default port for Squid is 3128, change it to another port for better security purposes.

Create Squid3 User

Create a new user to login to the Squid3 server.

htpasswd -c /etc/squid3/.passwd YOUR_USER_NAME

If you do not have Apache tool installed, use perl to create your authentication.

echo -e "YOUR_USERNAME:`perl -le 'print crypt("YOUR_PASSWORD","salt")'`" > /etc/squid3/.passwd

Restart your Squid3 service, and the job is done.

/etc/init.d/squid3 restart
Views: 8

Recent Articles

  • How to Install JAX with ROCm Acceleratio...
    96
  • Deploy a PyTorch Workspace on a Vultr Cl...
    71
  • Managing Backup Storage
    82
  • Automating FTP Backups in Windows Server
    71
  • Automating FTP Backups in Linux
    75

Popular Articles

  • Our General Terms & Conditions
    2630
  • Our Privacy Policy
    2474
  • Our Cookies Policy
    275
  • Our Terms of Use
    152
  • How to Install JAX with ROCm Acceleratio...
    96