I hope I’m posting in the right place. So, I have a question. I’m trying to set up a simple network monitor (Zabbix) in VirtualBox to monitor the hosting machine. I have everything set up, but the Zabbix server cannot ping the host machine that it’s also running on top of. I would think you could have simultaneous two-way communication going but I’ve hit a roadblock. First, I downloaded the 6.0 LTS .ovf Zabbix client from the Zabbix site (this is a pre-configured VM with RedHat as the base OS that the Zabbix server runs on). Configured everything through the initial setup steps and now the server is unable to ping the host which is also hosting the server in VirtualBox. I would think that since they have two separate IP's the Zabbix server would be able to ping the host like any other host on the same network. Both have static IP addresses assigned to them. I have attached images of the settings; my end goal is to have a couple of hosts set up so I can monitor network issues in one of our offices. image
First of all, it looks like traffic can go from your physical machine to the VM but not back. this is because accessing zabbix on 192.168.130.204 works, but you can't ping back your host.
Just to be sure, it looks like 192.168.130.166 is the IP of your physical machine, to be sure, please run the following command lines (and ideally attach here here) for windows: ipconfig for linux: ifconfig regardless of the os you should have a network device on your physical machine that have the address 192.168.130.166
Since you are using a bridged adapter, I believe you have the following problem: Bridged adapter means that your physical network device is shared between the VM and the Physical machine as if they were connected side by side on the same switch, and the switch is connected to your router. So from your physical machine perspective, traffic coming from the VM is like any other traffic from your home network. and most likely this is blocked by your firewall.
to solve it I see two options:
- If the only machine that will ever use this zabbix server is the physical machine, it would be simpler to use "NAT" instead of "Bridged networking", this way your phsyical machine will have a static internal IP (connected directly to the VM) and probably less firewall protection of this device by default.
- Note that you will probably need to also change the IP of the VM to the internal interface subnet or use DHCP (automatic IP) on your VM
- Even in this configuration you may still need to make firewall changes, but because this is an internal interface, you can just let any traffic from your local host or even disable the VM firewall, depends how secured you need your solution to be
- If you need the VM accessible on your LAN or from the internet or you have some other reason to use Bridged networking, check your firewall settings on the same device that have the .166 IP, this device should at least allow these kind of traffic:
- ICMP traffic from source IP 192.168.130.166 (for incoming ping)
- TCP traffic from source IP 192.168.130.166 to your 10500 port (this is the default zabbix agent port AFAIK, change it if you are using a different port)
Generally speaking, there are solutions for both using bridged and NAT networking, the best choice depends on what you are trying to achieve.