Wednesday, March 31, 2010

How to mount Vmware virtual disk(.vmdk) in Windows XP

STEP 1:
Download Vmware mount utility from Vmware website or from any other source
Install the Utility following the onscreen instructions
STEP 2:
Now in your Windows machine Go to Command prompt
Type cd "\Program Files\Vmware\Vmware DiskMount Utility"
STEP 3:
Now execute the following command
vmware-mount j: "D:\WindowsXpProfessional\WindowsXpProfessional.vmdk"

The above commands the .vmdk to Drive j

Or Try using Vmware Disk mount GUI a free utility

Done..

Fix Grub in Fedora

Reinstalling grub
STEP 1:
->Boot using installation disc
->choose rescue mode
->The system existing will be mounted on /mnt/sysimage
STEP 2:
Now execute the following commands
#chroot /mnt/sysimage
#grub-install /dev/sda //Assuming fedora is installed in /dev/sda

Enjoy!!!!

Tuesday, March 30, 2010

How to access windows share using Linux

STEP 1:
Share a folder in Windows and give permissions for a user
In my Example username=test and password=test@123
STEP 2:
Use the mount command as follows
#mount -t cifs //ipaddress of windows machine/Shared folder /mnt -o username=test,password=test@123
Above command mounts the shared folder to /mnt
STEP 3:
Now access the shared folder using cd /mnt ; ls -l

Friday, March 26, 2010

DHCP Server Configuration in UBUNTU

STEP 1:
Install the dhcp package
#apt-get install dhcp3-server
STEP 2:
DHCP server can be configured in two ways
i>Address Pool
ii>Mac Address

STEP 3:

Inorder to configure DHCP server 2 files has to be edited

i>/etc/default/dhcp3-server

ii>/etc/dhcp3/dhcpd.conf

Editing /etc/default/dhcp3-server

This file is edited inorder to show which network interface is been used for DHCP listening

Example:

Find this line INTERACES = "eth0" which will be default,Incase if your using different interface like eth1 or eth2 change eth0 to the interface we are using.

STEP 4:

How to edit /etc/dhcp3/dhcpd.conf

Using Address Pool method

default-lease-time 600;

max-lease-time 7200;

option subnet-mask 255.255.255.0;

option broadcast-address 192.168.1.255;

option routers 192.168.1.254 ; //default gateway being used

option domain-name-servers 192.168.1.1,192.168.1.2;

option domain-name "

subnet 192.168.1.0 netmask 255.255.255.0 {

192.168.1.10 192.168.1.200;

}

Using MAC Address method

This method can be used to reserve fixed IP address for machines depending on mac address

Add the following to the above mentioned

host server1{

hardware ethernet

fixed-address

}

STEP 5:

Restart DHCP service

#/etc/init.d/dhcp3-server restart

Also start the networking service

#/etc/init.d/networking restart


Thursday, March 25, 2010

How to set up linux as a ROUTER

Setting up Linux machine as a ROUTER
STEP 1:

Consider 2 interfaces: eth0 and eth1
eth0 //connecting to internet //Static IP assigned by ISP
eth1 //connexcting to LAN //Assigned Private ip 192.168.XXX.XXX
STEP 2:
Turn on ip forwarding
Edit /etc/sysctl.conf
Add the following
net.ipv4.ip_forward = 1
STEP 3:
Restart Network services by the following
#service network restart
STEP 4:
Set up IP forwarding and Masqerading by the following:
#iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
#iptables --append FORWARD --in-interface eth1 -j ACCEPT

STEP 4:
Assign the ipaddress of eth1 as the default gateway for the clients

Monday, March 22, 2010

Assign Static Ip in Ubuntu

STEP 1:
Add the following to the below mentioned file and save the file
Edit /etc/network/interfaces
iface eth0 inet static
address 192.168.1.16 //Any IP address
netmask 255.255.255.0
gateway 192.168.1.1
STEP 2:
Inorder to load the new configuration we need to restart the computer or
Try the below commands
ifdown eth0
ifup eth0