VM NAT Private IP Address

Griev0us4

New Member
Joined
Jun 4, 2022
Messages
8
Reaction score
1
Credits
94
I'm using Virtual Box kali linux using network NAT, and I'm trying to do nmap scan, however something is wrong. By using ifconfig, I saw that my IP address first octet is 10.0.2.***, but its netmask is 255.255.255.0. That's doesn't make any sense. If its netmask is that value, then it should be using class C 192.168.1.*** All nmap results are ignored status.

Using netdiscover, there are only 3 results, but they make no sense too, because their last octet are just .....2, 3, and 4.

This could be relevant, but I did read about using an external wifi adapters for virtual machine. However, I don't think "currently" it have anything to do with my virtual machine having mismatch address & netmask.

Edit: I used wireshark, and it seem there is no [SYN, ACK] and [ARK]. Just [SYN], [TCP retransmission], and [RST, ACK]. I'm not sure why it deliver the same package twice, but I'm sure it because it related to the main problem I have.
 
Last edited:


With the Network and mask listed you would expect to see a class C address space of 10.0.2.1 - 10.0.2.254. Not sure the nature of your NAT configuration but sounds like you have no return path. I say this as you see SYN going out but the rest of the handshake is missing. This tells me that either SYN isn't making it to the remote end, Syn is being ignored by the remote end or there is no route for the return path. I'm guessing the most likely is that there is something about your NAT configuration or a routing issue. If you could give a bit more information on your network topology I could give you more ideas on how to resolve.
 
First of all your network is CIDR, (classless network) that means that you can use any range of IPs with /24 mask (or whatever mask you wish).
Now, the reason you only see three hosts is bcz your Kali VM searching ONLY inside the virtual network and NOT your home/office LAN.
If you want to scan your real LAN you need an external wifi adapter, (preferable one that can run in both monitor and search mode).
There is a way to install external USB devises into VMs. If you need I can recoment to you some resources.
 
CIDR is simply just another notation style. For example...

255.255.255.0 = /24 in CIDR
255.255.255.128 = /25

In VirtualBox, if you want your network to be the same subnet as your host system
changed the 'NAT' network setting to 'Bridged'.
 
Virtual Box has two type of network adaptor for NAT features.

- NAT (10.0.3.1 - 10.0.3.254)
- NAT Network (10.0.2.1 - 10.0.2.254)

Both are /24 and having the different functionality and working. Please don't get confused with Network Classes here. This is something Virtual Box implemented and you cannot override the behavior. When you look into the Host OS , where you installed virtualbox, you are not seeing any NAT interface there because it is controlled at Kernel Layer by virtualbox .ko module.

If you want to setup the desired behavior, please go with "Host Only Adaptor" and then enable IPv4/IPv6 forwarding on Host OS and get the desired result.

1.JPG


2.JPG




Let me know if you need any help further.
 

Members online


Top