nmap, virtualbox gateway and strange result

Discussions about using Linux guests in VirtualBox.
Post Reply
kappa
Posts: 1
Joined: 22. Oct 2019, 17:57

nmap, virtualbox gateway and strange result

Post by kappa »

Hi,
I have a Linux Kali guest inside a virtualbox network.

The network is set as "NAT Network" with 192.168.1.0/24 as CIDR.
The DHCP is disabled and default gateway (using the command "ip route") is 192.168.1.1

With Kali I'm using nmap on the ip "10.10.10.10" and I expect that IP is not reachable but really I have different results everytime I run it.

Sometimes I received this:

Code: Select all

root@kali:~# nmap 10.10.10.10
Starting Nmap 7.80 at 2019-10-22 13:02 IST
Nmap scan report for 10.10.10.10
Host is up (0.0016s latency).
Not shown: 994 filtered ports
PORT    STATE SERVICE
25/tcp  open  smtp
110/tcp open  pop3
143/tcp open  imap
587/tcp open  submission
993/tcp open  imaps
995/tcp open  pop3s

Nmap done: 1 IP address (1 host up) scanned in 5.52 seconds
And sometimes

Code: Select all

root@kali:~# nmap 10.10.10.10
Starting Nmap 7.80 at 2019-10-22 13:02 IST
Nmap scan report for 10.10.10.10
Host is up (0.00024s latency).
All 1000 scanned ports on 10.10.10.10 are filtered

Nmap done: 1 IP address (1 host up) scanned in 4.27 seconds
Because it's located in a different subnet, I supposed it's routed using the default gateway, but I know it's not the gateway itself because if I scan the gateway (nmap 192.168.1.1) it gives me back only the port 53 open

Code: Select all

root@kali:~# nmap 192.168.1.1
Starting Nmap 7.80 at 2019-10-22 13:02 IST
Nmap scan report for 192.168.1.1
Host is up (0.000083s latency).
Not shown: 999 closed ports
PORT   STATE SERVICE
53/tcp open  domain
MAC Address: 52:54:00:12:35:00 (QEMU virtual NIC)

Nmap done: 1 IP address (1 host up) scanned in 0.27 seconds
Where the result of 10.10.10.10 come from?
How can I check that?
Why is it different time to time?

Thanks
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: nmap, virtualbox gateway and strange result

Post by scottgus1 »

NAT & NAT network let your guest out onto the internet. I have a vague recollection of someone successfully pinging something on 10.#.#.# on a Windows guest, where there was no 10.any.th.ing in their LAN, and the idea arose that someone had a misconfigured IP address on the internet somewhere, and the ping was finding it.

Try disconnecting your host or LAN from the router and see if you can still nmap 10.10.10.10?
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: nmap, virtualbox gateway and strange result

Post by fth0 »

You didn't tell us much about the host: What OS is running on the host? What is the IP configuration of the host?

The latency values for 10.10.10.10 are quite small, so it could be the host itself or a device on the local LAN.
Post Reply