How to find out size of a directory in linux

This article explains 2 simple commands that most people want to know when they start using Linux. They are finding the size of a directory and finding the amount of free disk space that exists on your machine. The command you would use to find the directory size is ‘ du ‘. And to find…

How to install Giptables

What is Giptables? “GIPTables Firewall is a free set of shell scripts that helps you generate iptables rules for Linux 2.4.x and newer kernels. It is very easy to configure and at present, designed to run on hosts with one or two network cards. It doesn’t require you to install any additional components to make it work with…

How to install PHP

PHP Installation PHP is a server-side scripting language designed for web development. Download php-4.3.4.tar.gz from one of the mirrors at http://www.php.net/downloads.php # tar xvzf php-4.3.4.tar.gz # cd php-4.3.4 export CFLAGS=”-O2 -march=i686 -funroll-loops -D_REENTRANT -fPIC” export LIBS=”-lttf -lfreetype -ljpeg -lz -lnsl” export EXTENSION_DIR=/usr/lib/php4 ./configure \ –prefix=/usr \ –with-layout=GNU \ –with-config-file-path=/etc/httpd \ –enable-force-cgi-redirect \ –with-apxs2=/usr/sbin/apxs \ –with-exec-dir=/usr/bin…

How to install Mod_security

Mod_security Installation There are several ways to install mod_security. Please check out the latest documentation on their website – http://www.modsecurity.org Download http://www.modsecurity.org/download/mod_security-1.7.4.tar.gz # tar xvzf mod_security-1.7.4.tar.gz # cd mod_security-1.7.4/apache2 # /usr/sbin/apxs -cia mod_security.c At the end of the compile: “[activating module `security’ in /etc/httpd/conf/httpd.conf]” Mod_Dosevasive Installation What is mod_dosevasive? “mod_dosevasive is an evasive maneuvers module for…

Set up Apache with TLS/SSL Support

If you haven’t set up Apache you should look at our article on how to install Apache for web services. Guide to Set up Apache with TLS/SSL Support # cp /var/log/boot.log /usr/share/ssl/random1 # cp /var/log/cron /usr/share/ssl/random2 # cp /var/log/dmesg /usr/share/ssl/random3 # cp /var/log/messages /usr/share/ssl/random4 # cp /var/log/secure /usr/share/ssl/random5 # cd /usr/share/ssl # openssl genrsa -rand…

Apache Installation for web services

Documentation for the Apache Install primarily comes from Downloaded httpd-2.0.48.tar.gz from one of the Apache mirror sites at http://www.apache.org. # tar xvzf httpd-2.0.48.tar.gz mod_security – Download mod_security-1.7.4.tar.gz from http://www.modsecurity.org/download/. I am going to install mod_security as a static module in Apache # tar xvzf mod_security-1.7.4.tar.gz # cd mod_security-1.7.4/apache2/ # cp mod_security.c ../../httpd-2.0.48/modules/mappers/ # tar xvzf httpd-2.0.48.tar.gz Create the…

Chroot Jailing BIND

To improve the security of Bind we are going to run it in a chroot jailed environment. What is a chroot jail? Application jails, also known as “change root jails” or “chroot jails,” are security systems that are supported by all Linux and Unix systems. It basically is an application that creates an  impenetrable barrier between the…

BIND Installation

To install BIND and verify it works, and then install it in a chroot jail for added security. We will also ensure that only ns1.isp.net will be allowed to do zone transfers. The following instructions primarily come from 6. I’m going to modify them slightly because I prefer to have the various configuration files under /etc/named. Download…

Securing MySQL

A default install of MySQL is somewhat lacking in security. To fix that we are going to do the following: Remove all default users which are installed in MySQL Create a new admin user (sqladmin) instead of using the default name of ‘root@localhost’ Disable network access to the MySQL port (3306) Log into mysql #…

MySQL Installation

Download mysql-max-4.0.17-pc-linux-i686.tar.gz from one of the mysql mirrors at http://www.mysql.com. These instructions can be found in the file called INSTALL-BINARY in the downloaded file. # groupadd -g 49 mysql # useradd -c “MySQL Server” -d /usr/mysql -g 49 -s /sbin/nologin -u 49 mysql # mv mysql-max-4.0.17-pc-linux-i686.tar.gz /usr # cd /usr/ # tar xvzf mysql-max-4.0.17-pc-linux-i686.tar.gz # ln…