5

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 10.0.2.15 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 10.0.2.15 are closed instead of showing the expected open ports.

bigtunacan
  • 163
  • 1
  • 1
  • 5

3 Answers3

3

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: 10.0.2.15.

  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!

  • 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: https://superuser.com/questions/1095893/ipaddress-of-my-vm-doesnt-look-correct/1396375#answer-1396375 for a more secure setup. – Robert Brisita Jan 20 '19 at 19:46
1

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.

MiaoHatola
  • 2,284
  • 1
  • 14
  • 22
1

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

AR Osornio
  • 11
  • 1