Advertisement
Guest User

confivps.sh

a guest
Sep 29th, 2016
2,757
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. #!/bin/bash
  2. apt-get update
  3. apt-get install squid3 -y
  4. apt-get install squid -y
  5. apt-get install figlet -y
  6.  
  7. clear
  8.  
  9. figlet RicKnetFreE
  10. sleep 3s
  11.  
  12. echo "Qual o ip do vps ?"
  13. read ip
  14.  
  15. hostname=$(hostname)
  16.  
  17. cd /etc/squid*
  18.  
  19. echo "http_port 80" > squid.conf
  20. echo "http_port 8080" >> squid.conf
  21. echo "visible_hostname $hostname" >> squid.conf
  22. echo "acl block url_regex -i zxc.pm" >> squid.conf
  23. echo "acl block url_regex -i zxc.rm" >> squid.conf
  24. echo "acl block url_regex -i vba.nz" >> squid.conf
  25. echo "acl block url_regex -i vba.pw" >> squid.conf
  26. echo "acl block url_regex -i .xyz" >> squid.conf
  27. echo "acl block url_regex -i ddns.net" >> squid.conf
  28. echo "acl ip url_regex $ip" >> squid.conf
  29. echo "acl accept url_regex -i .com.br" >> squid.conf
  30. echo "acl accept url_regex -i .com.sv" >> squid.conf
  31. echo "acl all src 0.0.0.0/0" >> squid.conf
  32. echo "http_access deny block" >> squid.conf
  33. echo "http_access allow ip" >> squid.conf
  34. echo "http_access allow accept" >> squid.conf
  35. echo "http_access deny all" >> squid.conf
  36.  
  37. echo "Port 443" >> /etc/ssh/sshd_config
  38.  
  39. service ssh restart
  40.  
  41. service squid restart 1> /dev/null 2>/dev/null
  42.  
  43. service squid3 restart 1> /dev/null 2>/dev/null
  44.  
  45. echo "Configurações terminadas crie um usuário e teste !"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement