How to Un-ban an IP Blocked by Fail2Ban

When an IP is banned by Fail2Ban and you want to un-ban that IP, the command you need to run is: sudo fail2ban-client set <jailname> unbanip ipaddress You can get the jailname by running: sudo fail2ban-client status If you want to find what IPs are banned by Fail2Ban, you can check the IPTABLES by running: […]

MySQL 5 Commands

shell> sudo /Library/StartupItems/MySQLCOM/MySQLCOM start (Enter your password, if necessary) (Press Control-D or enter "exit" to exit the shell) You might want to add aliases to your shell’s resource file to make it easier to access commonly used programs such as mysql and mysqladmin from the command line. The syntax for bash is: alias mysql=/usr/local/mysql/bin/mysql alias […]

Backup Script

** UNTESTED ** #!/bin/sh # Remove previous backups to conserve on disk space rm -f /backups/* # Apt package list backup dpkg –get-selections > /backups/dpkg_list_`date +%Y-%m-%d`.txt # SQL dump mysqldump -u root -pMYPASSWORD –all-databases > /tmp/mysqlbak gzip /tmp/mysqlbak mv /tmp/mysqlbak.gz /backups/dbbackup_`date +%Y-%m-%d`.sql.gz # Filesystem backup tar cfj /backups/fsbackup_`date +%Y-%m-%d`.tar.bz2 /etc /var /home

vnStat and vnstat PHP Frontend Installation – CentOS

Yum installation yum install vnstat Edit configuration vim /etc/sysconfig/vnstat I only have one interface (eth0), you may have more (eth1 etc…) # see also: vnstat(1) # # starting with vnstat-1.6 vnstat can also be # configured via /etc/vnstat.conf # # the following sets vnstat up to monitor eth0 VNSTAT_OPTIONS="-u -i eth0" Edit configuration vim /etc/vnstat.conf […]