When U install VirtualBox and need to connect to your Guest box with an IP in the same range that you using not the range that VirtuaBox (Which using DHCP and you Host box acts like the DHCP Server for the guest boxes different range and the actual IP of the guest box is the same of your host box ip).
If you have the same problem so this is the how to you looking for :D.
Let's Start First you have to install VirtualBox :p if u did not install it it's simple.
sudo apt-get install virtualboxNow let's go the real work :o :)
sudo apt-get install uml-utilities bridge-utils
Step 2
Create a TAP Interface
sudo tunctl -t tap1 -u usernameand username is your username (eg. in my case it's bahaa)
sudo tunctl -t tap1 -u bahaa
sudo brctl addbr br0as br0 is the bridge interface name (you can name it as u like)
sudo ifconfig eth0 0.0.0.0 promisc
sudo brctl addif br0 eth0
sudo dhclient br0Or, if you assign an IP yourself
sudo ifconfig br0 192.168.0.100
sudo brctl addif br0 tap1
sudo ifconfig tap1 up
sudo route add default gw 192.168.0.1 br0Where 192.168.0.1 is your gateway ip (eg. router ip in most cases).
sudo chmod 0666 /dev/net/tun
iface eth0 inet static
address 192.168.0.101
netmask 255.255.255.0
gateway 192.168.0.1
network 192.168.0.0
dns-nameservers 208.67.222.222 208.67.220.220
Step 13
Now, you can connect to the guest OS by its IP in VirtualBox.
When you reboot your guest OS, you need to repeat the Step 2 to 10 to Again. Or, you can create a executable script to make your job easy.
Have fun :D
BTW I'm using this way and it works with me in Ubuntu 9.04.