The difference between shared and dedicated IP addresses

The difference between shared and dedicated IP addresses

Each computer connected to the Internet is assigned a unique IP address for the purposes of communication. An IP address is a 32-bit numeric address usually expressed as 4 numbers from 0-255 separated by dots, for example 192.168.0.123. There are billions of addresses possible, however, the number is finite. In the Web hosting industry there are two types of IP address...
  • Dedicated IP address (also called static IP) means that a website has its own IP address. Whether you type in your URL or the numeric form of its IP address, both will bring you to the same domain.
  • Shared IP address means that multiple websites share the same address. Web servers can determine by the domain entered in a user's browser which website is being requested. Typing in the IP address will bring you to some kind of generic page instead of the specific site you want.
Due to the rapid increase of the number of registered domain names and the finite number of IP addresses, Web hosting providers are forced to use shared IP's when possible. In fact, hundreds of websites often share the same address. Static IP hosting is no longer the norm and usually costs more.

Who needs a dedicated IP address?

Generally, having a website on a shared IP address will not cause you any harm. However, there are a few cases when a static IP is required...
  • Having your own Private SSL Certificate. Secure e-commerce websites need SSL certificates for accepting credit cards online. Web hosts usually offer a shared SSL certificate where clients can share the Web host's SSL. If you are using your Web hosting provider's shared SSL you don't need a static IP.
  • Anonymous FTP. It means that anyone using the FTP software can access files in a special directory of your site. It's called Anonymous FTP because the user name used to access is "anonymous." Many Web hosting providers require a static IP for the anonymous FTP function to work properly.
  • You want to access your website by FTP or Web browser even when the domain name is inaccessible, such as domain name propagation periods.

Dedicated IP hosting and search engines

