How to install CSF Firewall on your Server.
Installation
Installation is quite straightforward:
rm -fv csf.tgz
wget http://www.configserver.com/free/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh
Next, test whether you have the required iptables modules:
Don’t worry if you cannot run all the features, so long as the script doesn’t report any FATAL errors
You should not run any other iptables firewall configuration script. For example, if you previously used APF+BFD you can remove the combination (which you will need to do if you have them installed otherwise they will conflict horribly):
sh /etc/csf/remove_apf_bfd.sh
That’s it. You can then configure csf and lfd by edit the files directly in /etc/csf/*, or on cPanel servers use the WHM UI
csf installation for cPanel is preconfigured to work on a cPanel server with all the standard cPanel ports open.
csf installation for DirectAdmin is preconfigured to work on a DirectAdmin server with all the standard DirectAdmin ports open.
csf auto-configures your SSH port on installation where it’s running on a non-standard port.
csf auto-whitelists your connected IP address where possible on installation.
You should ensure that kernel logging daemon (klogd) is enabled. Typically, VPS servers have this disabled and you should check /etc/init.d/syslog and make sure that any klogd lines are not commented out. If you change the file, remember to restart syslog.
Download the firewall script from : http://www.configserver.com/
How to disable IPv6 in RHEL 5, Fedora, CentOS?
In Red Hat Enterprise 5 Linux internet protocol version 6 (IPv6) module is turned on by default and if your network is not ready to run IPv6 then you need to turn it off on your Linux server.
Steps to disabled IPv6 on RHEL 5:
1. In Fedora, CentOS or RHEL5 Linux modules are loaded using /etc/modprobe.conf file.
Add these line to disable autloading of IPv6 module in /etc/modprobe.conf
alias net-pf-10 off
alias ipv6 off
2. Next edit /etc/sysconfig/network
# vi /etc/sysconfig/network
Change to the following.
3. Also to disable the IPv6 service.
4. permanently disabling.
# chkconfig ip6tables off
Resizing a Physical Volume
If you need to change the size of an underlying block device for any reason, use the pvresize command to update LVM with the new size. You can execute this command while LVM is using the physical volume.
EXAMPLES
Expand the PV on /dev/sda1 after enlarging the partition with fdisk:
Shrink the PV on /dev/sda1 prior to shrinking the partition with fdisk (ensure that the PV size is appropriate for your intended new partition size):
pvresize –setphysicalvolumesize 40G /dev/sda1
RESTRICTIONS
pvresize will refuse to shrink PhysicalVolume if it has allocated extents after where its new end would be. In the future, it should relocate these elsewhere in the volume group if there is sufficient free space, like pvmove does.
pvresize won’t currently work correctly on LVM1 volumes or PVs with extra metadata areas
How to upgrade apache in a directadmin server
For upgrading apache from 1.3.39 to Apache 2.0.63, just login to the server and run following commands/scripts.
#cd /usr/local/directadmin/customapache
#./build update
#./build clean
#./build update_data_ap2
#./build convert
#./build apache_2
#./build php_ap2 n
#./build mod_frontpage_ap2
#./build mod_perl_ap2
Cpanel shows incorrect disk usage
cPanel shows incorrect disk usage
* Disk usage zero for all the domains in ‘list accounts’
* Mismatch between the disk usage in backend and Cpanel
Check whether /home partition has been mounted with ‘usrquota’ option (defaults,usrquota in /etc/fstab)
# cat /etc/fstab| grep home
LABEL=/home /home ext3 defaults,usrquota 1 2
Run the following command.
# quotacheck -c /home
# quotaon /home
Also Check the option WHM >> Server Configuration >> Tweak Settings >> System — Disable Disk Quota display caching