Skip to content

Instantly share code, notes, and snippets.

@omartrigui
Forked from Shellbye/basic_squid3
Created June 7, 2018 13:13
Show Gist options
  • Save omartrigui/77446d3c15218243efb42a80f0bc30c7 to your computer and use it in GitHub Desktop.
Save omartrigui/77446d3c15218243efb42a80f0bc30c7 to your computer and use it in GitHub Desktop.
squid3 basic authentication
# ref http://stackoverflow.com/questions/3297196/how-to-set-up-a-squid-proxy-with-basic-username-and-password-authentication
# first install apache:
# $ sudo apt-get install -y apache2-utils
# add these five lines to /etc/squid3/squid.conf
auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/passwords
auth_param basic realm proxy
acl authenticated proxy_auth REQUIRED
http_access allow authenticated
http_port 3128 # or whatever you like
htpasswd -cd /etc/squid3/passwords username
# then type password twice and you will see 'Adding password for user username'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment