Sunday, August 21, 2011

Easy Understanding - DNS Server Configuration 11

I found this article very helpful in creating DNS infra for my client. Please follow the following Videos. I will also release the sample config file for the DNS BIND config in the next post.

Setting Up and Configuring a DNS Server in Ubuntu 10.10 Maverick Meerkat - Part 1


Setting Up and Configuring a DNS Server in Ubuntu 10.10 Maverick Meerkat - Part 2


Setting Up and Configuring a DNS Server in Ubuntu 10.10 Maverick Meerkat - Part 3


Setting Up and Configuring a DNS Server in Ubuntu 10.10 Maverick Meerkat - Part 4


Please note - This tutorial doesn't tells you anything about the master and slave DNS setup. It will be discussed in the next posts.

Thursday, August 18, 2011

Easy Understanding - Ubuntu Run Levels

Well Guys...As stated...I have been working to make a complete document on Ubuntu HA-NLB cluster setup and publish my work on Internet...Please expect some delay in that due to some conflict with the HA-NLB software(Ultramonkey) and Ubuntu.

Recently I thought of giving you the details of how to control and change the run-levels in Ubuntu. Please read the below article.

Linux run levels
are numbered 0 through 6. Run levels stop at six for practical and historical reasons, but it is entirely possible to have more if desired.

The following table summarizes the User Linux run levels:

* 0 System Halt
* 1 Single user
* 2 Full multi-user mode (Default)
* 3-5 Same as 2
* 6 System Reboot

Run level 0 is the system halt condition. Nearly all modern X86 computers will power off automatically when run level 0 is reached. Older X86 computers, and various different architectures will remain powered on and display a message referring to the halt condition.

Run Level 1
is known as ‘single user’ mode. A more apt description would be ‘rescue’, or ‘trouble-shooting’ mode. In run level 1, no daemons (services) are started. Hopefully single user mode will allow you to fix whatever made the transition to rescue mode necessary.http://www.blogger.com/post-create.g?blogID=7413783897596092588

(You can boot into single user mode typically by using your boot loader, lilo or grub, to add the word ‘single’ to the end of the kernel command line).

Run levels 2 through 5 are full multi-user mode and are the same in a default User Linux (Debian) system. It is a common practice in other Linux distributions to use run level 3 for a text console login and run level 5 for a graphical login.Note, run level 3 is for CLI and run level 5 is for GUI(Gueei)

Run level 6 is used to signal system reboot. This is just like run level 0 except a reboot is issued at the end of the sequence instead of a power off.

Run Levels Location
/etc/rc0.d Run level 0
/etc/rc1.d Run level 1
/etc/rc2.d Run level 2
/etc/rc3.d Run level 3
/etc/rc4.d Run level 4
/etc/rc5.d Run level 5
/etc/rc6.d Run level 6

Change run levels in Debian and Ubuntu Linux

Before we change run levels it might help to find out which run level is current. Use the ‘runlevel’ command to tell you two things: The last run level, and the current run level. Here is the command and the output shown together due to the sparsity of the output:

[root@localhost~:]# runlevel
N 2

The ‘N’ stands for none, meaning there has been no run level change since powering up.The primary command used to change run levels is ‘telinit’.

[root@localhost~:]# telinit 3
[root@localhost~:]# runlevel
N 3

telinit takes one argument on the command line. As always, see the man page for full details. Normally the argument will be one of: 0,1,2,3,4,5,6, or the letter ‘S’. As you may have guessed, the numbers correspond to the run level you wish to move to. Using the ‘S’, for single-user, is the same as the number 1, but don’t do it; the ‘S’ runlevel is intended for use by the UserLinux (Debian)system.

Things does not stop here. We keep on looking for the file where we can change the default run-level..do we??. So here it is::
[root@localhost~:]# nano /etc/init/rc-sysinit.conf


Now reboot the system and the new default run level is 3.

Cheers :)

Monday, August 15, 2011

Ultra Monkey - Coming Soon...

Linux HA Cluster - Steps Approach

Easy Understanding - Bind multiple IP to a single NIC

Here we go....aaa..aaa. But why we even need this....:)

That's not the topic here. I am going to explain how to bind multiple ip to a single nic.

Suppose we have nic eth0 and we bind the IP Address as:

No we want to bind the second IP with this NIC. We do it as:

To verify if the binding works fine....kindly execute the following command:
[root@localhost~:]#ip addr sh eth0

Your output is:

Easy Understanding - Rename the network device

Today I needed to change / rename network interface name ‘eth1′ to ‘eth0′, after replacing broken network card. I searched for the file ‘/etc/iftab’, and it was not there.

The solution lies in the file ‘/etc/udev/rules.d/70-persistent-net.rules’:
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0b:49:81:02:13", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

Changing NAME=”eth1″ to NAME=”eth0″ did the trick.

Friday, August 12, 2011

Easy Understanding - DHCP Server Configuration

Wow!!! One of my all time favorite server services. I simply love it.

DHCP Server in easy steps:
Step 1: Download the binaries and the isc dhcp package from the ubuntu universe.
[root@localhost~:]#apt-get install dhcp3-server
This will install the dhcp server as a service in the ubuntu server. Once installed, you can verify the dhcp service as:
[root@localhost~:]#/etc/init.d/isc-dhcp-server

Step 2: Edit the file dhcpd.conf.
[root@localhost~:]#vi /etc/dhcp/dhcpd.conf

This image is self explanatory. Apart from this, there are some other information which needs to be configured. Please find the snap.

Are we done.....oops I bind specify which ethernet card will server the dhcp server request to the client in a multi-homed nic environment. Here it is:

Edit the file /etc/default/isc-dhcp-server


Step 3: Restart the dhcp server daemon.
[root@localhost~:]#/etc/init.d/isc-dhcp-server restart

Cheers



Thursday, August 11, 2011

Security Series - Password Aging!!!

Did I say "password aging"? Yes I did. There is a counter which reads from a config file...what??? About the password aging information. The next question which strikes the mind is - which file?, what info?, does that file really exist???.

Here's your answers:
Characteristics of a Strong Password:
--> Should have minimum character defined
--> Should be a combination of characters(including special characters) and digits
--> Should have expiration date.

You can view the password aging information of a particular user by executing the following command.

#chage -l username


The password expire information can be set with the following command.
#chage username

for example:
sudo chage -E 01/31/2011 -m 5 -M 90 -I 30 -W 14 username

which means - date (-E) to 01/31/2008, minimum password age (-m) of 5 days, maximum password age (-M) of 90 days, inactivity period (-I) of 5 days after password expiration, and a warning time period (-W) of 14 days before password expiration.

Cheers