Advertisement
agungggs

ipfire.sh

Mar 4th, 2015
409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. #!/usr/bin/bash
  2. OPENSSL=/usr/bin/openssl
  3. SSLDIR=/tmp/generatedCA
  4. echo
  5. echo -e "\e[95m~ SSL Bump autoconfig script ~\e[0m"
  6. echo
  7. echo -e "\e[32mMematikan web proxy jika sudah berjalan...\e[0m"
  8. squidctrl stop
  9. echo -e "\e[32mDownload config tambahan...\e[0m"
  10. wget -q http://pastebin.com/raw.php?i=QbrFLDhe -O /etc/squid/squid.conf.pre.local
  11. wget -q http://pastebin.com/raw.php?i=b1WJax37 -O /etc/squid/storeid.pl
  12. chmod +x /etc/squid/storeid.pl
  13. echo
  14. echo -e "\e[32mInitializing certificates database...\e[0m"
  15. /usr/lib/squid/ssl_crtd -c -s /var/ipfire/ssl_db
  16. chown -R squid:squid /var/ipfire/ssl_db
  17. echo -e "\e[32mCreating self-signed certificate, please provide correct information on next step...\e[0m"
  18. mkdir -p $SSLDIR || exit 1
  19. rm -rf $SSLDIR/*
  20. [ -e $SSLDIR/squid.key ] || $OPENSSL genrsa 4096 > $SSLDIR/squid.key
  21. [ -e $SSLDIR/squid.pem ] || $OPENSSL req -new -x509 -days 3650 -key $SSLDIR/squid.key -out $SSLDIR/squid.pem
  22. [ -e $SSLDIR/client.crt ] || $OPENSSL x509 -in $SSLDIR/squid.pem -outform DER -out $SSLDIR/client.crt
  23. mkdir -p /etc/squid/certs || exit 1
  24. cp $SSLDIR/squid.key /etc/squid/certs
  25. cp $SSLDIR/squid.pem /etc/squid/certs
  26. cp $SSLDIR/client.crt /srv/web/ipfire/html/
  27. echo -e "\e[31mDone! Do NOT forget to set iptables to support HTTPS interception!\e[0m"
  28. echo -e "\e[31mDouble- or triple- check your web proxy configuration before you start web proxy service!\e[0m"
  29. echo
  30. echo -e "\e[32mDownload dan install apps ccze biar log squid lebih berwarna...\e[0m"
  31. wget http://cachebox.googlecode.com/files/ipfire-ccze.tar.gz
  32. tar -zxvf ipfire-ccze.tar.gz
  33. cd ipfire-ccze
  34. ./install
  35. echo
  36. rm -rf /etc.init.d/squid
  37. wget -q http://pastebin.com/raw.php?i=e8E3nXTa -O /etc/init.d/squid
  38. chmod +x /etc/init.d/squid
  39. echo -e "\e[32mInstalasi selesai silahkan tambahkan script berikut pada squid.conf : include /etc/squid/squid.conf.pre.local\e[0m"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement