I have setup a fresh VirtualBox install of both Kali Linux and Metasploitable. I did an ifconfig on the Metasploitable VM and tried to access it through the browser, but that gives the message The page isn’t working

From Kali I am able to successfully ping the Metasploitable VM, but can't access the web server. When I run nmap it reports All 65536 scanned ports on are closed instead of showing the expected open ports.

  • This is not a security, a metasploitable, or Kali question. This is a VM network config question. – schroeder Oct 4 '18 at 8:08

The problem is that Kali's nmap is trying to scan your HOST system instead of metasploitable. This is the only solution that worked for me, hope it helps you, as I also had a inet addr:

  1. Click on Metasploitable in VB

  2. Click settings

  3. Select network

  4. Change NAT to Bridged Adapter

  5. Repeat with Kali

  6. Enjoy a working nmap!

| improve this answer | |
  • To add, you will need to obtain a new IP address on the Metasploitable. – multithr3at3d Jun 30 '17 at 20:57
  • In my instance, I did not have to. It assigned it dynamically after I changed the adapter to bridged – Jamie Jackson Jun 30 '17 at 23:18
  • I down voted because you don't want to expose a Metasploitable instance to the outside world. Please see my answer here: superuser.com/questions/1095893/… for a more secure setup. – Robert Brisita Jan 20 '19 at 19:46

I have some experience with VirtualBox simply not working as it should. I believe there are some bugs in their network simulation. Sometimes simple things stop working and just random reboots, fiddling, or simply time fix the problem.

First, try to update VirtualBox, it has solved some of my problems in the past.

Second, when all else fails, what I use for test labs similar to what you require is an OpenBSD VM running PFSense, and running an internal network that it manages. If you are interested, there is a great (but somewhat outdated) guide here. Be ready to look for alternate instructions (mainly PFSense related) that have changed since the guide was written.

| improve this answer | |

The problem for me was that the ip config for metasploitable and kali were the same. Fix: Make sure both machines are off / create new nat network / switch both machines to new nat network // this should change the ip address of at least one machine and fix the problem

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.