I spent hours trying to get mod_bandwidth to work simply because I have used it for years. But now with Apache 2.0 times have changed and there is a better option for Linux and it’s free. The new mod to regulate bandwidth and more is called Mod_cband I’m not sure what cband means but I [...]
Entries Tagged as 'Linux Security'
Mod_cband the new Mod_Bandwidth
March 29th, 2010 by EZ linux · 1 Comment
Tags: Cheat Sheets · Cpanel and WHM · Linux Security · Linux Software / Scripts · Linux Tricks
Calm down rsync if it overloads your IO memory or CPU
March 3rd, 2010 by EZ linux · No Comments
The trick is to limit I/O bandwidth for rsync.
The –bwlimit option limit I/O bandwidth. You need to set bandwidth using KBytes per second. For example, limit I/O bandwidth to 10000KB/s (9.7MB/s), enter:
rsync –delete –numeric-ids –relative –delete-excluded –bwlimit=10000 /path/to/source /path/to/dest/?
10 megs a second is plenty of speed and will keep the server running smoothly when your [...]
Tags: Cheat Sheets · Linux Commands · Linux Security · Linux Software / Scripts · Linux Tricks
Default MYSQL port
February 9th, 2010 by EZ linux · No Comments
The default MYSQL port is:
3306
Tags: Cheat Sheets · Linux Security · Ports
Location of SSL certs and keys for CPanel and users
February 9th, 2010 by EZ linux · No Comments
I was tracking down the location for each users SSL on a CPanel based server and wanted to post the locations here since they are a little off the beaten track. This is good to have around for when you want to clean out old certs and keys that are just jumbling your SSL trackers.
Here [...]
Tags: Cpanel and WHM · Linux Security
Flushing iptables
January 21st, 2010 by EZ linux · No Comments
iptables can block many different things and often it will block good servers inside of a network. The best to see if it’s a iptables issue. Try to clean them out with this if you have CSF on the server:
csf -f
If you still have a issue try to stop iptables like this:
service iptables stop
Tags: Linux Commands · Linux Security · Linux Tricks
Change root or user password on a Linux server
January 18th, 2010 by EZ linux · No Comments
Simple when logged in with the user type:
passwd
Then enter the new password twice to save it.
To change the root password on a Linux server you have to be logged in as root.
Tags: Cheat Sheets · Linux Security
Have root logins emailed to you
November 24th, 2009 by EZ linux · No Comments
1. Login to your server and su to root, unless you logged in as root already.
2. cd /root (unless your default login folder is already root)
3. pico .bashrc (or use your favorite editor)
4. Scroll to the end of the file then add the following:
echo ‘ALERT – Root Shell Access (YourserverName) on:’ `date` `who` | mail [...]
Tags: Linux Security · Linux Tricks
PHP handler SuPHP
November 9th, 2009 by EZ linux · 1 Comment
Setting your PHP handler to SuPHP, which will cause PHP scripts to run as the user instead of “nobody”.
Note that it has stricter permissions requirements than the other handlers–files must be 644, directories 755
Tags: Cpanel and WHM · Linux Security · Linux Software / Scripts · Linux Tricks
skdetect
August 17th, 2009 by EZ linux · No Comments
wget http://tsd.student.utwente.nl/skdetect/skdetect-1.0pre4cvs
./skdetect-1.0pre4cvs
Tags: Linux Commands · Linux Security · Linux Software / Scripts
Root check
August 17th, 2009 by EZ linux · No Comments
Install chkrootkit
To install chrootkit, SSH into server and login as root.
At command prompt type: cd /root/
At command prompt type: wget ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz
At command prompt type: tar xvzf chkrootkit.tar.gz
At command prompt type: cd chkrootkit-0.47
At command prompt type: make sense
To run chkrootkit
At command prompt type: /root/chkrootkit-0.47/chkrootkit
Make sure you run it on a regular basis, perhaps including it [...]
Tags: Linux Commands · Linux Security · Linux Software / Scripts
