Page 1 of 1

Is NAT Network what I want for this scenario?

Posted: 6. Mar 2024, 04:09
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?

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

Posted: 8. Mar 2024, 05:52
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?

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

Posted: 9. Mar 2024, 17:55
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

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

Posted: 12. Mar 2024, 07:00
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.

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

Posted: 16. Mar 2024, 23:59
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

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

Posted: 19. Mar 2024, 03:44
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.

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

Posted: 8. Apr 2024, 13:16
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?