First, let’s update the repositories:

apt-get update

Then install the proxy software and the associated password generator:

apt-get install squid apache2-utils

Once that’s done, let’s create an empty configuration file:

rm -rf /etc/squid/squid.conf
touch /etc/squid/squid.conf
chown proxy /etc/squid/squid.conf

Then create the password file:

touch /etc/squid/squid_passwd

Then grant permissions to the proxy:

chown proxy /etc/squid/squid_passwd

Start editing the configuration file:

nano /etc/squid/squid.conf

and add the following lines (for http_port, specify the port you want to connect to the proxy on):