NAT Network not issuing DHCP

Discussions related to using VirtualBox on Windows hosts.
Post Reply
porkosta
Posts: 3
Joined: 17. Nov 2022, 13:05

NAT Network not issuing DHCP

Post by porkosta »

Hi all,

Hoping someone can give me some insight into a issue I have been facing for couple days now and I can't work out the issue. I am trying to spin up a VM environment for some practice labs and pentesting.
The NAT Network has been created (in this case I have tried both 10.0.4.0/24 as well as 192.168.0.0/24, DHCP enabled on both and IPv6 disabled - No port forwarding set up. These subnets are completely different to my normal network.
When I have a VM network set to "NAT", it gets a IP address, I have internet access and I can not access any other IPs (both in virtualbox and local network) as expected. If I change the network to one of the "NAT Networks" I have created my VMs will not get a IP address at all.
NatNetworks
NatNetworks
NatNetworks.png (23.42 KiB) Viewed 4301 times
Kali
Kali
Kali Network.png (30.6 KiB) Viewed 4301 times
Machine specifics:
- Intel NUC gen10 i7
- Windows 11
- I have a fresh install of Virtual Box installed (Version 7.0.2 r154219 (Qt5.15.2)) with the extension pack (7.0.2r154219).
- Kali VM
- Win 8.1 VM
- D0Not5top VM

Has anyone encountered these issues or know a way to get this working?
Thank you in advance.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: NAT Network not issuing DHCP

Post by scottgus1 »

Did you by any chance start the VM on the NAT Network before changing the IP address range of the NAT Network?

Please run these commands in the host Command Prompt and post the outputs:

CD "C:\Program Files\Oracle\Virtualbox"
vboxmanage list dhcpservers
porkosta
Posts: 3
Joined: 17. Nov 2022, 13:05

Re: NAT Network not issuing DHCP

Post by porkosta »

scottgus1 wrote:Did you by any chance start the VM on the NAT Network before changing the IP address range of the NAT Network?

Please run these commands in the host Command Prompt and post the outputs:

CD "C:\Program Files\Oracle\Virtualbox"
vboxmanage list dhcpservers
Hi sorry for the delay. Please see the results below:

C:\Program Files\Oracle\VirtualBox>vboxmanage list dhcpservers
NetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
Dhcpd IP: 192.168.56.100
LowerIPAddress: 192.168.56.101
UpperIPAddress: 192.168.56.254
NetworkMask: 255.255.255.0
Enabled: Yes
Global Configuration:
minLeaseTime: default
defaultLeaseTime: default
maxLeaseTime: default
Forced options: None
Suppressed opts.: None
1/legacy: 255.255.255.0
Groups: None
Individual Configs: None

NetworkName: Nat10.0.2.0/24
Dhcpd IP: 10.0.2.3
LowerIPAddress: 10.0.2.4
UpperIPAddress: 10.0.2.254
NetworkMask: 255.255.255.0
Enabled: Yes
Global Configuration:
minLeaseTime: default
defaultLeaseTime: default
maxLeaseTime: default
Forced options: None
Suppressed opts.: None
1/legacy: 255.255.255.0
3/legacy: 10.0.2.1
6/legacy: 192.168.1.5
15/legacy: localdomain
Groups: None
Individual Configs: None

NetworkName: Nat192.168.0.0/24
Dhcpd IP: 192.168.0.3
LowerIPAddress: 192.168.0.4
UpperIPAddress: 192.168.0.254
NetworkMask: 255.255.255.0
Enabled: Yes
Global Configuration:
minLeaseTime: default
defaultLeaseTime: default
maxLeaseTime: default
Forced options: None
Suppressed opts.: None
1/legacy: 255.255.255.0
3/legacy: 192.168.0.1
6/legacy: 192.168.1.5
15/legacy: localdomain
Groups: None
Individual Configs: None

NetworkName: Nat10.0.4.0/24
Dhcpd IP: 10.0.4.3
LowerIPAddress: 10.0.4.4
UpperIPAddress: 10.0.4.254
NetworkMask: 255.255.255.0
Enabled: Yes
Global Configuration:
minLeaseTime: default
defaultLeaseTime: default
maxLeaseTime: default
Forced options: None
Suppressed opts.: None
1/legacy: 255.255.255.0
3/legacy: 10.0.4.1
6/legacy: 192.168.1.5
15/legacy: localdomain
Groups: None
Individual Configs: None
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: NAT Network not issuing DHCP

Post by fth0 »

I'd suggest to check on which network interface(s) the Kali Linux guest requests an IP address at all.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: NAT Network not issuing DHCP

Post by scottgus1 »

Also check on the names of your NAT Networks. The / in the names may be a problem. If so, you'll have to scrap the NAT Networks and make new ones without using /. Use only alphanumeric characters.
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: NAT Network not issuing DHCP

Post by fth0 »

scottgus1 wrote:Also check on the names of your NAT Networks. The / in the names may be a problem.
Good catch! :)

Now that you said it, I remember having seen such a problem a while ago: Re: Nat Network - VirtualBox 6.0 vs 6.1.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: NAT Network not issuing DHCP

Post by scottgus1 »

Yep, that's the one I was remembering.
porkosta
Posts: 3
Joined: 17. Nov 2022, 13:05

Re: NAT Network not issuing DHCP

Post by porkosta »

Thank you both, that was the issue.
Bit embarrassing that something so simple got me.
mcl1996
Posts: 6
Joined: 15. Jun 2022, 11:14

Re: NAT Network not issuing DHCP

Post by mcl1996 »

Hello, I also have the same problem, I have been debugging for a long time, but failed, and my nat network name does not contain "/".
Attachments
1670922001740_0001.jpg
1670922001740_0001.jpg (80.72 KiB) Viewed 3747 times
Post Reply