May 14

Static Routing in FreeBSD and Debian

Static Routing is achieved by manually adding routes to the routing table.In these systems, routes through a data network are described by fixed paths (statically). These routes are usually entered into the router by the system administrator. An entire network can be configured using static routes, but this type of configuration is not fault tolerant. When there is a change in the network or a failure occurs between two statically defined nodes, traffic will not be rerouted. This means that anything that wishes to take an affected path will either have to wait for the failure to be repaired or the static route to be updated by the administrator before restarting its journey. Most requests will time out (ultimately failing) before these repairs can be made. There are, however, times when static routes can improve the performance of a network. Some of these include stub networks and default routes

Static Routing Network Diagram

Fig: Static Routing Network Diagram

Configuration File for Router 1

#vim /etc/rc.conf

Add following information in your file.


Configuration File for Router 2

#vim /etc/rc.conf

Add following information in your file.



Now Reboot your both BSD routers.

# reboot


# shutdown -r now


IP Configuration for Client PC

Set Static IP address to your each Clients

Client 1

IP address:

Client 2

IP address:

For Debian

eth0 is running in connected to ISP or dhcp server and eth1 is connected to Local LAN.
open file


Setting for eth0

allow-hotplug eth0
iface eth0 inet dhcp

eth1 is running in static IP and setting is as below


auto eth1
iface eth1 inet static

To enable routing you need to make a command

echo 1 > /proc/sys/net/ipv4/ip_forward

But with your configuration you also need a NAT. Because addresses 192.168.*** will not be routed to Internet, it is for private local networks. For enabling NAT, you need to add iptables rule:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

And FORWARD ACCEPT rules in filter table if you use it. By default, I think, all is accepted – you should change this if you have other connected clients you want to not be routed. These commands need to be executed after every boot, so write them on starting script, for example /etc/rc.local.

Apr 20

Reconfigure Locales in Debian/Ubuntu Linux

Re-configuring the locales package, which should ask you to set your system locale.

dpkg-reconfigure locales


Run aptitude with a specific locale, for troubleshooting.

LANG=en_US.UTF-8 aptitude



Edit the file /etc/locale.gen and add your locale settings (one set per line), e.g.:

de_DE.UTF-8 UTF-8
de_DE ISO-8859-1
de_DE@euro ISO-8859-15

The supported locales are listed in /usr/share/i18n/SUPPORTED.

Run the command locale-gen

Run the command locale -a to verify the list of available locales; note that the spellings change.

If you’ve upgraded to Lenny and you have leftover LANG=… content in /etc/environment, you should comment it out.
To use the new settings with your programs, log out and back in.

Apr 16

Compress Unix/Linux Directory

How do I Compress Complete Linux or UNIX Directory?

Q. How can I compress a whole directory under Linux / UNIX using a shell prompt?

Similar Question,

Q. How can i zip folder/directory in Linux using shell command?

A. It is very easy to compress a Whole Linux/UNIX directory. It is useful to backup files, email all files, or even to send software you have created to friends. Technically, it is called as a compressed archive. GNU tar command is best for this work. It can be use on remote Linux or UNIX server. It does two things for you:
=> Create the archive
=> Compress the archive

You need to use tar command as follows (syntax of tar command):

tar -zcvf archive-name.tar.gz directory-name


  • -z: Compress archive using gzip program
  • -c: Create archive
  • -v: Verbose i.e display progress while creating archive
  • -f: Archive File name

For example, you have directory called /home/drpaudel/tutorial and you would like to compress this directory then you can type tar command as follows:

$ tar -zcvf tutorial.tar.gz /home/drpaudel/tutorial

Above command will create an archive file called tutorial.tar.gz in current directory. If you wish to restore your archive then you need to use following command (it will extract all files in current directory):

$ tar -zxvf tutorial.tar.gz


  • -x: Extract files

If you wish to extract files in particular directory, for example in /home then you need to use following command:

$ tar -zxvf tutorial.tar.gz -C /home

$ cd /home
$ ls –


See more Results:

Apr 10

Clonezilla DRBL Tutorial for Debian 6.0.1 and Ubuntu 10.10

Clonezilla is a free disaster recovery, disk cloning, disk imaging and deployment solution.[3] Clonezilla is designed by Steven Shiau and developed by the NCHC Free Software Labs in Taiwan. Clonezilla SE provides multicast support similar to Norton Ghost Corporate Edition.

