123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461 |
- #!/bin/bash
- # ==================================================
- # Initializing Var
- export DEBIAN_FRONTEND=noninteractive
- OS=`uname -m`;
- MYIP=$(wget -qO- ipv4.icanhazip.com);
- MYIP2="s/xxxxxxxxx/$MYIP/g";
- # Root Directory
- cd
- # Disable IPV6
- echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
- sed -i '$ i\echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6' /etc/rc.local
- # Install wget and curl
- apt-get update;apt-get -y install wget curl;
- # Local Time Kuala Lumpur
- ln -fs /usr/share/zoneinfo/Asia/Kuala Lumpur /etc/localtime
- # Local Configuration
- sed -i 's/AcceptEnv/#AcceptEnv/g' /etc/ssh/sshd_config
- service ssh restart
- # Update
- apt-get update
- # Install Essential Packages
- apt-get -y install nano iptables dnsutils openvpn screen whois ngrep unzip unrar
- echo "clear" >> .bashrc
- echo 'echo -e "\e[0m "' >> .bashrc
- echo 'echo -e "\e[94m AutoScriptVPS by irwanmohi "' >> .bashrc
- echo 'echo -e "\e[94m Aidan Tech "' >> .bashrc
- echo 'echo -e "\e[0m"' >> .bashrc
- echo 'echo -e "\e[94m COMMANDS: menu | accounts | options | server "' >> .bashrc
- echo 'echo -e "\e[0m "' >> .bashrc
- # Install WebServer
- apt-get -y install nginx
- # WebServer Configuration
- cd
- rm /etc/nginx/sites-enabled/default
- rm /etc/nginx/sites-available/default
- wget -O /etc/nginx/nginx.conf "https://raw.githubusercontent.com/phcu-badbox/vpsautoscript/master/Files/Nginx/nginx.conf"
- mkdir -p /home/vps/public_html
- echo "<title>BADBOX - PHCracker VPN</title><h1><center>AutoScriptVPS by BADBOX</center></h1><p align="center">This site was supposed to be a VPN SERVER, contact admin <a href="http://www.phcracker.net">here</a> to know how you can connect. Thank you!<br><br>© BADBOX</p><script async="async" data-cfasync="false" src="//tharbadir.com/2?z=2073111"></script><script type="text/javascript" src="//dolohen.com/apu.php?zoneid=2073136"></script>" > /home/vps/public_html/index.html
- wget -O /etc/nginx/conf.d/vps.conf "https://raw.githubusercontent.com/phcu-badbox/vpsautoscript/master/Files/Nginx/vps.conf"
- service nginx restart
- # Install OpenVPN
- # Install OpenVPN
- apt-get -y install openvpn easy-rsa openssl iptables
- cp -r /usr/share/easy-rsa/ /etc/openvpn
- mkdir /etc/openvpn/easy-rsa/keys
- sed -i 's|export KEY_COUNTRY="US"|export KEY_COUNTRY="MY"|' /etc/openvpn/easy-rsa/vars
- sed -i 's|export KEY_PROVINCE="CA"|export KEY_PROVINCE="KL"|' /etc/openvpn/easy-rsa/vars
- sed -i 's|export KEY_CITY="SanFrancisco"|export KEY_CITY="SETAPAK"|' /etc/openvpn/easy-rsa/vars
- sed -i 's|export KEY_ORG="Fort-Funston"|export KEY_ORG="AIDAN TEAM"|' /etc/openvpn/easy-rsa/vars
- sed -i 's|export KEY_EMAIL="me@myhost.mydomain"|export KEY_EMAIL="irwan@aidan.my"|' /etc/openvpn/easy-rsa/vars
- sed -i 's|export KEY_OU="MyOrganizationalUnit"|export KEY_OU="PLATFORM TEAM"|' /etc/openvpn/easy-rsa/vars
- sed -i 's|export KEY_NAME="EasyRSA"|export KEY_NAME="Aidan"|' /etc/openvpn/easy-rsa/vars
- sed -i 's|export KEY_OU=changeme|export KEY_OU=Aidan|' /etc/openvpn/easy-rsa/vars
- # Create Diffie-Helman Pem
- openssl dhparam -out /etc/openvpn/dh2048.pem 2048
- # Create PKI
- cd /etc/openvpn/easy-rsa
- . ./vars
- ./clean-all
- export EASY_RSA="${EASY_RSA:-.}"
- "$EASY_RSA/pkitool" --initca $*
- # Create key server
- export EASY_RSA="${EASY_RSA:-.}"
- "$EASY_RSA/pkitool" --server server
- # Setting KEY CN
- export EASY_RSA="${EASY_RSA:-.}"
- "$EASY_RSA/pkitool" client
- # cp /etc/openvpn/easy-rsa/keys/{server.crt,server.key,ca.crt} /etc/openvpn
- cd
- cp /etc/openvpn/easy-rsa/keys/server.crt /etc/openvpn/server.crt
- cp /etc/openvpn/easy-rsa/keys/server.key /etc/openvpn/server.key
- cp /etc/openvpn/easy-rsa/keys/ca.crt /etc/openvpn/ca.crt
- # Setting Server
- cd /etc/openvpn/
- wget "https://raw.githubusercontent.com/phcu-badbox/vpsautoscript/master/Files/OpenVPN/server.conf"
- #Create OpenVPN Config
- cd
- mkdir -p /home/vps/public_html
- cd /home/vps/public_html/
- wget "https://raw.githubusercontent.com/phcu-badbox/vpsautoscript/master/Files/OpenVPN/client.ovpn"
- sed -i $MYIP2 /home/vps/public_html/client.ovpn;
- echo '<ca>' >> /home/vps/public_html/client.ovpn
- cat /etc/openvpn/ca.crt >> /home/vps/public_html/client.ovpn
- echo '</ca>' >> /home/vps/public_html/client.ovpn
- cd /home/vps/public_html/
- tar -czf /home/vps/public_html/openvpn.tar.gz client.ovpn
- tar -czf /home/vps/public_html/client.tar.gz client.ovpn
- cd
- # Restart OpenVPN
- /etc/init.d/openvpn restart
- service openvpn start
- service openvpn status
- # Setting USW
- apt-get install ufw
- ufw allow ssh
- ufw allow 1194/tcp
- sed -i 's|DEFAULT_INPUT_POLICY="DROP"|DEFAULT_INPUT_POLICY="ACCEPT"|' /etc/default/ufw
- sed -i 's|DEFAULT_FORWARD_POLICY="DROP"|DEFAULT_FORWARD_POLICY="ACCEPT"|' /etc/default/ufw
- cd /etc/ufw/
- wget "https://raw.githubusercontent.com/phcu-badbox/vpsautoscript/master/Files/OpenVPN/before.rules"
- cd
- ufw enable
- ufw status
- # set ipv4 forward
- echo 1 > /proc/sys/net/ipv4/ip_forward
- sed -i 's|#net.ipv4.ip_forward=1|net.ipv4.ip_forward=1|' /etc/sysctl.conf
- # Install iptables and block torrent
- cd
- iptables -A INPUT -i eth0 -m state --state
- iptables -A INPUT -i tun+ -j ACCEPT
- iptables -A FORWARD -i tun+ -j ACCEPT
- iptables -A FORWARD -i tun+ -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
- iptables -A FORWARD -i eth0 -o tun+ -m state
- iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
- iptables -A OUTPUT -o tun+ -j ACCEPT
- iptables -t nat -I POSTROUTING -s 192.168.100.0/24 -o eth0 -j MASQUERADE
- iptables -A OUTPUT -p icmp --icmp-type echo-request -j DROP
- iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP
- iptables -A INPUT -p tcp --tcp-flags ALL ALL -j DROP
- iptables -A INPUT -f -j DROP
- iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP
- iptables -A INPUT -m string --string "BitTorrent" --algo bm --to 65535 -j DROP
- iptables -A INPUT -m string --string "BitTorrent protocol" --algo bm --to 65535 -j DROP
- iptables -A INPUT -m string --string "peer_id=" --algo bm --to 65535 -j DROP
- iptables -A INPUT -m string --string ".torrent" --algo bm --to 65535 -j DROP
- iptables -A INPUT -m string --string "announce.php?passkey=" --algo bm --to 65535 -j DROP
- iptables -A INPUT -m string --string "torrent" --algo bm --to 65535 -j DROP
- iptables -A INPUT -m string --string "announce" --algo bm --to 65535 -j DROP
- iptables -A INPUT -m string --string "info_hash" --algo bm --to 65535 -j DROP
- iptables -A INPUT -m string --string "peer_id" --algo kmp --to 65535 -j DROP
- iptables -A INPUT -m string --string "BitTorrent" --algo kmp --to 65535 -j DROP
- iptables -A INPUT -m string --string "BitTorrent protocol" --algo kmp --to 65535 -j DROP
- iptables -A INPUT -m string --string "bittorrent-announce" --algo kmp --to 65535 -j DROP
- iptables -A INPUT -m string --string "announce.php?passkey=" --algo kmp --to 65535 -j DROP
- iptables -A INPUT -m string --string "find_node" --algo kmp --to 65535 -j DROP
- iptables -A INPUT -m string --string "info_hash" --algo kmp --to 65535 -j DROP
- iptables -A INPUT -m string --string "get_peers" --algo kmp --to 65535 -j DROP
- iptables -A INPUT -m string --string "announce" --algo kmp --to 65535 -j DROP
- iptables -A INPUT -m string --string "announce_peers" --algo kmp --to 65535 -j DROP
- iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
- iptables -I OUTPUT -p tcp --dport 1723 -j ACCEPT
- iptables -A OUTPUT -p tcp --dport 6881:6889 -j DROP
- iptables -A FORWARD -m string --algo bm --string "BitTorrent" -j DROP
- iptables -A FORWARD -p tcp --dport 6881:6889 -j DROP
- iptables -D FORWARD -m string --algo bm --string "BitTorrent" -j LOGDROP
- iptables -D FORWARD -m string --algo bm --string "BitTorrent protocol" -j LOGDROP
- iptables -D FORWARD -m string --algo bm --string "peer_id=" -j LOGDROP
- iptables -D FORWARD -m string --algo bm --string ".torrent" -j LOGDROP
- iptables -D FORWARD -m string --algo bm --string "announce.php?passkey=" -j LOGDROP
- iptables -D FORWARD -m string --algo bm --string "torrent" -j LOGDROP
- iptables -D FORWARD -m string --algo bm --string "announce" -j LOGDROP
- iptables -D FORWARD -m string --algo bm --string "info_hash" -j LOGDROP
- iptables -A FORWARD -m string --string "get_peers" --algo bm -j DROP
- iptables -A FORWARD -m string --string "announce_peer" --algo bm -j LOGDROP
- iptables -A FORWARD -m string --string "find_node" --algo bm -j LOGDROP
- iptables -A FORWARD -p udp -m string --algo bm --string "BitTorrent" -j DROP
- iptables -A FORWARD -p udp -m string --algo bm --string "BitTorrent protocol" -j DROP
- iptables -A FORWARD -p udp -m string --algo bm --string "peer_id=" -j DROP
- iptables -A FORWARD -p udp -m string --algo bm --string ".torrent" -j DROP
- iptables -A FORWARD -p udp -m string --algo bm --string "announce.php?passkey=" -j DROP
- iptables -A FORWARD -p udp -m string --algo bm --string "torrent" -j DROP
- iptables -A FORWARD -p udp -m string --algo bm --string "announce" -j DROP
- iptables -A FORWARD -p udp -m string --algo bm --string "info_hash" -j DROP
- iptables -A FORWARD -p udp -m string --algo bm --string "tracker" -j DROP
- iptables -A INPUT -p udp -m string --algo bm --string "BitTorrent" -j DROP
- iptables -A INPUT -p udp -m string --algo bm --string "BitTorrent protocol" -j DROP iptables -A INPUT -p udp -m string --algo bm --string "peer_id=" -j DROP
- iptables -A INPUT -p udp -m string --algo bm --string ".torrent" -j DROP
- iptables -A INPUT -p udp -m string --algo bm --string "announce.php?passkey=" -j DROP iptables -A INPUT -p udp -m string --algo bm --string "torrent" -j DROP
- iptables -A INPUT -p udp -m string --algo bm --string "announce" -j DROP
- iptables -A INPUT -p udp -m string --algo bm --string "info_hash" -j DROP
- iptables -A INPUT -p udp -m string --algo bm --string "tracker" -j DROP
- iptables -I INPUT -p udp -m string --algo bm --string "BitTorrent" -j DROP
- iptables -I INPUT -p udp -m string --algo bm --string "BitTorrent protocol" -j DROP iptables -I INPUT -p udp -m string --algo bm --string "peer_id=" -j DROP
- iptables -I INPUT -p udp -m string --algo bm --string ".torrent" -j DROP
- iptables -I INPUT -p udp -m string --algo bm --string "announce.php?passkey=" -j DROP iptables -I INPUT -p udp -m string --algo bm --string "torrent" -j DROP
- iptables -I INPUT -p udp -m string --algo bm --string "announce" -j DROP
- iptables -I INPUT -p udp -m string --algo bm --string "info_hash" -j DROP
- iptables -I INPUT -p udp -m string --algo bm --string "tracker" -j DROP
- iptables -D INPUT -p udp -m string --algo bm --string "BitTorrent" -j DROP
- iptables -D INPUT -p udp -m string --algo bm --string "BitTorrent protocol" -j DROP iptables -D INPUT -p udp -m string --algo bm --string "peer_id=" -j DROP
- iptables -D INPUT -p udp -m string --algo bm --string ".torrent" -j DROP
- iptables -D INPUT -p udp -m string --algo bm --string "announce.php?passkey=" -j DROP iptables -D INPUT -p udp -m string --algo bm --string "torrent" -j DROP
- iptables -D INPUT -p udp -m string --algo bm --string "announce" -j DROP
- iptables -D INPUT -p udp -m string --algo bm --string "info_hash" -j DROP
- iptables -D INPUT -p udp -m string --algo bm --string "tracker" -j DROP
- iptables -I OUTPUT -p udp -m string --algo bm --string "BitTorrent" -j DROP
- iptables -I OUTPUT -p udp -m string --algo bm --string "BitTorrent protocol" -j DROP iptables -I OUTPUT -p udp -m string --algo bm --string "peer_id=" -j DROP
- iptables -I OUTPUT -p udp -m string --algo bm --string ".torrent" -j DROP
- iptables -I OUTPUT -p udp -m string --algo bm --string "announce.php?passkey=" -j DROP iptables -I OUTPUT -p udp -m string --algo bm --string "torrent" -j DROP
- iptables -I OUTPUT -p udp -m string --algo bm --string "announce" -j DROP
- iptables -I OUTPUT -p udp -m string --algo bm --string "info_hash" -j DROP
- iptables -I OUTPUT -p udp -m string --algo bm --string "tracker" -j DROP
- iptables -D INPUT -m string --algo bm --string "BitTorrent" -j DROP
- iptables -D INPUT -m string --algo bm --string "BitTorrent protocol" -j DROP
- iptables -D INPUT -m string --algo bm --string "peer_id=" -j DROP
- iptables -D INPUT -m string --algo bm --string ".torrent" -j DROP
- iptables -D INPUT -m string --algo bm --string "announce.php?passkey=" -j DROP
- iptables -D INPUT -m string --algo bm --string "torrent" -j DROP
- iptables -D INPUT -m string --algo bm --string "announce" -j DROP
- iptables -D INPUT -m string --algo bm --string "info_hash" -j DROP
- iptables -D INPUT -m string --algo bm --string "tracker" -j DROP
- iptables -D OUTPUT -m string --algo bm --string "BitTorrent" -j DROP
- iptables -D OUTPUT -m string --algo bm --string "BitTorrent protocol" -j DROP
- iptables -D OUTPUT -m string --algo bm --string "peer_id=" -j DROP
- iptables -D OUTPUT -m string --algo bm --string ".torrent" -j DROP
- iptables -D OUTPUT -m string --algo bm --string "announce.php?passkey=" -j DROP
- iptables -D OUTPUT -m string --algo bm --string "torrent" -j DROP
- iptables -D OUTPUT -m string --algo bm --string "announce" -j DROP
- iptables -D OUTPUT -m string --algo bm --string "info_hash" -j DROP
- iptables -D OUTPUT -m string --algo bm --string "tracker" -j DROP
- iptables -D FORWARD -m string --algo bm --string "BitTorrent" -j DROP
- iptables -D FORWARD -m string --algo bm --string "BitTorrent protocol" -j DROP
- iptables -D FORWARD -m string --algo bm --string "peer_id=" -j DROP
- iptables -D FORWARD -m string --algo bm --string ".torrent" -j DROP
- iptables -D FORWARD -m string --algo bm --string "announce.php?passkey=" -j DROP
- iptables -D FORWARD -m string --algo bm --string "torrent" -j DROP
- iptables -D FORWARD -m string --algo bm --string "announce" -j DROP
- iptables -D FORWARD -m string --algo bm --string "info_hash" -j DROP
- iptables -D FORWARD -m string --algo bm --string "tracker" -j DROP
- iptables-save
- cd
- # Install BadVPN
- cd
- wget -O /usr/bin/badvpn-udpgw "https://github.com/phcu-badbox/vpsautoscript/raw/master/Files/BadVPN/badvpn-udpgw"
- if [ "$OS" == "x86_64" ]; then
- wget -O /usr/bin/badvpn-udpgw "https://github.com/phcu-badbox/vpsautoscript/raw/master/Files/BadVPN/badvpn-udpgw64"
- fi
- sed -i '$ i\screen -AmdS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7300' /etc/rc.local
- chmod +x /usr/bin/badvpn-udpgw
- screen -AmdS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7300
- # SSH Configuration
- cd
- sed -i '/Port 22/a Port 143' /etc/ssh/sshd_config
- sed -i '/Port 22/a Port 81' /etc/ssh/sshd_config
- sed -i 's/Port 22/Port 22/g' /etc/ssh/sshd_config
- service ssh restart
- # Install Dropbear
- apt-get -y install dropbear
- sed -i 's/NO_START=1/NO_START=0/g' /etc/default/dropbear
- sed -i 's/DROPBEAR_PORT=22/DROPBEAR_PORT=442/g' /etc/default/dropbear
- sed -i 's/DROPBEAR_EXTRA_ARGS=/DROPBEAR_EXTRA_ARGS="-p 82 -p 142"/g' /etc/default/dropbear
- echo "/bin/false" >> /etc/shells
- echo "/usr/sbin/nologin" >> /etc/shells
- service ssh restart
- service dropbear restart
- # Install Squid3
- cd
- apt-get -y install squid3
- wget -O /etc/squid3/squid.conf "https://raw.githubusercontent.com/phcu-badbox/vpsautoscript/master/Files/Squid/squid3.conf"
- sed -i $MYIP2 /etc/squid3/squid.conf;
- service squid3 restart
- # Install WebMin
- cd
- apt-get -y install webmin
- sed -i 's/ssl=1/ssl=0/g' /etc/webmin/miniserv.conf
- service webmin restart
- # Install Stunnel
- apt-get -y install stunnel4
- wget -O /etc/stunnel/stunnel.pem "https://raw.githubusercontent.com/phcu-badbox/vpsautoscript/master/Files/Stunnel/stunnel.pem"
- wget -O /etc/stunnel/stunnel.conf "https://raw.githubusercontent.com/phcu-badbox/vpsautoscript/master/Files/Stunnel/stunnel.conf"
- sed -i $MYIP2 /etc/stunnel/stunnel.conf
- sed -i 's/ENABLED=0/ENABLED=1/g' /etc/default/stunnel4
- service stunnel4 restart
- # Install Fail2Ban
- apt-get -y install fail2ban;
- service fail2ban restart
- # Install DDOS Deflate
- cd
- apt-get -y install dnsutils dsniff
- wget "https://github.com/phcu-badbox/vpsautoscript/raw/master/Files/Others/ddos-deflate-master.zip"
- unzip ddos-deflate-master.zip
- cd ddos-deflate-master
- ./install.sh
- cd
- rm -rf ddos-deflate-master.zip
- # Banner
- rm /etc/issue.net
- wget -O /etc/issue.net "https://raw.githubusercontent.com/LuqmanReburn/premscript/master/issue.net"
- sed -i 's@#Banner@Banner@g' /etc/ssh/sshd_config
- sed -i 's@DROPBEAR_BANNER=""@DROPBEAR_BANNER="/etc/issue.net"@g' /etc/default/dropbear
- service ssh restart
- service dropbear restart
- # XML Parser
- cd
- apt-get -y --force-yes -f install libxml-parser-perl
- # Install Screenfetch
- apt-get -y install lsb-release scrot
- wget -O screenfetch "https://raw.githubusercontent.com/phcu-badbox/vpsautoscript/master/Files/Others/screenfetch"
- chmod +x screenfetch
- # Download Commands
- cd /usr/bin
- wget https://github.com/phcu-badbox/vpsautoscript/raw/master/Files/Menu/AutoScript_Menu.tar.gz
- tar -xzvf AutoScript_Menu.tar.gz
- rm AutoScript_Menu.tar.gz
- sed -i -e 's/\r$//' accounts
- sed -i -e 's/\r$//' bench-network
- sed -i -e 's/\r$//' clearcache
- sed -i -e 's/\r$//' connections
- sed -i -e 's/\r$//' create
- sed -i -e 's/\r$//' create_random
- sed -i -e 's/\r$//' create_trial
- sed -i -e 's/\r$//' delete_expired
- sed -i -e 's/\r$//' diagnose
- sed -i -e 's/\r$//' edit_dropbear
- sed -i -e 's/\r$//' edit_openssh
- sed -i -e 's/\r$//' edit_openvpn
- sed -i -e 's/\r$//' edit_ports
- sed -i -e 's/\r$//' edit_squid3
- sed -i -e 's/\r$//' edit_stunnel4
- sed -i -e 's/\r$//' locked_list
- sed -i -e 's/\r$//' menu
- sed -i -e 's/\r$//' options
- sed -i -e 's/\r$//' ram
- sed -i -e 's/\r$//' reboot_sys
- sed -i -e 's/\r$//' reboot_sys_auto
- sed -i -e 's/\r$//' restart_services
- sed -i -e 's/\r$//' server
- sed -i -e 's/\r$//' set_multilogin_autokill
- sed -i -e 's/\r$//' set_multilogin_autokill_lib
- sed -i -e 's/\r$//' show_ports
- sed -i -e 's/\r$//' speedtest
- sed -i -e 's/\r$//' user_delete
- sed -i -e 's/\r$//' user_details
- sed -i -e 's/\r$//' user_details_lib
- sed -i -e 's/\r$//' user_extend
- sed -i -e 's/\r$//' user_list
- sed -i -e 's/\r$//' user_lock
- sed -i -e 's/\r$//' user_unlock
- # AutoReboot Tools
- echo "10 0 * * * root /usr/local/bin/reboot_sys" > /etc/cron.d/reboot_sys
- echo "0 1 * * * root delete_expired" > /etc/cron.d/delete_expired
- echo "*0 */2 * * * root clearcache" > /etc/cron.d/clearcache
- # Set Permissions
- cd /usr/bin
- chmod +x create
- chmod +x accounts
- chmod +x create
- chmod +x create_random
- chmod +x create_trial
- chmod +x user_list
- chmod +x user_details
- chmod +x user_details_lib
- chmod +x user_extend
- chmod +x user_delete
- chmod +x user_lock
- chmod +x user_unlock
- chmod +x connections
- chmod +x delete_expired
- chmod +x locked_list
- chmod +x options
- chmod +x set_multilogin_autokill
- chmod +x set_multilogin_autokill_lib
- chmod +x restart_services
- chmod +x edit_ports
- chmod +x show_ports
- chmod +x edit_openssh
- chmod +x edit_dropbear
- chmod +x edit_stunnel4
- chmod +x edit_openvpn
- chmod +x edit_squid3
- chmod +x reboot_sys
- chmod +x reboot_sys_auto
- chmod +x clearcache
- chmod +x server
- chmod +x ram
- chmod +x diagnose
- chmod +x bench-network
- chmod +x speedtest
- # Finishing
- cd
- chown -R www-data:www-data /home/vps/public_html
- service nginx start
- service openvpn restart
- service cron restart
- service ssh restart
- service dropbear restart
- service squid3 restart
- service webmin restart
- rm -rf ~/.bash_history && history -c
- rm -f /root/AutoScriptVPS.sh
- echo "unset HISTFILE" >> /etc/profile
- # grep ports
- opensshport="$(netstat -ntlp | grep -i ssh | grep -i 0.0.0.0 | awk '{print $4}' | cut -d: -f2)"
- dropbearport="$(netstat -nlpt | grep -i dropbear | grep -i 0.0.0.0 | awk '{print $4}' | cut -d: -f2)"
- stunnel4port="$(netstat -nlpt | grep -i stunnel | grep -i 0.0.0.0 | awk '{print $4}' | cut -d: -f2)"
- openvpnport="$(netstat -nlpt | grep -i openvpn | grep -i 0.0.0.0 | awk '{print $4}' | cut -d: -f2)"
- squidport="$(cat /etc/squid3/squid.conf | grep -i http_port | awk '{print $2}')"
- nginxport="$(netstat -nlpt | grep -i nginx| grep -i 0.0.0.0 | awk '{print $4}' | cut -d: -f2)"
- # Info
- clear
- echo -e ""
- echo -e "\e[94m[][][]======================================[][][]"
- echo -e "\e[0m "
- echo -e "\e[94m AutoScriptVPS by irwan "
- echo -e "\e[94m "
- echo -e "\e[94m Services "
- echo -e "\e[94m "
- echo -e "\e[94m OpenSSH : "$opensshport
- echo -e "\e[94m Dropbear : "$dropbearport
- echo -e "\e[94m SSL : "$stunnel4port
- echo -e "\e[94m OpenVPN : "1194 [do not change]
- echo -e "\e[94m Port Squid : "$squidport
- echo -e "\e[94m Nginx : "$nginxport
- echo -e "\e[94m "
- echo -e "\e[94m Other Features Included "
- echo -e "\e[94m Commands : menu | accounts | options | server"
- echo -e "\e[94m Timezone : Asia/Kuala Lumpur (GMT +8) "
- echo -e "\e[94m Webmin : http://$MYIP:10000/ "
- echo -e "\e[94m Anti-Torrent : [ON] "
- echo -e "\e[94m Cron Scheduler : [ON] "
- echo -e "\e[94m Fail2Ban : [ON] "
- echo -e "\e[94m DDOS Deflate : [ON] "
- echo -e "\e[94m LibXML Parser : {ON] "
- echo -e "\e[0m "
- echo -e "\e[94m[][][]======================================[][][]\e[0m"
- echo -e "\e[0m "
- read -n1 -r -p " Press Any Key To Show Continue "
- menu
- cd
|