follow these steps
- go to virtual box
- Click on the network that you see on the right hand side
- select host network interface
- Now start the machine
- After coming to the prompt give the following commands:
- ifconfig <ethernet card name> plumb
- ifconfig <ethernet card name> dhcp
This will take IP address from the internet. And will be in the same subnet as your host machine. I hope this helps. Let me know if it works