EZ Linux Admin random header image

Entries Tagged as 'Linux Security'

kill a linux process that won’t die

February 3rd, 2012 by EZ linux · No Comments

kill -s 9 [PID] Also try it without the -s if it won’t go.

Click to continue →

Tags: Linux Commands · Linux Operating Systems · Linux Security · Linux Software / Scripts · Linux Tricks

add a 404 page to each website on a cpanel server

December 28th, 2011 by EZ linux · No Comments

#!/usr/bin/perl # cPlicensing.net – scripts            Copyright(c) 2003 cPlicensing.net. #                                     All rights Reserved. # support@cPlicensing.net              http://cPlicensing.net # Version: 0.02 print “Starting Scan…\n”; while(@USERS=getpwent()){ if (-d “$USERS[7]/public_html”) { if (-f “$USERS[7]/public_html/404.shtml”) { print “$USERS[0] 404.shtml exists\n”; } else { print “$USERS[0] creating 404.shtml…”; open(FILE,”>$USERS[7]/public_html/404.shtml”) or die “Unable to create file: $!”; close(FILE); chmod(0644, [...]

Click to continue →

Tags: Cpanel and WHM · Linux Security · Linux Software / Scripts

Backup cleaner script for cpanel

December 28th, 2011 by EZ linux · No Comments

#!/usr/bin/perl # cPlicensing.net – scripts             Copyright(c) 2003 cPlicensing.net. #                                       All rights Reserved. # support@cPlicensing.net               http://cPlicensing.net # Unauthorized copying is prohibited #Version: 0.01 use POSIX; $delete_old     = ’1′; #0 or 1, set to 1 to remove old account backups if($ARGV[0] eq “-d”) { $delete_old = ’1′; } $|++; POSIX::nice(19); print “Reading Backup Config…”; open(CPBACK,”/etc/cpbackup.conf”) or [...]

Click to continue →

Tags: Cpanel and WHM · Linux Security · Linux Software / Scripts

Manually changing an IP in Linux

December 17th, 2011 by EZ linux · No Comments

It’s pretty easy actually. Just go to this directory: /etc/sysconfig/network-scripts Then you will see a file for eachnetwork port, for example my server is: ifcfg-eth0 and ifcfg-eth1 I already have the ifcfg-eth0 set up from the install but I want to use the second one for back ups so I just opened the file and [...]

Click to continue →

Tags: Cpanel and WHM · Hardware · Linux Drivers · Linux Operating Systems · Linux Security · Linux Software / Scripts · Linux Tricks · Ports

The skinny on raid differances

November 28th, 2011 by EZ linux · No Comments

We refer raid 5 but if you have remote back ups on the server then  raid 0 will get you the best performance between several hard drives. Keep in mind raid still can fail even with the same data going to several hard drives and this will slow your system down. Hardware raid is much [...]

Click to continue →

Tags: Hardware · Linux Back Up · Linux Security

Tracking down the biggest folders

August 11th, 2011 by EZ linux · No Comments

du -ax –max-depth 1 /var/cpanel | sort -n | tail This is a great command to simply find what folders are the biggest in a directory. You can replace the /var/cpanel with any folder and it will list everything in there and how big they are in order. Once you find the big folder then [...]

Click to continue →

Tags: Cheat Sheets · Cpanel and WHM · Linux Commands · Linux Security · Linux Software / Scripts · Linux Tricks

Cleaning up /var

August 11th, 2011 by EZ linux · No Comments

Cpanel and linux leaves a lot of log files in /var After several years these can add up, especially in the cpanel/bandwidth folder. So a couple quick folder moves and symlinks can clean things up. This is assuming you have a /backup partition and some room in it. Moving the log folder mv /var/log /backup/ [...]

Click to continue →

Tags: Cheat Sheets · Cpanel and WHM · Linux Operating Systems · Linux Security · Linux Software / Scripts · Linux Tricks

setroubleshootd and SELinux is not considered compatible with cPanel

May 30th, 2011 by EZ linux · 1 Comment

The “setroubleshootd” process is included as part of SELinux. SELinux is not considered compatible with cPanel, and we recommend disabling it per our installation documentation: Disable SELinux security features For a fully successful installation you should disable SELinux. When installing a Red Hat or CentOS distribution, you will be able to use the graphical interface [...]

Click to continue →

Tags: Cpanel and WHM · Linux Security · Linux Software / Scripts

Steps to Secure SSH Server

May 19th, 2011 by EZ linux · No Comments

SSH attacks are normally happened if you are running SSH on comman Port 22 . If you have simple or weak root password then chances of your server get compromised . We can secure SSH server with two methods : Method 1: A best option to secure your SSH is to run SSH on the [...]

Click to continue →

Tags: Linux Security · Linux Tricks

Open DNS fix for CPanel

January 15th, 2011 by EZ linux · No Comments

Open DNS gives a error and means that anyone can use your DNS resolvers. To lock it down you can add this. 1. Login to your server as root. 2. Wget and run the script as : Code: http://shashank.net/scripts/named.patch sh named.patch 3. It will provide you with an output like : Code: allow-recursion { 127.0.0.1; [...]

Click to continue →

Tags: Cpanel and WHM · Linux Security