Advertisement
Guest User

Untitled

a guest
Jun 30th, 2017
388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Updating package database
  4. apt-get update
  5. # Installing necessary packages (Squid, apache2-utils for htpassword and dependencies)
  6. apt-get install apache2-utils squid3 iptables -y
  7. # Edit this for username and password change
  8. username="USERNAME HERE"
  9. password="PASSWORD HERE"
  10. # Creating user with username and password from above
  11. htpasswd -b -c /etc/squid3/passwd $username $password
  12. # Downloading Squid configuration
  13. wget -O /etc/squid3/squid.conf https://raw.githubusercontent.com/hidden-refuge/squid-proxy-installer/master/spi-ubuntu.conf --no-check-certificate
  14. # Copying squid3.conf from init to init.d for startup script
  15. cp /etc/init/squid3.conf /etc/init.d/squid3
  16. # Creating empty blacklist.acl file for further blacklisting entries
  17. touch /etc/squid3/blacklist.acl
  18. # Restarting Squid and enabling its service
  19. service squid3 restart && update-rc.d squid3 defaults
  20. # Running function firew2
  21. iptables -I INPUT -p tcp --dport 3128 -j ACCEPT
  22. iptables-save
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement