May 31st in Linux/Unix by .

Accidentally deleted /etc/named.conf in Cpanel

i was into a mess by accidentally deleting /etc/named.conf in my dedicated server running centos 5. Sooner i did that all my sites went down. I was in a terrible situation.

For those of you who did that i am documenting here how to restore the file!

Go to Cpanel WHM …

May 28th in Linux/Unix by .

Basic Linux Server Security Tutorial

How to Secure Linux Servers
Basic Linux Server Security

Install Firewall (APF or CSF Firewall with BFD)
ModSecurity (Web application firewall)
ModEvasive (Prevent DDOS attacks)
Harden SSH server
Fix Open DNS Recursion
Install RKhunter
Install ClamAV (Antivirus)
XInet Servers Hardening (Disable Telnet/Finger or unwanted services)
Securing PHP
PortsEntry (tool to detect portscans)
Harden host.conf (against IP spoofing)
Check User Uploaded files
Secure /tmp Folders …

May 28th in Linux/Unix by .

Install Snort Intrusion Detection & Prevention System for Linux

Installing Snort

Snort is a widely deployed open source intrusion detection and prevention system. You can download and install the source packages from the snort website

wget http://path/to/snort-2.8.1.tar.gz
tar zxf snort-2.8.1.tar.gz
cd snort-2.8.1
./configure
make
make install

ERROR! Libpcap library/headers (libpcap.a (or .so)/pcap.h)
not found, go get it from http://www.tcpdump.org
or use the –with-libpcap-* options, if you have it …

May 23rd in Linux/Unix by .

Domain with WWW not resolving problem!

i had a wierd problem with my bind dns server which will not resolve the domain name with www. it works perfectly well, when i type http://domain.com without www in the browser it gets resolves to my IP address.

My zone file looks like this

$ttl 38400
domain.com. …

May 19th in Linux/Unix by .

bind /etc/named.conf missing

i was trying to install bind dns server with my centos 5 and i couldnt locate the /etc/named.conf

i tried installing using

yum install bind-chroot bind*and looks like there is often a problem with bind installed through yum. when i tried to restart the named daemon i am getting failed.

Locating //etc/named.conf: [FAILED]

This …

May 18th in Linux/Unix by .

Install LAMP Server for Centos/RHEL

Linux + Apache + MySQL + PHP/Perl together commonly known as LAMP Server.

* Apache Web Server 2.0
* MySQL Database Serve 5.0
* PHP Scripting Language 5.0
* phpMyAdmin – Web based MySQL Administration Tool
* Webmin – A free web based hosting control panel

Goal

To setup a LAMP server on a fresh VPS/Dedicated server …

May 17th in Linux/Unix by .

Perl modules CPAN error memory allocation

i was trying to install some perl modules to ispconfig and i kept on getting the error with memory allocation problem

perl -MCPAN -e shell
install HTML::Parser
install DB_File
install Net::DNS (when prompted to enable tests, choose “no”)
install Digest::SHA1

Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
Could not pipe[/bin/gzip --decompress --stdout /root/.cpan/sources/authors/01mailrc.txt.gz |]: Cannot allocate memory at /usr/lib/perl5/5.8.8/CPAN.pm line …

May 17th in Linux/Unix by .

Best Server Control Panels for Linux Hosting Servers

Server control panels (web based control panel software) ones for linux can easily help you to easily deploy a server managing hundreds of users and offers management of server resources on the fly. Just get a VPS/Dedicated server install a server control panel and you are good to go with …

May 16th in Linux/Unix by .

Fix: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’

mysql

ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’

if you are new to installing mysql server you might probably face this error quite often if you type mysql in the shell prompt.

> mysql
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’

To fix:

First start the …

May 15th in Linux/Unix by .

Install ModSecurity for Redhat/Centos

How to Install Mod_Security & Mod_Evasive

ModSecurity is a free open source web application firewall which can help you to guard against LFI (local file inclusion attacks) and SQL injection vulnerabilities. ModEvasive offers protection against DOS (denial of service attacks)

For Redhat/Centos with Cpanel

Just go to Cpanel WHM > Plugins …

 Page 1 of 2  1  2 »