There has been debate in the SEO industry for awhile regarding whether or not using a dedicated IP address is better than having a shared IP for your website...
  • Some SEOs suppose that there really is no good reason to obtain static IP Web hosting. Your site will not perform any better by having its own static IP.
  • Some others theorize that your choice of dedicated IP hosting vs. shared hosting might slightly affect your rankings (i.e. it's a factor considered by search engines).
  • Yet others suppose that sharing an IP address with known spam or adult sites raises a warning flag with search engines, so some of them may respond by banning the entire IP address from their index.
Most probably, these fears are greatly exaggerated. Since the majority of sites on the Web are hosted via shared IP, it would be unprofitable to search engines to penalize a site based on IP. Search engines are able to ban anything on a domain name instead of an entire IP neighborhood. So it is search engine safe to use a shared IP hosting. Moreover, almost all hosting will eventually be shared in order to preserve IP addresses. Source : http://www.buildwebsite4u.com/articles/dedicated-ip.shtml

Task Scheduling in Linux

In recent past i use to do certain tasks at some scheduled time on the day which also included shutting down one of my machine at 8 PM. Then I came to know that this could be effectively done automatically using cron and so I am discussing cron in this post. Cron is a daemon which schedules recurring tasks to be executed at a predefined time and date . It is very easy to schedule a job to be run at a particular time using cron. Cron daemon is typically started at boot time and runs continuously in the background. Cron maintains a table of tasks in a file named crontab which is usually in /etc directory. Each user can have separate cron file In order to access the current cron table, the crontab command is used as follows :
$ crontab -e

The above command will load the user's crontab in an editor - usually 'vi '- for editing by the user.

The crontab file contains 6 fields which are as follows :
Min Hours day-of-month month day-of-week command-to-run
And the values of these fields can take the following form:
Min - 0-59 Hours - 0-23 day of month - 1-31 month - 1-12 or Jan-Dec day of week - 0-7 or Sun-Sat
Fields in a crontab may be separated by any number of tabs or spaces. And a '*' symbol in a field represent all valid values. Suppose I am logged in as root and want to modify a crontab file of a particular user. Then I use the '-u' switch : # crontab -u username -e And to list the crontab,
$ crontab -l
You can remove the crontab using the -r switch:
$ crontab -r

Restrict or allow user access to cron

Using the two files, /etc/cron.allow and /etc/cron.deny, root can allow or restrict a user from using cron.

System crontab files

/etc/crontab - Master crontab file /etc/cron.d/ - directory containing additional system crontab files.

The syntax of the system crontab file is slightly different from the user crontab file explained above. In the system crontab file, the sixth field is a username which will be used to execute the command in the seventh field.

Below is the listing of my system crontab file - /etc/crontab
# File: /etc/crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # run-parts 01 * * * * root run-parts /etc/cron.hourly 00 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly

As seen above, run-parts is a shell script which takes one argument, a directory name, and invokes all of the programs in that directory. The directories cron.hourly, cron.daily, cron.weekly and cron.monthly contain executables which are run by the master crontab file /etc/crontab . Thus at 4:00 every morning, all of the executables in the /etc/cron.daily directory will be run as root.

If you view the /etc/cron.daily directory, you can see a lot of executables which are run daily at a predefined time as specified in the /etc/crontab file.

In my case I added the following lines

00 20 * * * root /sbin/halt (To shut down system @ 8 PM daily)
00 13 * * 0 root /sbin/halt (To shut down system @ 1 PM on sundays)
using this I was able to automatically shutdown machines once the clocked said its time to close.
Thunderbird Signatures/Buttons

Configuring DHCP Server on Ubuntu

Ubuntu works the apt-get way and hence makes it easy to install packages on it for confuguring Ubuntu as a DHCP server install the server software using the following command

$ sudo apt-get install dhcp3-server

this would install the required packages

after the package is installed backup the default configuration files using the following

$ sudo cp /etc/default/dhcp3-server dhcp3-server.back

dhcp3-server is a file where you specify the interface DHCP should server (wlan0 in mycase)

edit the file using

$ sudo vim /etc/default/dhcp3-server

change

INTERFACES=””

to

INTERFACES=”wlan0”

(wlan0 might be eth0 or eth1 in your case)

save and close the file

only one more file editing is required now create a backup for mail dhcpd.conf using

$ sudo cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf.back

edit the file using

$ sudo vim /etc/dhcp3/dhcpd.conf

change

# option definitions common to all supported networks…
option domain-name “example.org”;
option domain-name-servers ns1.example.org, ns2.example.org;

default-lease-time 600;
max-lease-time 7200;

to

#option domain-name “example.org”;
#option domain-name-servers ns1.example.org, ns2.example.org;
#default-lease-time 600;
#max-lease-time 7200;

and

# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
# range 10.5.5.26 10.5.5.30;
# option domain-name-servers ns1.internal.example.org;
# option domain-name “internal.example.org”;
# option routers 10.5.5.1;
# option broadcast-address 10.5.5.31;
# default-lease-time 600;
# max-lease-time 7200;
#}

to

# A slightly different configuration for an internal subnet.
subnet 192.160.0.0 netmask 255.255.255.0 {
range 192.168.0.50 192.168.0.100;
option domain-name-servers 192.168.0.1;
option domain-name “mydomain.local”;
option routers 192.168.0.2;
option broadcast-address 192.168.0.255;
default-lease-time 600;
max-lease-time 7200;
}

thats it

restart the dhcp server using

$ sudo /etc/init.d/dhcp3-server restart

this server will start allocating IP dynamically.

Adding Static Clients in Windows

In relatively small organizations where it is not possible to have a local DNS server there might be a need to obtain DNS like functionality in Linux it is done via the /etc/hosts file if it is possible in linux there should be an alternate in Windows aslo Adding static clients to the hosts file helps minimize the search time here are a simple steps which will help in adding static clients : 1) Open the folder %SystemRoot%\System32\Drivers\Etc using Windows Explorer. 2) This folder contains 2 important files namely hosts.ics and hosts. hosts.ics is a file which is dynamically updated so pls dont edit it. edit the hosts file using any text editor 3) This hosts file would contain only an "127.0.0.1 localhost" entry move the cursor to the next line 4) Add the IP address and hostname eg 172.17.7.40    testmachine.local note a tab character seprates IP from hostname 5) After this entry is done make sure that you leave 2 empty lines in the file use Enter Key to do the same This completes addition of static hosts in windows you can add any number of static hosts as needed.

Patching The Kernel

Is Patching a Good Idea?

 
In most of the recent Linux distros available today we find Kernel Version 2.6.9+ which by itself supports all latest devices, but still there might me some improvements done to the installed kernel first option is to download the latest kernel available from http://www.kernel.org which would require a download of 40+Mbs or the other option is to patch your existing kernel.
 
