From e11ba78154739b04b68fb8110dd01dd5027a2c3d Mon Sep 17 00:00:00 2001 From: Rizal Hidayat Date: Sun, 18 Jun 2017 16:06:48 +0700 Subject: [PATCH] Update debian7-32.sh --- debian7-32.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/debian7-32.sh b/debian7-32.sh index bc6bb8e..d8aaaba 100644 --- a/debian7-32.sh +++ b/debian7-32.sh @@ -168,6 +168,34 @@ cd # install fail2ban apt-get -y install fail2ban;service fail2ban restart + +# Instal DDOS Flate +if [ -d '/usr/local/ddos' ]; then + echo; echo; echo "Please un-install the previous version first" + exit 0 +else + mkdir /usr/local/ddos +fi +clear +echo; echo 'Installing DOS-Deflate 0.6'; echo +echo; echo -n 'Downloading source files...' +wget -q -O /usr/local/ddos/ddos.conf http://www.inetbase.com/scripts/ddos/ddos.conf +echo -n '.' +wget -q -O /usr/local/ddos/LICENSE http://www.inetbase.com/scripts/ddos/LICENSE +echo -n '.' +wget -q -O /usr/local/ddos/ignore.ip.list http://www.inetbase.com/scripts/ddos/ignore.ip.list +echo -n '.' +wget -q -O /usr/local/ddos/ddos.sh http://www.inetbase.com/scripts/ddos/ddos.sh +chmod 0755 /usr/local/ddos/ddos.sh +cp -s /usr/local/ddos/ddos.sh /usr/local/sbin/ddos +echo '...done' +echo; echo -n 'Creating cron to run script every minute.....(Default setting)' +/usr/local/ddos/ddos.sh --cron > /dev/null 2>&1 +echo '.....done' +echo; echo 'Installation has completed.' +echo 'Config file is at /usr/local/ddos/ddos.conf' +echo 'Please send in your comments and/or suggestions to zaf@vsnl.com' + #install squid3 apt-get -y install squid3 wget -O /etc/squid3/squid.conf "https://raw.githubusercontent.com/rizal180499/Auto-Installer-VPS/master/conf/squid3.conf" @@ -191,6 +219,21 @@ wget "https://raw.githubusercontent.com/rizal180499/Auto-Installer-VPS/master/co wget "https://raw.githubusercontent.com/rizal180499/Auto-Installer-VPS/master/conf/user-list" wget "https://raw.githubusercontent.com/rizal180499/Auto-Installer-VPS/master/conf/menu" +#Blockir Torrent +iptables -A OUTPUT -p tcp --dport 6881:6889 -j DROP +iptables -A OUTPUT -p udp --dport 1024:65534 -j DROP +iptables -A FORWARD -m string --string "get_peers" --algo bm -j DROP +iptables -A FORWARD -m string --string "announce_peer" --algo bm -j DROP +iptables -A FORWARD -m string --string "find_node" --algo bm -j DROP +iptables -A FORWARD -m string --algo bm --string "BitTorrent" -j DROP +iptables -A FORWARD -m string --algo bm --string "BitTorrent protocol" -j DROP +iptables -A FORWARD -m string --algo bm --string "peer_id=" -j DROP +iptables -A FORWARD -m string --algo bm --string ".torrent" -j DROP +iptables -A FORWARD -m string --algo bm --string "announce.php?passkey=" -j DROP +iptables -A FORWARD -m string --algo bm --string "torrent" -j DROP +iptables -A FORWARD -m string --algo bm --string "announce" -j DROP +iptables -A FORWARD -m string --algo bm --string "info_hash" -j DROP + # finalisasi chown -R www-data:www-data /home/vps/public_html service nginx start