Skip to content

Squid installation

Max Chodorowski edited this page Dec 6, 2020 · 1 revision

Standard pre-installation steps

sudo apt update
sudo apt upgrade

Installing Squid

Additionally we are adding here Apache utils which we will use to create passwd file.

sudo apt install squid apache2-utils

Creating passwd file

sudo touch /etc/squid/squid_passwd
sudo chmod o+r /etc/squid/squid_passwd

Adding new user

htpasswd /etc/squid/squid_passwd put_your_user_name

You will be prompted to type the password

Updating the config

  • In auth_param section

    auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/squid_passwd

  • At the bottom of ACL section

    acl ncsa_users proxy_auth REQUIRED

  • At the top of http_access section

    http_access allow ncsa_users

  • Change port of needed

    http_port 8888

  • Hide original IP

    forwarded_for off

Done

sudo systemctl restart squid.service

Clone this wiki locally