title: Exposing Azure IoT Edge EFlow ports to host machine(Windows)
body: <ol>
  <li>I have an API module running in the linux VM (as Iot Edge EFLOW) which is exposing certain port, let's take 8000. This module is the one which is taking the data and sending it to the other iot edge custom modules for processing before sending it to the iot hub.</li>
  <li>I have created 2 modules, 1 Web API (net6) and 1 CSharpModule(netcoreapp3.1, which comes out of the box when creating using VS Code).</li>
  <li>I deployed both the modules and they ran successfully and i was able to do a curl inside the linux kernel(EFlow kernel) with my REST calls.
  e.g
  <code>curl -XPOST -H &quot;Content-type: application/json&quot; -d '{ &quot;date&quot;:&quot;2022-04-19T11:17:06Z&quot;, &quot;temperature&quot;:&quot;10&quot;, &quot;pressure&quot;:&quot;120&quot;, &quot;batterylife&quot;:&quot;100&quot; }' 'http://localhost:8000/edgesensor'</code></li>
  </ol>
  <p>Now, the problem statement, I would like to call the same endpoint via my windows host and reach that port 8000, which is not happening and I getting a connection refused.</p>
  <p>The configurations I have for that API module is as below.</p>
  <pre><code>         &quot;createOptions&quot;: {
              &quot;ExposedPorts&quot;: {
                &quot;8000/tcp&quot;: {}
              },
              &quot;HostConfig&quot;: {
                &quot;PortBindings&quot;: {
                  &quot;8000/tcp&quot;: [
                    {
                      &quot;HostPort&quot;: &quot;8000&quot;
                    }
                  ]
                }
              }
            }
  </code></pre>
  <p>I have tried looking at the samples provided, like below github link for EFlow.</p>
  <p><a href="https://github.com/Azure/iotedge-eflow" rel="nofollow noreferrer">https://github.com/Azure/iotedge-eflow</a></p>
  <p>But this sample makes the iot edge act as a device gateway and the console app that is calling it as a child device.</p>
  <ol>
  <li><p>Is this the only way to connect to the EFlow IoT Edge device, that is to make it act as a gateway or can it be called in the manner I am trying to call?</p>
  </li>
  <li><p>Port forwarding is one such method as well. but is there something in the config that Azure IoT Edge module offers to do this, am I missing something ?</p>
  </li>
  </ol>
  <p>Any inputs appreciated.</p>
  <p>Cheers!</p>