Install Perfect Mail Server with ISPConfig and Horde 5.0 on Debian Wheezy- Part-1

First, Install Basic Debian Wheezy. Make sure your network configurations are ok.

Once installed start doing following-

Fixing hostname-

edit /etc/hosts. Make it look like this:

vi /etc/hosts

127.0.0.1 localhost.localdomain localhost
192.168.0.100 server1.example.com server1

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Read more

Share

Bash Shellshock fix with scripts for Debian, Ubuntu, CentOS and other distros. including old

First check if your Bash is vulnerable, execute the following command-

env x='() { :;}; echo vulnerable’ bash -c ‘echo this is a test’

If your system is vulnerable, you will see:

vulnerable

this is a test

If your system is not vulnerable, you will see:

bash: warning: x: ignoring function definition attempt

bash: error importing function definition for `x’

this is a test

To check for the vulnerability CVE-2014-6271, run the following in Bash:

env X='() { (a)=>\’ sh -c “echo date”; cat echo

If your system is vulnerable, you will see:

bash: X: line 1: syntax error near unexpected toke `=’

bash: X: line 1: `’

bash: error importing function for `X’

Sun Sep 08:17:32 EST 2014

If your system is not vulernable, you will see:

date

cat: echo: No such file or directory

To test the vulnerability CVE-2014-7186, run the following in Bash:

bash -c ‘true <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF’ || echo “CVE-2014-7186 vulnerable, redir_stack”

If your system is not vulnerable, you will see:

bash: warning: here-document at line 0 delimited by end-of-file (wanted `EOF’)

bash: warning: here-document at line 0 delimited by end-of-file (wanted `EOF’)

bash: warning: here-document at line 0 delimited by end-of-file (wanted `EOF’)

bash: warning: here-document at line 0 delimited by end-of-file (wanted `EOF’)

bash: warning: here-document at line 0 delimited by end-of-file (wanted `EOF’)

bash: warning: here-document at line 0 delimited by end-of-file (wanted `EOF’)

bash: warning: here-document at line 0 delimited by end-of-file (wanted `EOF’)

bash: warning: here-document at line 0 delimited by end-of-file (wanted `EOF’)

bash: warning: here-document at line 0 delimited by end-of-file (wanted `EOF’)

bash: warning: here-document at line 0 delimited by end-of-file (wanted `EOF’)

bash: warning: here-document at line 0 delimited by end-of-file (wanted `EOF’)

bash: warning: here-document at line 0 delimited by end-of-file (wanted `EOF’)

bash: warning: here-document at line 0 delimited by end-of-file (wanted `EOF’)

bash: warning: here-document at line 0 delimited by end-of-file (wanted `EOF’)

So, let’s start fixing it!

 

Below, I’ve tried to put various contributors solution to place in a single entry.

For Debian 6 (Squeeze)

 

Append this to your sources.list:

deb http://http.debian.net/debian squeeze-lts main contrib non-free

deb-src http://http.debian.net/debian squeeze-lts main contrib non-free

and then run

apt-get update

apt-get install -t squeeze-lts –only-upgrade bash

Read more

Share

PHPSysinfo Installation and Configuration on Debain

PhpSysInfo is an awesome PHP script that displays system and other monitoring information for Linux. phpSysInfo pulls data from /proc and other locations to display on an easy to read page.

On Ubuntu or Debian, install phpsysinfo with:

$ sudo apt-get install phpsysinfo

The config file is then located in:

/etc/phpsysinfo/config.php

Debian / Ubuntu Security concern:

Read more

Share

CentOS mount NFS Disk

First Enable EPEL Repo under CentOS or RHEL Servers

You need to type the following command as per your distro version / release.

RHEL 5.x / CentOS 5.x Users

Type the following command as root user to install repo:

# rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

RHEL 6.x / CentOS 6.x Users

Type the following command as root user to install repo:

# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

Read more

Share

Book Review: Learning Nagios 4 by Wojciech Kocjan

Learning Nagios 4Learning Nagios 4: Learn how to setup Nagios 4 in order to monitor your systems efficiently, Author- Wojciech Kocjan.
 
Nagios- it is the most effective monitoring tool that actually helps to identify and resolve critical IT infra before they affect critical service operations. Above all, it is an open source community edition tool that actually minimizes total cost of ownership for IT infra business operations.
 
The Author- Wojciech, is a decade experienced System Administrator and Programmer, has perfectly realized the fundamentals of IT infrastructures visibility through deployment of enterprise grade yet community release of Nagios 4. The book, is a perfect handbook for for not only setting up Nagios, but also encourages the reader even more to write customized plugins and scripts. The author coves the Nagios ins and out, adequately that even a newbie user can dare to decide to deploy it effectively.
 
It's always a typical risky call to adopt open source techniques where in cases your business relies on heavily. It's mostly because of lack of accountability and lack of dedicated resources to adopt Open Source Initiative. But, today's fast growing community contributors and author alike Wojciech have taken rich projects and techniques to a level of comfort- yes, the resource are there to avail in publication format. System administrator and integrators really do appreciate and relies on such handbook that truly justifies alike the title- "Learning Nagios 4: Learn how to setup Nagios 4 in order to monitor your systems efficiently."
 
The book is so well thought written and detailed, that even the Nagios documentation and manuals that are available on the developers' site aren't detailed and well thought of enough. Being myself a heavy Nagios platform maintainer, I find myself concise, precise and sufficient narrative materials to follow. I've recommended my industry colleagues and fellow NOC engineers to follow this well documented book to set up Nagios in a more efficient manner than the vanilla installation offers.
 
I must say the author has excellently shared his professional knowledge base not only to a single distro of Linux, but tried to exercise with multiple widely used Linux distribution packages. The author has given plenty of various supporting techniques and 3rd party resources that encompass different interest groups of users.
 
All the chapters are very well organized and cared even the smallest adjustments for a perfect setup and configuration. The entire book has delivered plenty (almost every generic services to monitor you can name about!) of production ready to use command scripts and syntax, that you really don't need to look for elsewhere or even googling 🙂
 
For advanced users, the author has explained nicely on the core structure of Nagios and ways to tweak, specially using templates or custom variables. On Chapter-12 Query Handler, surely will attract the developer's eye and perhaps allure to do more building up Nagios plug-in blocks.
I'd recommend all serious system and cloud admins to read this book as a must. No wonder, the invaluable contributions of the author will enrich to all readers, infra users, NOC engineers and even experienced system integrators.
 
My rating of this book is an absolute "A".
 
Kudos to the author and Packt Publisher for publishing a "Must Keep Nagios Reference Book" for the mass community benefit.
 
Share

Reinstall OpenSSH Server

First if you have any pre-installed SSH server that has gone bad, remove it-

on Redhat Architechture

Type the following commands as the root user:

# chkconfig sshd off
# service sshd stop
# yum erase openssh-server

You need to edit and update firewall rules that allows inbound connections to SSHs tcp port # 22. Edit /etc/sysconfig/iptables and /etc/sysconfig/ip6tables. In each file find and delete the line that access connection to port # 22. A sample entry:

Read more

Share