Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ############################################################################################################################
- # Author : Decorous @ Hackforums.net (https://hackforums.net/member.php?action=profile&uid=3360107)
- # Description : A Squid3 proxy server installer using username & password based authentication with no logging for Ubuntu
- # Usage : Save this file as SPSI then run : bash SPSI [port] [username] [password] (ex: bash SPSI 1337 foo bar)
- ############################################################################################################################
- if [ "$#" -ne 3 ]; then
- exit 1
- fi
- clear
- echo "============================================="
- echo "Squid 3 Proxy Server Installer"
- echo "============================================="
- IP=$(curl -s http://ident.me |cut -d " " -f 5)
- PORT=$1
- USERNAME=$2
- PASSWORD=$3
- sleep 5
- echo "Updating system ..."
- sudo apt-get -y update &> /dev/null
- echo "Installing Squid3 ..."
- sudo apt-get -y install apache2-utils squid3 &> /dev/null
- echo "Configuring username & password ..."
- sudo htpasswd -b -c /etc/squid3/passwd $USERNAME $PASSWORD &> /dev/null
- echo "Copying original Squid3 config file ..."
- sudo mv /etc/squid3/squid.conf /etc/squid3/squid.conf.sample
- echo "Downloading custom Squid3 config file ..."
- sudo wget --no-check-certificate -O /etc/squid3/squid.conf http://pastebin.com/raw/cm2vSJzs &> /dev/null
- echo "http_port $PORT" | cat - /etc/squid3/squid.conf > tmp && mv tmp /etc/squid3/squid.conf
- sudo cp /etc/init/squid3.conf /etc/init.d/squid3
- echo "Creating domain BlackList file ..."
- sudo touch /etc/squid3/blacklist.acl
- echo "Starting Squid3 service ..."
- sudo service squid3 restart &> /dev/null
- echo "Enabling Squid3 as a service ..."
- sudo update-rc.d squid3 defaults &> /dev/null
- echo "Allowing port in IPTables ..."
- sudo iptables -I INPUT -p tcp --dport $PORT -j ACCEPT &> /dev/null
- echo "Saving IPTables ..."
- sudo iptables-save &> /dev/null
- echo "Done!"
- echo "============================================="
- echo "IP : $IP"
- echo "Port : $PORT"
- echo "Username : $USERNAME"
- echo "Password : $PASSWORD"
- echo "============================================="
- echo "Happy browsing! :)"
- echo "============================================="
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement