HAProxy running on VirtualBox headless fails with Windows firewall on

Discussions related to using VirtualBox on Windows hosts.
Post Reply
ZillaG
Posts: 5
Joined: 26. Mar 2022, 02:13

HAProxy running on VirtualBox headless fails with Windows firewall on

Post by ZillaG »

To overcome the NGINX 1024 connection issue on Windows, we've implemented a CentOS-based VrtualBox VM running HAProxy in headless mode to act as a load balancer among multiple NGINX services. When running in headless mode, we can't connect to our website running locally on the Windows machine (not the VirtualBox VM). When running in normal mode, we can. I've put VBoxHeadless.exe in the firewall to no avail. If I turn Windows firewall off, it works, but of course we don't want to do that. Anything else I can look for? Thanks.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: HAProxy running on VirtualBox headless fails with Windows firewall on

Post by scottgus1 »

ZillaG wrote:When running in headless mode, we can't connect to our website running locally on the Windows machine (not the VirtualBox VM). When running in normal mode, we can.
This seems a puzzle. Why would the VM runner make a difference in network comms? It shouldn't.
ZillaG wrote:If I turn Windows firewall off, it works
This means Firewall is interfering somehow, not the Virtualbox VM runner.
ZillaG wrote:I've put VBoxHeadless.exe in the firewall
Shouldn't have to do this. Virtualbox just works with Windows Firewall, no tweaking needed. I suspect unnecessary firewall rules.

Without more info about what IP addresses and ports are being used, what network type the VM is using, what firewall rules have been added, etc., we wouldn't be able to guess accurately.

Right-click the VM in the main Virtualbox window's VM list, choose Show in Explorer/Finder/File Manager. Zip the VM's .vbox file (not the .vbox-prev file), and post the zip file, using the forum's Upload Attachment tab. (Configure your host OS to show all extensions if the folder that opens does not show a .vbox file.)

In the Windows OS, open a Command Prompt and run ipconfig /all. Post the command output. Label which is which.

In the Linux OS, open a Terminal and run ifconfig or ip address. Post the command output.

In both host and VM OS's, ping 8.8.8.8. Post the command output. Label which is which.
ZillaG
Posts: 5
Joined: 26. Mar 2022, 02:13

Re: HAProxy running on VirtualBox headless fails with Windows firewall on

Post by ZillaG »

Thanks for responding @scottgus1. The VM was being used so it took me awhile to get the info. I don't have the login info to the VBox VM, but will post the info you requested once I get it. But here's the rest.

On Windows host

Code: Select all

> ipconfig /all

Ethernet adapter Ethernet1:

   Connection-specific DNS Suffix  . : company.com
   Description . . . . . . . . . . . : vmxnet3 Ethernet Adapter
   Physical Address. . . . . . . . . : 00-50-56-90-FB-A8
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 10.227.26.83(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.128
   Lease Obtained. . . . . . . . . . : Saturday, April 2, 2022 12:18:16 PM
   Lease Expires . . . . . . . . . . : Wednesday, April 6, 2022 12:18:16 AM
   Default Gateway . . . . . . . . . : 10.227.26.1
   DHCP Server . . . . . . . . . . . : 10.227.21.8
   DNS Servers . . . . . . . . . . . : 4.4.2.2
                                       8.8.4.4
   NetBIOS over Tcpip. . . . . . . . : Enabled


Ethernet adapter VirtualBox Host-Only Network:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : VirtualBox Host-Only Ether
   Physical Address. . . . . . . . . : 0A-00-27-00-00-0E
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 192.168.56.1(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :
   NetBIOS over Tcpip. . . . . . . . : Enabled

> ping 8.8.8.8
Pinging 8.8.8.8 with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=14ms TTL=115
Reply from 8.8.8.8: bytes=32 time=15ms TTL=115
Reply from 8.8.8.8: bytes=32 time=14ms TTL=115
Reply from 8.8.8.8: bytes=32 time=15ms TTL=115

Ping statistics for 8.8.8.8:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 14ms, Maximum = 15ms, Average = 14ms
Attachments
haproxy-vm.zip
(1.67 KiB) Downloaded 2 times
Post Reply