Clonezilla Server Edition (SE)

  • A single command is required to switch the client environment
  • DRBL, FreeDOS, OS in local HD, memtest
  • Linux network installation
  • Not suitable for older machines and/or thin clients //NOTE// From version 5 (released ’07), fat client mechanism is supported in LTSP

Fundamental Diagram of Clonezilla.

Clonezilla Tutorial

Figure: Image Cloning from Template Client to Clonezilla Server

Read the rest of this entry »

Apr 08

Dual Boot of Debian 6.0.1 and FreeBSD 8.2

Installation Procedure:
First Install FreeBSD 8.2 .
Disc Slicing procedure.
1. Delete all slices.
2. Make slice for Debian
3. Make slice for FreeBSD
4. Delete slice 1 for Debian and leave it as unused.
5. Install FreeBSD in second Slice leaving first slice and don’t install Boot Loader. Just leave boot loader as we are going to install Grub Boot loader in Debian.

Install Debian 6.0.1
Do not Touch the FreeBSD slice that is visible during manual partitioning.
Install GRUB Boot Loader.
Reboot your system

Here you will not see FreeBSD system in Debian Grub as you  need to edit your grub boot loader.

FreeBSD with Debian GRUB

Mar 26

Change MAC Address in Linux

Just change the setting under

Mar 26

Unable to boot due to GNOME Power Manager error

If you are getting the following error while booting into ubuntu, its most likely due to low disk space in root drive:

“The configuration defaults for GNOME Power Manager have not been installed correctly. Please contact your computer administrator.”

After you enter the password on login screen, it takes you back to login screen making you unable to log in.

However, you can still get to terminal. Press Ctrl+Alt+F1 to drop to terminal from login screen. Enter your username and password and execute the following command:

sudo apt-get clean

This will clean up the package cache freeing up lots of disk space. If you don’t have anything in the cache you’ll have to move your files to another partition. You can use mv for the purpose.

mv source destination

For eg;
mv ./ /media/disk-3/

This will move the file – to /media/disk-3.

For people who still have the same error can try some alternate fixes as mentioned below:

* Chmodding /tmp to 0777 have worked for many people.
chmod 0777 /tmp
* Try to reconfigure your packages.Source
sudo dpkg –configure -a
* Manually create the directory /var/lib/gconf/default/. Source
mkdir /var/lib/gconf/default
* sudo apt-get –reinstall install ubuntu-desktop

Note that this command will remove some settings. Source

Other option: Clean some of the unwanted files in your PC. Check your harddrive by $df and see the status and delete accordingly.


Feb 16

Nagios install and configure in Ubuntu 10.10

  • Download first Nagios installation core and plugins
  • Install some necessary compilers using the command :
sudo  apt-get install build-essential

Feb 08

Grub Installation in Debian Linux 5.04+

What will you do if your grub is not installed or your grub boot loader is corrupted in Debian?

  1. Boot System with Debian CD
  2. Go to Advance option in in the first Installer boot menu.
  3. Go to Rescue mode
  4. Choose your system language
  5. Choose your country, territory or area
  6. Choose your Keymap to use
  7. Configure your Ethernet card and select DHCP auto-configuration connecting into DHCP network.
  8. Give your hostname followed by Domain name
  9. select your timezone
  10. Choose Device to use as root file system, here I installed in /dev/hda2 so I choose /dev/hda2
  11. Go to Rescue operations Reinstall Grub boot loader
  12. Give your device for boot loader installation to /dev/hda2
  13. Now your system is installing grub in your system. Finally, Reboot the system

Jan 06

Fixing Microsoft Word 2007 crashing feature

After I installed the latest Windows Updates this morning, I got home and noticed that Microsoft Word 2007 would crash every single time I opened Word. To make matters worse, Word would also crash every time I tried to exit the program.

Lovely conundrum.

After an hour of frustration and a giggle at the appropriately titled Word 2007 crashes aren’t a bug, they’re a feature, it occurred to me that I went through this exact issue some time last year.

The issue is with a corrupted key in the registry. The steps to fix this problem are:

1. Exit all Office programs.
2. Open the Registry Editor by selecting Start, Run, type regedit, and then select OK.
3. Locate the following registry subkey: HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Data
4. Back up the registry key (select the Data folder, and then select File then Export. Call it whatever you want and save it to an easily accessible spot like your desktop). Delete the Data subkey (select Data, then select Delete from the Edit menu).
5. Exit Registry Editor.
6. Start Word.

Hopefully this will save you some hours of frustration!

Older posts «

» Newer posts