setup.sh 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. if [ "${EUID}" -ne 0 ]; then
  2. echo "You need to run this script as root"
  3. exit 1
  4. fi
  5. if [ "$(systemd-detect-virt)" == "openvz" ]; then
  6. echo "OpenVZ is not supported"
  7. exit 1
  8. fi
  9. red='\e[1;31m'
  10. green='\e[0;32m'
  11. NC='\e[0m'
  12. MYIP=$(wget -qO- icanhazip.com);
  13. echo "Checking VPS"
  14. IZIN=$( curl https://raw.githubusercontent.com/Alamyazid/Autoscript/main/ipvps | grep $MYIP )
  15. if [ $MYIP = $IZIN ]; then
  16. echo -e "${green}Permission Accepted...${NC}"
  17. else
  18. echo -e "${green}Permission Accepted...${NC}"
  19. fi
  20. mkdir /var/lib/premium-script;
  21. echo "Enter the VPS Subdomain Hostname, if not available, please click Enter"
  22. read -p "Hostname / Domain: " host
  23. echo "IP=$host" >> /var/lib/premium-script/ipvps.conf
  24. wget https://raw.githubusercontent.com/Alamyazid/Autoscript/main/ssh.sh && chmod +x ssh.sh && screen -S ssh.sh ./ssh.sh
  25. wget https://raw.githubusercontent.com/Alamyazid/Autoscript/main/websocket-python/websocket.sh && chmod +x websocket.sh && screen -S websocket.sh ./websocket.sh
  26. wget https://raw.githubusercontent.com/Alamyazid/Autoscript/main/sstp.sh && chmod +x sstp.sh && screen -S sstp ./sstp.sh
  27. wget https://raw.githubusercontent.com/Alamyazid/Autoscript/main/wg.sh && chmod +x wg.sh && screen -S wg ./wg.sh
  28. wget https://raw.githubusercontent.com/Alamyazid/Autoscript/main/ssr.sh && chmod +x ssr.sh && screen -S ssr ./ssr.sh
  29. wget https://raw.githubusercontent.com/Alamyazid/Autoscript/main/sodosok.sh && chmod +x sodosok.sh && screen -S ss ./sodosok.sh
  30. wget https://raw.githubusercontent.com/Alamyazid/Autoscript/main/ins-vt.sh && chmod +x ins-vt.sh && sed -i -e 's/\r$//' ins-vt.sh && screen -S v2ray ./ins-vt.sh
  31. wget https://raw.githubusercontent.com/Alamyazid/Autoscript/main/ipsec.sh && chmod +x ipsec.sh && screen -S ipsec ./ipsec.sh
  32. rm -f /root/ssh.sh
  33. rm -f /root/sstp.sh
  34. rm -f /root/wg.sh
  35. rm -f /root/sodosok.sh
  36. rm -f /root/ssr.sh
  37. rm -f /root/ins-vt.sh
  38. rm -f /root/go.sh
  39. rm -f /root/ipsec.sh
  40. history -c
  41. echo "1.1" > /home/ver
  42. clear
  43. echo " "
  44. echo "Installation has been completed!!"
  45. echo " "
  46. echo "=================================-Autoscript Premium-===========================" | tee -a log-install.txt
  47. echo "" | tee -a log-install.txt
  48. echo "--------------------------------------------------------------------------------" | tee -a log-install.txt
  49. echo "" | tee -a log-install.txt
  50. echo " >>> Service & Port" | tee -a log-install.txt
  51. echo " - OpenSSH : 22" | tee -a log-install.txt
  52. echo " - OpenVPN : TCP 1194, UDP 2200, SSL 992" | tee -a log-install.txt
  53. echo " - Stunnel4 : 443" | tee -a log-install.txt
  54. echo " - Dropbear : 143, 109" | tee -a log-install.txt
  55. echo " - Squid Proxy : 3128, 8080 (limit to IP Server)" | tee -a log-install.txt
  56. echo " - Badvpn : 7100, 7200, 7300" | tee -a log-install.txt
  57. echo " - Nginx : 81" | tee -a log-install.txt
  58. echo " - Wireguard : 7070" | tee -a log-install.txt
  59. echo " - L2TP/IPSEC VPN : 1701" | tee -a log-install.txt
  60. echo " - PPTP VPN : 1732" | tee -a log-install.txt
  61. echo " - SSTP VPN : 5555" | tee -a log-install.txt
  62. echo " - Shadowsocks-R : 1443-1543" | tee -a log-install.txt
  63. echo " - SS-OBFS TLS : 2443-2543" | tee -a log-install.txt
  64. echo " - SS-OBFS HTTP : 3443-3453" | tee -a log-install.txt
  65. echo " - V2RAY Vmess TLS : 4443" | tee -a log-install.txt
  66. echo " - V2RAY Vmess None TLS : 80" | tee -a log-install.txt
  67. echo " - Trojan : 6443" | tee -a log-install.txt
  68. echo "" | tee -a log-install.txt
  69. echo " >>> Server Information & Other Features" | tee -a log-install.txt
  70. echo " - Timezone : Asia/Jakarta (GMT +7)" | tee -a log-install.txt
  71. echo " - Fail2Ban : [ON]" | tee -a log-install.txt
  72. echo " - Dflate : [ON]" | tee -a log-install.txt
  73. echo " - IPtables : [ON]" | tee -a log-install.txt
  74. echo " - Auto-Reboot : [ON]" | tee -a log-install.txt
  75. echo " - IPv6 : [OFF]" | tee -a log-install.txt
  76. echo " - Autoreboot On 00.00 GMT +7" | tee -a log-install.txt
  77. echo " - Installation Log --> /root/log-install.txt" | tee -a log-install.txt
  78. echo "" | tee -a log-install.txt
  79. echo "------------------------------------------TuanYz------------------------------------------" | tee -a log-install.txt
  80. echo ""
  81. echo " Reboot 10 Sec"
  82. sleep 10
  83. reboot