Last active
October 23, 2023 20:37
-
-
Save Praseetha-KR/3920ad51c75b8d8a5951122a2cb5e697 to your computer and use it in GitHub Desktop.
Squid proxy cloud-init config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
package_update: true | |
packages: | |
- squid | |
- apache2-utils | |
write_files: | |
- path: /etc/squid/squid.conf | |
content: | | |
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/htpasswd | |
auth_param basic realm proxy | |
acl authenticated proxy_auth REQUIRED | |
http_access allow authenticated | |
http_port 0.0.0.0:3128 | |
runcmd: | |
- htpasswd -b -c /etc/squid/htpasswd USERNAME PASSWORD | |
- systemctl enable squid | |
- systemctl restart squid | |
- ufw enable | |
- ufw allow ssh | |
- ufw allow 'Squid' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment