How to Install Squid on Ubuntu 26.04

To install Squid on Ubuntu 26.04, listen on 3128 with basic auth. Change 104.248.238.191 to this server's public IP.

Step 1 : Update.

Step 2 : Install Squid and htpasswd.

Step 3 : Check status.

Step 4 : Create proxyuser and set a password.

Step 5 : include conf.d is read before deny all. Do not use allow localnet or allow all.

Step 6 : Allow the proxy port.

Step 7 : Restart.

Step 8 : From the client (another network). Change 104.248.238.191 to this server's public IP. Put the password from step 4 in the proxy URL.

Restrict port 3128 in the cloud firewall to your client. Basic auth is not a reason to publish an open proxy on the internet.

You have installed Squid on Ubuntu 26.04.