mkdir -v -p /sftp/root/${USER}/home chown root.root /sftp/root/${USER} mount –bind //${DIR} /sftp/root/${USER}/home useradd -g tomcat -s /sbin/nologin ${USER} sshd_config Match Group tomcat AllowTcpForwarding no ForceCommand internal-sftp -u 0002 -d home ChrootDirectory /sftp/root/%u All folder must have permission as 777, so I […]
Centreon reporting email
I had created a Nagios Script for auto e-mailing reports. There are two versions available one that just gets the current “Reporting” csv and e-mail it and another one I wrote in python that allows more customization. They are […]
monitor site IPS
A poor man Intrusion Prevention System this script and block bad IPs even know I use modeavsive to block more then X concurrent connections from one IP my site keeps going down! The script check if my site is down […]
yum update security check script
simple bash script to check for missing security this is important to make sure your linux is updated here is the script:
Reverse SSH Tunnel
The idea is to have my IP autostart connect to my Cloud server, this way I can remote control my Raspberry PI without having to configure DynDNS and firewall rules. The only requsisite is that PI has internet and run […]
tomcat multiple instances script
This scripts is easy to use and creates multiple tomcats on a single server. I still find it amazing and sad that by default and by RedHat support, you can only install a single Tomcat instance per server! This is […]
iptables block country script
My own server is daily attacked by SSH scanner and bruteforce scripts. My fail2ban solution But as I get hammered by China’s ssh I got tired of it and block all China SSH access using iptables. The concept is simples, […]