Is NAT Network what I want for this scenario?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
mmcap
Posts: 4
Joined: 5. Mar 2024, 04:45

Is NAT Network what I want for this scenario?

Post by mmcap »

I have an Ubuntu VM on a Windows host. I plan on using the VM to practice a SEIM tool called Wazuh. It requires that the VM would have a static IP address and I'm not sure if a static IP address can be assigned to the VM when using a NAT network.
Also, can I ping my host machine with my VM to test if they are communicating properly? If not, what is a test that would show that they can transfer information between themselves?
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Is NAT Network what I want for this scenario?

Post by BillG »

That depends on what other devices you need to connect with. Since Wazuh is some sort of security monitoring system, what devices are you going to be monitoring? Where are they? What network are they in?
Bill
mmcap
Posts: 4
Joined: 5. Mar 2024, 04:45

Re: Is NAT Network what I want for this scenario?

Post by mmcap »

Hi Bill
Thank you for your reply.
To start with I was only going to monitor the Windows event logs on my Windows host machine, but I plan to eventually expand and monitor all machines on my home network. As for your other questions the where and what are: all machines will be physically located in my home and all physical machines will be connected to the home network. I'm trying to understand how to be able to make all VMs and physical machines have the ability to communicate with each other.
Thanks
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Is NAT Network what I want for this scenario?

Post by BillG »

In that case I would simply bridge the vm to the ethernet adapter of the host. The vm will then behave just like an additional PC on your home network. If your home network has s DHCP server, it will receive its network config from that by default. I have been running vms like that on my home network for years without problems.

If the networking looks OK you can manually change the network config of the vm to a static IP - just change the IP to a different one in the same IP subnet but keep all the other settings the same. Just make sure the static IP you use in not the same as any PC running on the home network.
Bill
mmcap
Posts: 4
Joined: 5. Mar 2024, 04:45

Re: Is NAT Network what I want for this scenario?

Post by mmcap »

Hi Bill,
I changed the VM to bridged adapter. The internet connection worked fine, and I could ping my VM from my Windows host machine.
I need a static IP in order to use the Wazuh web dashboard, so I set the IPv4 to manual and then set the IP to one not being used by another machine X.X.X.26. I set the netmask to 255.255.255.0 and the gateway to X.X.X.1 but now Firefox doesn't seem to be connecting to the web even though it is the same IP assigned to the VM by the DHCP earlier and I can still ping the VM from the host machine.
Any thoughts on how to have functioning internet and have a static IP on the VM?
Norm
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Is NAT Network what I want for this scenario?

Post by BillG »

The first thing to do is try to ping a well-known public IP such as 4.2.2.2 or 8.8.8.8 from the vm with manual static IP setup. If the ping fails, there is something wrong with your manual IP config and you do not have Internet access from the vm.

If the ping succeeds, you have Internet access. If you cannot browse, the problem is probably DNS.
Bill
mmcap
Posts: 4
Joined: 5. Mar 2024, 04:45

Re: Is NAT Network what I want for this scenario?

Post by mmcap »

Here's and update.
The VM successfully works on the internet now and I can successfully ping the VM from my host machine. However, I cannot get a ping response from the host when I ping it from the VM. I whitelisted the VM IP and enabled ICMP on the windows host firewall but I still do not get a response from the host when pinging it from the VM. I want to make sure I have bidirectional communication before I set up the Wazuh instance. Any suggestions?
Post Reply