starlin1337 Posted June 21, 2014 Report Posted June 21, 2014 Salut ! Am realizat un mic tool in bash care instaleaza LAMP , SSH , FTP +Securizare .Salvati sursa intr-un notepad si salvati cu extensia .sh (exemplu: starlin1337.sh)si executati ./starlin1337.sh dupa ce ia-ti acordat drepturi desigur .#!/bin/bashecho -e "\e[91mStarLinux tool by \e[91m starlin1337 "sleep 2echo -e "Aceasta unealta a fost creata pentru RSTforums.com "sleep 2echo -e "The essence of the future is the digital core "sleep 2echo " =============================================== "sleep 2OPTIUNI="Instalare-LAMP Instalare-SSH Instalare-FTP Securizare-apache2 Securizare-SSH "select opt in $OPTIUNI; doif [ $opt = "Instalare-LAMP" ]; thenecho " Instalare apache2..."sleep 1/usr/bin/apt-get install apache2 sleep 1echo "Instalarea apache2 a fost efectuata cu succes !"sleep 1echo "Instalare php server..."sleep 1/usr/bin/apt-get apt-get install php5 libapache2-mod-php5echo "Instalarea mysql a fost efectuata cu succes !"sleep 1echo "Instalare MySQL..."/usr/bin/apt-get install mysql-serverecho "Instalarea MySQL a fost efectuata cu succes !"sleep 1elif [ $opt = "Iesire" ]; thenecho "Pa,pa!Multumesti lui starlin1337 pentru tool si viziteaza rstforums.com"fi if [ $opt = "Instalare-SSH" ]; then sleep 1 echo "Instalare SSH server ..." /usr/bin/apt-get install openssh-server sleep 1 echo "Instalarea serverului SSH a fost efectuata cu succes !" elif [ $opt = "Instalare-FTP" ]; then /usr/bin/apt-get install vsftpd echo "Instalarea serverului FTP a fost efectuata cu succes !" fi if [ $opt = "Securizare-apache2" ]; then echo "Securizare LAMP SERVER(doar apache2)..."echo "TraceEnable Off" >> /etc/apache2/apache2.confecho "LimitRequestBody 25000" >> /etc/apache2/apache2.confecho "LimitRequestFields 40" >> /etc/apache2/apache2.confecho "LimitRequestFieldSize 4000" >> /etc/apache2/apache2.confecho "LimitRequestLine 4000" >> /etc/apache2/apache2.confecho "MaxRequestsPerChild 100000" >> /etc/apache2/apache2.confecho "Dezactivate directory listing"a2dismod autoindexservice apache2 restartelif [ $opt = "Securizare-SSH" ]; thensleep 1echo "Port 1996" >> /etc/ssh/sshd_configecho "Port 1996" >> /etc/ssh/ssh_configsleep 1echo "Noul port al serverului SSH va fi 1996 !"echo "Protocol 2" >> /etc/ssh/sshd_configecho "Protocol 2" >> /etc/ssh/ssh_configecho "PermitRootLogin no" >> /etc/ssh/sshd_config echo "PermitRootLogin no" >> /etc/ssh/ssh_config sleep 1echo "De acum nu va mai fi disponibila logarea ca root doar folosirea comenzi sudo " sleep 1 fidone 1 Quote
321 Posted June 21, 2014 Report Posted June 21, 2014 da bunicel mai dezvolta-l sa fie cat mai bun Quote
starlin1337 Posted June 21, 2014 Author Report Posted June 21, 2014 O sa mai lucrez la el mult asta este doar o mica parte facuta pe graba. Quote
sleed Posted June 21, 2014 Report Posted June 21, 2014 De ce ai nevoie de 2 servicii de connection ftp si ssh? de ce nu lasi unul singur.. si poti adauga la script sa instalezi fail2ban si denyhosts si sa il faci sa il configurezi automat dupa server. Quote
starlin1337 Posted June 21, 2014 Author Report Posted June 21, 2014 (edited) Le-am pus poate are cineva nevoie de amandoua sa zicem . Dar multumesc pentru indicatii asa voi face maine voi reveni cu un V2.0 . Edited June 21, 2014 by starlin1337 Quote