Skip to content

Instantly share code, notes, and snippets.

@Theramas
Created March 6, 2018 07:06
Show Gist options
  • Save Theramas/4251ca59a06f9f2e8a99deb0159ceaed to your computer and use it in GitHub Desktop.
Save Theramas/4251ca59a06f9f2e8a99deb0159ceaed to your computer and use it in GitHub Desktop.
#!/bin/bash
apt-get update
apt-get install squid3 apache2-utils -y
htpasswd -bc /etc/squid3/passwords testuser p@ssw0rd
cat <<EOT > /etc/squid3/squid.conf
debug_options ALL,9
http_port 3128
auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/passwords
auth_param basic realm proxy
acl authenticated proxy_auth REQUIRED
acl all src 0.0.0.0/0
acl localhost src 127.0.0.0/8
http_access allow authenticated
EOT
service squid3 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment