Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm supposed to try and use kali to do exploits on metasploitable, but I'll burn that bridge when I get there. My question right now is:

How do I set up a host only network on virtualbox? I heard that it was unsafe to run metasploitable in bridged networking mode, that host only or NAT is better. When I run metasploitable on NAT, the kali box (attacker) has the same ip address as the metasploitable box, and nmap doesn't really return anything except what I can only assume would be a scan of its own ports?

I tried to create a host only network in virtual box. I left the adapter settings at the default, and unchecked DHCP server. now when I run ifconfig on the metasploitable box, there is no ip address listed. Am I setting up/connecting to/not configuring the host only network correctly?

share|improve this question
Also, if my problem is too basic and you don't feel its beneficial to answer it, so be it but please at least give me a link or something to google before you downvote it – SetSlapShot Oct 5 '13 at 20:51
up vote 2 down vote accepted

You'll have to check the DHCP server option if you want IP addresses to be automatically assigned. Set the server IP and range to something in the same subnet as the virtual host adapter's address.

See this answer for an example.

Then select "Host-only adapter" in the settings for the individual VM's network adapter.

share|improve this answer
This will create a new network interface which will look like "vboxnet0" and the network it will use for DHCP is – hololeap Oct 5 '13 at 22:56
Thank you much. Somewhere I had read not to check DHCP box, but yeah turns out thats wrong. Works like a charm! – SetSlapShot Oct 5 '13 at 23:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .