Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/bash
- OPENSSL=/usr/bin/openssl
- SSLDIR=/tmp/generatedCA
- echo
- echo -e "\e[95m~ SSL Bump autoconfig script ~\e[0m"
- echo
- echo -e "\e[32mMematikan web proxy jika sudah berjalan...\e[0m"
- squidctrl stop
- echo -e "\e[32mDownload config tambahan...\e[0m"
- wget -q http://pastebin.com/raw.php?i=QbrFLDhe -O /etc/squid/squid.conf.pre.local
- wget -q http://pastebin.com/raw.php?i=b1WJax37 -O /etc/squid/storeid.pl
- chmod +x /etc/squid/storeid.pl
- echo
- echo -e "\e[32mInitializing certificates database...\e[0m"
- /usr/lib/squid/ssl_crtd -c -s /var/ipfire/ssl_db
- chown -R squid:squid /var/ipfire/ssl_db
- echo -e "\e[32mCreating self-signed certificate, please provide correct information on next step...\e[0m"
- mkdir -p $SSLDIR || exit 1
- rm -rf $SSLDIR/*
- [ -e $SSLDIR/squid.key ] || $OPENSSL genrsa 4096 > $SSLDIR/squid.key
- [ -e $SSLDIR/squid.pem ] || $OPENSSL req -new -x509 -days 3650 -key $SSLDIR/squid.key -out $SSLDIR/squid.pem
- [ -e $SSLDIR/client.crt ] || $OPENSSL x509 -in $SSLDIR/squid.pem -outform DER -out $SSLDIR/client.crt
- mkdir -p /etc/squid/certs || exit 1
- cp $SSLDIR/squid.key /etc/squid/certs
- cp $SSLDIR/squid.pem /etc/squid/certs
- cp $SSLDIR/client.crt /srv/web/ipfire/html/
- echo -e "\e[31mDone! Do NOT forget to set iptables to support HTTPS interception!\e[0m"
- echo -e "\e[31mDouble- or triple- check your web proxy configuration before you start web proxy service!\e[0m"
- echo
- echo -e "\e[32mDownload dan install apps ccze biar log squid lebih berwarna...\e[0m"
- wget http://cachebox.googlecode.com/files/ipfire-ccze.tar.gz
- tar -zxvf ipfire-ccze.tar.gz
- cd ipfire-ccze
- ./install
- echo
- rm -rf /etc.init.d/squid
- wget -q http://pastebin.com/raw.php?i=e8E3nXTa -O /etc/init.d/squid
- chmod +x /etc/init.d/squid
- 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