Advertisement
Guest User

LinkWeb

a guest
Jun 28th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.46 KB | None | 0 0
  1. #!/bin/bash
  2. clear
  3. # (1=vermelho; 2=verde; 3=amarelo; 4=azul; 5=roxo; 6=azul claro; 7=branco; 9=limpa)
  4. tput setaf 7 ; tput setab 4 ; tput bold ; printf '%35s%s%-20s\n' " ManagerManimEdicoes Telegram @FranciscoManim " ; tput sgr0
  5. tput setaf 3 ; tput bold ; echo " Debian, Ubuntu e CentOS (32|64 bits), Este script irá: " ; echo ""
  6. echo "● Instalar e configurar o PROXY SQUID nas portas 80 8080 8799 e 3128"
  7. echo "● Instalar o LOGINSEGURO para proteger o VPS em 100%"
  8. echo "● Configurar autolimpeza do squid cache mantendo-o rápido"
  9. echo "● Instalar 'log de acesso' de sites visitados pelos usuários"
  10. echo "● Bloquear: TORRENT e proteger contra ataques Ddos, Syn, ..."
  11. echo "● Liberar: Youtube HD, NetFlix BR, Áudio e VideoChamada em Redes Sociais"
  12. echo "● Instalar Banner e vários comandos para o gerenciamento do VPS" ; tput sgr0
  13. IP=$(wget -qO- ipv4.icanhazip.com)
  14. read -p "Confirme se este IP é do seu servidor: " -e -i $IP ipdovps
  15. if [ -z "$ipdovps" ]
  16. then
  17. tput setaf 7 ; tput setab 1 ; tput bold ; echo "" ; echo " IP deste servidor está errado. Tente novamente. " ; echo "" ; tput sgr0
  18. exit 1
  19. fi
  20. if [ -f "/root/usuarios.db" ]
  21. then
  22. tput setaf 5 ; tput bold ; echo ""
  23. echo " Uma Base de Dados de Usuários ('usuarios.db') foi encontrada!"
  24. echo " Deseja mantê-la (mantendo o limite de conexões de usuários nesta base de dados)"
  25. echo " ou criar uma nova base de dados do ZERO?"
  26. tput setaf 6 ; tput bold ; echo ""
  27. echo "[1] Manter 'Base de Dados' Atual, ela não sofrerá mudanças."
  28. echo "[2] Criar uma Nova 'Base de Dados', refaz o arquivo do zero."
  29. echo "" ; tput sgr0
  30. read -p " Opção?: " -e -i 1 optiondb
  31. else
  32. awk -F : '$3 >= 500 { print $1 " 1" }' /etc/passwd | grep -v '^nobody' > /root/usuarios.db
  33. fi
  34. echo ""
  35. read -p " Ativar a 'compressão SSH' (pode usar mais memória RAM)? [s/n]) " -e -i n sshcompression
  36. tput setaf 7 ; tput setab 4 ; tput bold ; echo "" ; echo " Aguarde a configuração automática do seu VPS " ; tput sgr0
  37. sleep 3
  38. apt-get update -y
  39. yum update -y
  40. apt-get install iptables -y
  41. yum install iptables -y
  42. rm -r /bin/banner /bin/firewallsafe /bin/firewallblok /bin/log /bin/midiablok /bin/midiasafe /bin/relogio /bin/sitesafe /bin/siteblok /bin/badvpn /bin/expirados /bin/latencia /bin/sistema /bin/listar /bin/expcleaner /bin/apagar /bin/criar /bin/criarusuario /bin/ajuda /bin/apps /bin/payloads /bin/delhost /bin/addhost /bin/detalhes /bin/limitador /bin/sshlimiter /bin/limpar /bin/monitor /bin/monitorar /bin/mudardata /bin/mudarlimite /bin/mudarsenha /bin/velocidade /bin/velocimetro /bin/velocimetro.py > /dev/null
  43. rm -r /root/ExpCleaner.sh /root/CriarUsuario.sh /root/sshlimiter.sh > /dev/null
  44. apt-get purge dropbear -y
  45. apt-get autoremove dropbear -y
  46. yum purge dropbear -y
  47. rm -r /etc/dropbear
  48. apt-get install squid3 bc screen nano unzip dos2unix wget -y
  49. yum install squid bc screen nano unzip dos2unix wget -y
  50. wget ftp://cathbard.com/binary/inxi*.deb
  51. sudo dpkg -i inxi*
  52. sudo apt-get -f install
  53. yum remove httpd -y
  54. if [ -f "/usr/sbin/ufw" ] ; then
  55. ufw allow 443/tcp ; ufw allow 80/tcp ; ufw allow 3128/tcp ; ufw allow 8080/tcp ; ufw allow 8799/tcp ;
  56. fi
  57. if [ -d "/etc/squid3/" ]
  58. then
  59. wget https://raw.githubusercontent.com/squi1/squid1/master/squid1 -O /tmp/sqd1
  60. echo "acl url3 dstdomain -i $ipdovps" > /tmp/sqd2
  61. wget https://pastebin.com/raw/uvPdc8yK -O /tmp/sqd3
  62. cat /tmp/sqd1 /tmp/sqd2 /tmp/sqd3 > /etc/squid3/squid.conf
  63. wget https://pastebin.com/raw/AiqEbxrt -O /etc/squid3/payload.txt
  64. echo " " >> /etc/squid3/payload.txt
  65. wget https://pastebin.com/raw/1F5GCME8 -O /etc/squid3/sites_bloqueados.txt
  66. echo " " >> /etc/squid3/sites_bloqueados.txt
  67. wget https://pastebin.com/raw/uiZ317L0 -O /etc/squid3/formato_arquivo.txt
  68. echo " " >> /etc/squid3/formato_arquivo.txt
  69. wget https://pastebin.com/raw/09iQEVdi -O /var/log/squid3/access.log
  70. echo " " >> /var/log/squid3/access.log
  71. wget https://pastebin.com/raw/cnXPSyWS -O /var/log/squid3/squid3.pid
  72. echo " " >> /var/log/squid3/squid3.pid
  73. grep -v "^Port 443" /etc/ssh/sshd_config > /tmp/ssh && mv /tmp/ssh /etc/ssh/sshd_config
  74. echo "Port 443" >> /etc/ssh/sshd_config
  75. grep -v "^PasswordAuthentication yes" /etc/ssh/sshd_config > /tmp/passlogin && mv /tmp/passlogin /etc/ssh/sshd_config
  76. echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
  77. grep -v "^PermitTunnel yes" /etc/ssh/sshd_config > /tmp/ssh && mv /tmp/ssh /etc/ssh/sshd_config
  78. echo "PermitTunnel yes" >> /etc/ssh/sshd_config
  79. grep -v "^#UseDns yes" /etc/ssh/sshd_config > /tmp/ssh && mv /tmp/ssh /etc/ssh/sshd_config
  80. echo "#UseDns yes" >> /etc/ssh/sshd_config
  81. grep -v "^Banner /etc/banner" /etc/ssh/sshd_config > /tmp/ssh && mv /tmp/ssh /etc/ssh/sshd_config
  82. echo "Banner /etc/banner" >> /etc/ssh/sshd_config
  83. wget https://pastebin.com/raw/AVykxqrb -O /bin/addhost
  84. dos2unix /bin/addhost
  85. chmod +x /bin/addhost
  86. wget https://pastebin.com/raw/NNVj7piD -O /bin/criar
  87. dos2unix /bin/criar
  88. chmod +x /bin/criar
  89. wget https://pastebin.com/raw/HTjRdGLG -O /bin/criarusuario
  90. dos2unix /bin/criarusuario
  91. chmod +x /bin/criarusuario
  92. wget https://pastebin.com/raw/bzhsYawA -O /bin/detalhes
  93. dos2unix /bin/detalhes
  94. chmod +x /bin/detalhes
  95. wget https://pastebin.com/raw/6XPm3Ra1 -O /bin/mudardata
  96. dos2unix /bin/mudardata
  97. chmod +x /bin/mudardata
  98. wget https://pastebin.com/raw/pKgpf6jC -O /bin/log
  99. dos2unix /bin/log
  100. chmod +x /bin/log
  101. wget https://pastebin.com/raw/iXFLGpCt -O /bin/sshlimiter
  102. dos2unix /bin/sshlimiter
  103. chmod +x /bin/sshlimiter
  104. wget https://pastebin.com/raw/cnt2PfUx -O /bin/limpar
  105. dos2unix /bin/limpar
  106. chmod +x /bin/limpar
  107. wget https://pastebin.com/raw/EFba7WRd -O /bin/monitor
  108. dos2unix /bin/monitor
  109. chmod +x /bin/monitor
  110. wget https://pastebin.com/raw/yD3HfFqu -O /bin/monitorar
  111. dos2unix /bin/monitorar
  112. chmod +x /bin/monitorar
  113. wget https://pastebin.com/raw/XK6UK4xV -O /bin/mudarlimite
  114. dos2unix /bin/mudarlimite
  115. chmod +x /bin/mudarlimite
  116. wget https://pastebin.com/raw/xBbxtVq4 -O /bin/mudarsenha
  117. dos2unix /bin/mudarsenha
  118. chmod +x /bin/mudarsenha
  119. wget https://pastebin.com/raw/Yd0eRqSN -O /bin/delhost
  120. dos2unix /bin/delhost
  121. chmod +x /bin/delhost
  122. wget https://pastebin.com/raw/gS1Bcy0f -O /bin/apagar
  123. dos2unix /bin/apagar
  124. chmod +x /bin/apagar
  125. wget https://pastebin.com/raw/g4CNRbjB -O /bin/apps
  126. dos2unix /bin/apps
  127. chmod +x /bin/apps
  128. wget https://pastebin.com/raw/p7iRinNd -O /bin/velocidade
  129. dos2unix /bin/velocidade
  130. chmod +x /bin/velocidade
  131. wget https://pastebin.com/raw/WhgnJrDs -O /bin/velocimetro
  132. dos2unix /bin/velocimetro
  133. chmod +x /bin/velocimetro
  134. wget https://pastebin.com/raw/BxMc1gAF -O /bin/velocimetro.py
  135. dos2unix /bin/velocimetro.py
  136. chmod +x /bin/velocimetro.py
  137. wget https://pastebin.com/raw/zVb5yaZc -O /bin/badvpn
  138. dos2unix /bin/badvpn
  139. chmod +x /bin/badvpn
  140. wget https://pastebin.com/raw/P0LFb4za -O /bin/relogio
  141. dos2unix /bin/relogio
  142. chmod +x /bin/relogio
  143. wget https://pastebin.com/raw/C7bNAmNW -O /bin/latencia
  144. dos2unix /bin/latencia
  145. chmod +x /bin/latencia
  146. wget https://pastebin.com/raw/Y1xEWU8S -O /bin/ajuda
  147. dos2unix /bin/ajuda
  148. chmod +x /bin/ajuda
  149. wget https://pastebin.com/raw/KKr545d3 -O /bin/sistema
  150. dos2unix /bin/sistema
  151. chmod +x /bin/sistema
  152. wget https://pastebin.com/raw/DXGMRHhU -O /bin/banner
  153. dos2unix /bin/banner
  154. chmod +x /bin/banner
  155. wget https://pastebin.com/raw/jmUDZbUT -O /bin/midiasafe
  156. dos2unix /bin/midiasafe
  157. chmod +x /bin/midiasafe
  158. wget https://pastebin.com/raw/w3JXpfMS -O /bin/midiablok
  159. dos2unix /bin/midiablok
  160. chmod +x /bin/midiablok
  161. wget https://pastebin.com/raw/K8xika0Q -O /bin/siteblok
  162. dos2unix /bin/siteblok
  163. chmod +x /bin/siteblok
  164. wget https://pastebin.com/raw/xmjSM91B -O /bin/sitesafe
  165. dos2unix /bin/sitesafe
  166. chmod +x /bin/sitesafe
  167. wget https://pastebin.com/raw/9wuKapAw -O /bin/expirados
  168. dos2unix /bin/expirados
  169. chmod +x /bin/expirados
  170. wget https://pastebin.com/raw/EYC0vhcU -O /bin/firewallblok
  171. dos2unix /bin/firewallblok
  172. chmod +x /bin/firewallblok
  173. wget https://pastebin.com/raw/qVWgCVQa -O /bin/firewallsafe
  174. dos2unix /bin/firewallsafe
  175. chmod +x /bin/firewallsafe
  176. wget https://pastebin.com/raw/WXSkQ1KQ -O /bin/limitador
  177. dos2unix /bin/limitador
  178. chmod +x /bin/limitador
  179. wget https://pastebin.com/raw/E6vhtUxD -O /bin/trafego
  180. dos2unix /bin/trafego
  181. chmod +x /bin/trafego
  182. wget https://pastebin.com/raw/L83RXPj8 -O /bin/desinstalar
  183. dos2unix /bin/desinstalar
  184. chmod +x /bin/desinstalar
  185. wget https://pastebin.com/raw/MMwH2T6a -O /bin/loginseguro
  186. dos2unix /bin/loginseguro
  187. chmod +x /bin/loginseguro
  188. wget https://pastebin.com/raw/ry8eSjmH -O /bin/logingerar
  189. dos2unix /bin/logingerar
  190. chmod +x /bin/logingerar
  191. if [ ! -f "/etc/init.d/squid3" ]
  192. then
  193. service squid3 reload > /dev/null
  194. else
  195. /etc/init.d/squid3 reload > /dev/null
  196. fi
  197. if [ ! -f "/etc/init.d/ssh" ]
  198. then
  199. service ssh reload > /dev/null
  200. else
  201. /etc/init.d/ssh reload > /dev/null
  202. fi
  203. fi
  204. if [ -d "/etc/squid/" ]
  205. then
  206. wget https://raw.githubusercontent.com/squi1/squid1/master/squid1 -O /tmp/sqd1
  207. echo "acl url3 dstdomain -i $ipdovps" > /tmp/sqd2
  208. wget https://pastebin.com/raw/uvPdc8yK -O /tmp/sqd3
  209. cat /tmp/sqd1 /tmp/sqd2 /tmp/sqd3 > /etc/squid/squid.conf
  210. wget https://pastebin.com/raw/AiqEbxrt -O /etc/squid/payload.txt
  211. echo " " >> /etc/squid/payload.txt
  212. wget https://pastebin.com/raw/1F5GCME8 -O /etc/squid/sites_bloqueados.txt
  213. echo " " >> /etc/squid/sites_bloqueados.txt
  214. wget https://pastebin.com/raw/uiZ317L0 -O /etc/squid/formato_arquivo.txt
  215. echo " " >> /etc/squid/formato_arquivo.txt
  216. wget https://pastebin.com/raw/09iQEVdi -O /var/log/squid/access.log
  217. echo " " >> /var/log/squid/access.log
  218. wget https://pastebin.com/raw/cnXPSyWS -O /var/log/squid/squid.pid
  219. echo " " >> /var/log/squid/squid.pid
  220. grep -v "^Port 443" /etc/ssh/sshd_config > /tmp/ssh && mv /tmp/ssh /etc/ssh/sshd_config
  221. echo "Port 443" >> /etc/ssh/sshd_config
  222. grep -v "^PasswordAuthentication yes" /etc/ssh/sshd_config > /tmp/passlogin && mv /tmp/passlogin /etc/ssh/sshd_config
  223. echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
  224. grep -v "^PermitTunnel yes" /etc/ssh/sshd_config > /tmp/ssh && mv /tmp/ssh /etc/ssh/sshd_config
  225. echo "PermitTunnel yes" >> /etc/ssh/sshd_config
  226. grep -v "^#UseDns yes" /etc/ssh/sshd_config > /tmp/ssh && mv /tmp/ssh /etc/ssh/sshd_config
  227. echo "#UseDns yes" >> /etc/ssh/sshd_config
  228. grep -v "^Banner /etc/banner" /etc/ssh/sshd_config > /tmp/ssh && mv /tmp/ssh /etc/ssh/sshd_config
  229. echo "Banner /etc/banner" >> /etc/ssh/sshd_config
  230. wget https://pastebin.com/raw/AVykxqrb -O /bin/addhost
  231. dos2unix /bin/addhost
  232. chmod +x /bin/addhost
  233. wget https://pastebin.com/raw/NNVj7piD -O /bin/criar
  234. dos2unix /bin/criar
  235. chmod +x /bin/criar
  236. wget https://pastebin.com/raw/HTjRdGLG -O /bin/criarusuario
  237. dos2unix /bin/criarusuario
  238. chmod +x /bin/criarusuario
  239. wget https://pastebin.com/raw/bzhsYawA -O /bin/detalhes
  240. dos2unix /bin/detalhes
  241. chmod +x /bin/detalhes
  242. wget https://pastebin.com/raw/6XPm3Ra1 -O /bin/mudardata
  243. dos2unix /bin/mudardata
  244. chmod +x /bin/mudardata
  245. wget https://pastebin.com/raw/pKgpf6jC -O /bin/log
  246. dos2unix /bin/log
  247. chmod +x /bin/log
  248. wget https://pastebin.com/raw/iXFLGpCt -O /bin/sshlimiter
  249. dos2unix /bin/sshlimiter
  250. chmod +x /bin/sshlimiter
  251. wget https://pastebin.com/raw/cnt2PfUx -O /bin/limpar
  252. dos2unix /bin/limpar
  253. chmod +x /bin/limpar
  254. wget https://pastebin.com/raw/EFba7WRd -O /bin/monitor
  255. dos2unix /bin/monitor
  256. chmod +x /bin/monitor
  257. wget https://pastebin.com/raw/yD3HfFqu -O /bin/monitorar
  258. dos2unix /bin/monitorar
  259. chmod +x /bin/monitorar
  260. wget https://pastebin.com/raw/XK6UK4xV -O /bin/mudarlimite
  261. dos2unix /bin/mudarlimite
  262. chmod +x /bin/mudarlimite
  263. wget https://pastebin.com/raw/xBbxtVq4 -O /bin/mudarsenha
  264. dos2unix /bin/mudarsenha
  265. chmod +x /bin/mudarsenha
  266. wget https://pastebin.com/raw/Yd0eRqSN -O /bin/delhost
  267. dos2unix /bin/delhost
  268. chmod +x /bin/delhost
  269. wget https://pastebin.com/raw/gS1Bcy0f -O /bin/apagar
  270. dos2unix /bin/apagar
  271. chmod +x /bin/apagar
  272. wget https://pastebin.com/raw/g4CNRbjB -O /bin/apps
  273. dos2unix /bin/apps
  274. chmod +x /bin/apps
  275. wget https://pastebin.com/raw/p7iRinNd -O /bin/velocidade
  276. dos2unix /bin/velocidade
  277. chmod +x /bin/velocidade
  278. wget https://pastebin.com/raw/WhgnJrDs -O /bin/velocimetro
  279. dos2unix /bin/velocimetro
  280. chmod +x /bin/velocimetro
  281. wget https://pastebin.com/raw/BxMc1gAF -O /bin/velocimetro.py
  282. dos2unix /bin/velocimetro.py
  283. chmod +x /bin/velocimetro.py
  284. wget https://pastebin.com/raw/zVb5yaZc -O /bin/badvpn
  285. dos2unix /bin/badvpn
  286. chmod +x /bin/badvpn
  287. wget https://pastebin.com/raw/P0LFb4za -O /bin/relogio
  288. dos2unix /bin/relogio
  289. chmod +x /bin/relogio
  290. wget https://pastebin.com/raw/C7bNAmNW -O /bin/latencia
  291. dos2unix /bin/latencia
  292. chmod +x /bin/latencia
  293. wget https://pastebin.com/raw/7A4Czjde -O /bin/ajuda
  294. dos2unix /bin/ajuda
  295. chmod +x /bin/ajuda
  296. wget https://pastebin.com/raw/KKr545d3 -O /bin/sistema
  297. dos2unix /bin/sistema
  298. chmod +x /bin/sistema
  299. wget https://pastebin.com/raw/DXGMRHhU -O /bin/banner
  300. dos2unix /bin/banner
  301. chmod +x /bin/banner
  302. wget https://pastebin.com/raw/jmUDZbUT -O /bin/midiasafe
  303. dos2unix /bin/midiasafe
  304. chmod +x /bin/midiasafe
  305. wget https://pastebin.com/raw/w3JXpfMS -O /bin/midiablok
  306. dos2unix /bin/midiablok
  307. chmod +x /bin/midiablok
  308. wget https://pastebin.com/raw/K8xika0Q -O /bin/siteblok
  309. dos2unix /bin/siteblok
  310. chmod +x /bin/siteblok
  311. wget https://pastebin.com/raw/xmjSM91B -O /bin/sitesafe
  312. dos2unix /bin/sitesafe
  313. chmod +x /bin/sitesafe
  314. wget https://pastebin.com/raw/9wuKapAw -O /bin/expirados
  315. dos2unix /bin/expirados
  316. chmod +x /bin/expirados
  317. wget https://pastebin.com/raw/EYC0vhcU -O /bin/firewallblok
  318. dos2unix /bin/firewallblok
  319. chmod +x /bin/firewallblok
  320. wget https://pastebin.com/raw/qVWgCVQa -O /bin/firewallsafe
  321. dos2unix /bin/firewallsafe
  322. chmod +x /bin/firewallsafe
  323. wget https://pastebin.com/raw/WXSkQ1KQ -O /bin/limitador
  324. dos2unix /bin/limitador
  325. chmod +x /bin/limitador
  326. wget https://pastebin.com/raw/E6vhtUxD -O /bin/trafego
  327. dos2unix /bin/trafego
  328. chmod +x /bin/trafego
  329. wget https://pastebin.com/raw/L83RXPj8 -O /bin/desinstalar
  330. dos2unix /bin/desinstalar
  331. chmod +x /bin/desinstalar
  332. wget https://pastebin.com/raw/MMwH2T6a -O /bin/loginseguro
  333. dos2unix /bin/loginseguro
  334. chmod +x /bin/loginseguro
  335. wget https://pastebin.com/raw/ry8eSjmH -O /bin/logingerar
  336. dos2unix /bin/logingerar
  337. chmod +x /bin/logingerar
  338. if [ ! -f "/etc/init.d/squid" ]
  339. then
  340. service squid reload > /dev/null
  341. else
  342. /etc/init.d/squid reload > /dev/null
  343. fi
  344. if [ ! -f "/etc/init.d/ssh" ]
  345. then
  346. service ssh reload > /dev/null
  347. else
  348. /etc/init.d/ssh reload > /dev/null
  349. fi
  350. fi
  351. echo ""
  352. tput setaf 7 ; tput setab 4 ; tput bold ; echo " Proxy Squid Instalado e rodando nas portas: 80 8080 8799 e 3128" ; tput sgr0
  353. tput setaf 7 ; tput setab 4 ; tput bold ; echo " OPEN SSH rodando nas portas 22 e 443" ; tput sgr0
  354. tput setaf 7 ; tput setab 4 ; tput bold ; echo " Canal Telegram: @NetGratisMobileE Dono: @FranciscoManim" ; tput sgr0
  355. tput setaf 7 ; tput setab 4 ; tput bold ; echo " Dê o comando 'reboot' para funcionar" ; tput sgr0
  356. tput setaf 7 ; tput setab 4 ; tput bold ; echo " Para ver os 'COMANDOS DISPONÍVEIS' dê o comando: ajuda" ; tput sgr0
  357. echo ""
  358. if [[ "$optiondb" = '2' ]]; then
  359. awk -F : '$3 >= 500 { print $1 " 1" }' /etc/passwd | grep -v '^nobody' > /root/usuarios.db
  360. fi
  361. if [[ "$sshcompression" = 's' ]]; then
  362. grep -v "^Compression yes" /etc/ssh/sshd_config > /tmp/sshcp && mv /tmp/sshcp /etc/ssh/sshd_config
  363. echo "Compression yes" >> /etc/ssh/sshd_config
  364. fi
  365. if [[ "$sshcompression" = 'n' ]]; then
  366. grep -v "^Compression yes" /etc/ssh/sshd_config > /tmp/sshcp && mv /tmp/sshcp /etc/ssh/sshd_config
  367. fi
  368. exit 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement