title: Cannot receive messages on subscriber VM (ZeroMQ on VirtualBox)
body: <p>I have two OpenWrt (18.06.4) VM's (A and B) in VirtualBox and I'm trying to send messages in a publisher-subscriber scheme using ZeroMQ. <strong>A</strong> is the server, <strong>B</strong> is the client.</p>
  
  <p>I'm using the following code:</p>
  
  <ul>
  <li><p>Publisher code: <a href="http://zguide.zeromq.org/c:psenvpub" rel="nofollow noreferrer">http://zguide.zeromq.org/c:psenvpub</a></p></li>
  <li><p>Subscriber code: <a href="http://zguide.zeromq.org/c:psenvsub" rel="nofollow noreferrer">http://zguide.zeromq.org/c:psenvsub</a></p></li>
  </ul>
  
  <p>and it works on my computer, so I decided to try it on the VMs.</p>
  
  <p>I had to compile both (using the SDK) so I can execute them in the VMs. I compiled two times, changing one minor detail:</p>
  
  <p><strong>1)</strong> client listening to the IP 10.0.1.4 of the server </p>
  
  <p><strong>2)</strong> client listening to the IP 192.168.56.10 of the server</p>
  
  <p>Both versions were tested in the VMs and in both, the server sends the messages (the send function executes and prints the message sent) but the client never receives any message (message is always null).</p>
  
  <p>About my network configuration. In VirtualBox, I have a Nat Network (10.0.1.0/24) and a virtualbox network (192.168.56.1/24). Both VM A and B have a host-only adapter (vboxnet0) and a NAT network adapter.
  The machines can ping each other.</p>
  
  <p>The network configuration of the machines is the following:</p>
  
  <p><strong>A</strong></p>
  
  <pre><code>config interface 'loopback'
      option ifname 'lo'
      option proto 'static'
      option ipaddr '127.0.0.1'
      option netmask '255.0.0.0'
  
  config globals 'globals'
      option ula_prefix 'fd03:84ea:bc33::/48'
  
  config interface 'lan'
      option ifname 'eth0'
          option proto 'static'
      option ipaddr '192.168.56.10'
      option netmask '255.255.255.0'
  
  config interface 'wan'
      option ifname 'eth1'
      option proto 'dhcp'
  </code></pre>
  
  <p><strong>Note:</strong> The NAT network IP ('wan') is currently 10.0.1.4</p>
  
  <p><strong>B</strong></p>
  
  <pre><code>config interface 'loopback'
      option ifname 'lo'
      option proto 'static'
      option ipaddr '127.0.0.1'
      option netmask '255.0.0.0'
  
  config globals 'globals'
      option ula_prefix 'fdea:4700:64aa::/48'
  
  config interface 'lan'
      option ifname 'eth0'
      option proto 'static'
      option ipaddr '192.168.56.20'
      option netmask '255.255.255.0'
  
  config interface 'wan'
      option ifname 'eth1'
      option proto 'dhcp'
  </code></pre>
  
  <p><strong>Note:</strong> The NAT network IP ('wan') is currently 10.0.1.5</p>
  
  <p>Do you guys have any idea what the problem might be? Should I change the network configuration inside each VM and/or change the adapters on VirtualBox?</p>