90-95% of the kernal source remains the same and downloading the entire source for this 5-10% is never a good idea. For this reason, kernel patches are released Kernel patches contain only the files that have changed since the last kernel, hence making it less pain to upgrade.
 
Steps for applying a patch
 
Step 1 ) Take Backup of the existing kernel Source (/usr/src/linux2.6.24 in my case)
 
Step 2 ) Download the patch from http://www.kernel.org
 
remember if you want to upgrade your kernel to 2.6.26 from 2.6.24 you require 2 patches i.e. 2.6.25 and 2.6.26 patching a step by step process, you cant jump.
 
The current stable version of kernel is 2.6.26
& the patch available is 2.6.26.1
 
Step 3) un-zip the patch file into the kernel sorce directory
 
# tar -xvf patch-2.6.25.tar
# tar -xvf patch-2.6.26.tar
 
# mv patch-2.6.* /usr/src/linux2.6.24
 
Step 4) Change to Source Directory and apply patch
 
# cd /usr/srclinux2.6.24
# patch -p1 < patch-2.6.25
# patch -p1 < patch-2.6.26
 
for more info on patch command use man patch
 
this command will provide lot of output just have a look at it,
patch command uses diff in background and changes approprate parts of the source.
 
After these steps are done you need to recompile the kernal using the same process as discussed in my blog earlier

Checking System Uptime in Windowspress

uptime is a Linux/UNIX command which lets you know the time since the machine is running.
But how you get the same information in Windows???????????
Its very simple i dont know if you have used this command in windows or not the command to find out uptime for windows machine is
systeminfo
This command give a big output you can use the following
systeminfo | more
and check out each line you will surely find System Uptime.
:)

Google Search

If you type the word ' search ' in the Google search box and hit enter, the weird thing is that Google itself shows up probably in page 2 or 3. And the first result is Microsoft's Live Search !! I know that the algorithm has to do something with it, but still Google should be the first result because that's what people associate the word ' search ' with.

Compile Linux Kernel 2.6.*

Compiling the Linux Kernel will either be the most frustrating or the most coolest thing a linux user have done. Bit it is also something any serious Linux User cannot avoid.

Why Compile a Kernel?

Kernel is the interface to your Hardware, re-compiling/patching the kernel would fix bugs and enhance performance of your hardware.

The How to

Step 1) Getting The Latest Kernel Source Code

The latest kernel source can be downloaded from http://www.kernel.org/
Latest Release till date is 2.6.26
Latest Patch till date is 2.6.27.rc1


Step 2) Extract the downloaded file

#  tar -xvf linux-2.6.26.tar.bz2 -C /usr/src
#  cd /usr/src

Step 3) Configure Kernel

Requirements GCC
$ make menuconfig
(test/menu based configuration tool)
$ make xconfig
(X windows based configuration tool best for KDE)
$ make gconfig
(X windows based configuration tool best for GNOME)
Step4 ) Compile Kernel
$ make (it takes lot of time be patient)
$ make modules
$ su -
# make modules_install

Step 5) Install Kernel

# make install
It will install three files into /boot:
  • System.map-2.6.26
  • config-2.6.26
  • vmlinuz-2.6.26
Step 6 ) Create initrd image

# cd /boot
# mkinitrd -o initrd.img-2.6.26 2.6.26

Step 7) Modify grub (/boot/grub/menu.lst)

title           Kernel 2.6.26 New root           
(hd0,0) kernel        
 /boot/vmlinuz root=/dev/hdb1 ro initrd         
/boot/initrd.img-2.6.26

Step 8) Reboot

# init 6
and you are done if the above steps worked out fine you will have a new Kernel Installed.

What is Open Source ????

Open Source Software development platform is a community of one or more software programmers across the world who come together and work on developing software. The Important thing here is to make the source code along with the application freely downloadable to people so that they can use-see-modify the source code according to their own requirements. The software may or may not be a replica of an existing proprietary software. Also it is not tied to Linux as it's base OS, lots of open source softwares are made to run even on Windows and Mac. You can use-see-modify the existing source code of any open source software and use it for your own purpose. Businesses are building up around this concept where companies work on developing a focussed solution to a customer's requirement using an open source piece of software and sell their own source code along with the base software's source code to the customer.