Month: October 2010

dos deflate

(D)DoS Deflate is a lightweight bash shell script designed to assist in the process of blocking a denial of service attack. It utilizes the command below to create a list of IP addresses connected to the server, along with their total number of connections. It is one of the simplest and easiest to install solutions…


Converting MySQL database to Firebird – part1

From backwardcompatible.net I have a heavy-used website powered by LAMP stack (CentOS Linux, Apache 2, MySQL and PHP). It started on a shared hosting so I had to use MySQL. Year and a half later, I switched shared, virtual hosting and not run it on a dedicated server. I decided to try Firebird to see…


Delete last command from bash history

From thoughtsbyclayg.blogspot.com how to delete last command from bash history If you have ever typed something into a command prompt that you wished you hadn’t – you may find it useful to know that you can delete it from ~/.bash_history very easily. The command: history -d offset will delete the history entry at position offset….


socket bind() to port 25 for address (any IPv4) failed: Address already in use

socket bind() to port 25 for address (any IPv4) failed: Address already in use If you get this error message: socket bind() to port 25 for address (any IPv4) failed: Address already in use: waiting 30s before trying again (6 more tries) …. That means there is already a smtp program listening on Port 25….


Increase /tmp size

From gnode.net cPanel’s new securetmp script is handy to prevent users from executing malicious code in /tmp or /var/tmp but if your software is like a lot out there and doesn’t have any garbage collection, you’ll find your /tmp partition filling up quickly. By default, cPanel’s script uses a limit of 512MB, and for those…


Backup all cpanel accounts

UPDATE: The one-liner below still works as of 7/23/15 on CENTOS 5.8 x86_64 WHM 11.50.0 (build 27). Will be testing shortly on CENT7 To create all accounts backup on your server, execute following command for backup in `\ls /var/cpanel/users/`; do echo /scripts/pkgacct $backup; done Run it the first time to see what it is going…