Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Updating package database
- apt-get update
- # Installing necessary packages (Squid, apache2-utils for htpassword and dependencies)
- apt-get install apache2-utils squid3 iptables -y
- # Edit this for username and password change
- username="USERNAME HERE"
- password="PASSWORD HERE"
- # Creating user with username and password from above
- htpasswd -b -c /etc/squid3/passwd $username $password
- # Downloading Squid configuration
- wget -O /etc/squid3/squid.conf https://raw.githubusercontent.com/hidden-refuge/squid-proxy-installer/master/spi-ubuntu.conf --no-check-certificate
- # Copying squid3.conf from init to init.d for startup script
- cp /etc/init/squid3.conf /etc/init.d/squid3
- # Creating empty blacklist.acl file for further blacklisting entries
- touch /etc/squid3/blacklist.acl
- # Restarting Squid and enabling its service
- service squid3 restart && update-rc.d squid3 defaults
- # Running function firew2
- iptables -I INPUT -p tcp --dport 3128 -j ACCEPT
- iptables-save
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement