title: OWIN service is not visible from network
body: <p>I created C# console application using <code>OWIN</code> and I have issue with visibility of application outside of localhost. For example if I made POST request with localhost in URL everything works fine, but when I replace URL in postman to my global IP address it stopped working. Port is opened, I can ping server from external computer. Earlier application based on IIS worked fine on this port with this global ip adress and port.</p>
  
  <pre><code>_webApp = WebApp.Start&lt;StartOwin&gt;("http://localhost:8511");
  </code></pre>
  
  <p>Line above should contains my global IP or it can be localhost with specific port?</p>
  
  <p>Full code:</p>
  
  <pre><code>public class Program
      {
          public static int Main(string[] args)
          {
              return (int)HostFactory.Run(x =&gt;
              {
                  x.StartAutomatically();
                  x.Service&lt;OwinService&gt;(s =&gt;
                  {
                      s.ConstructUsing(() =&gt; new OwinService());
                      s.WhenStarted(service =&gt; service.Start());
                      s.WhenStopped(service =&gt; service.Stop());
                  });
              });
          }
      }
  
      public class OwinService
      {
          private IDisposable _webApp;
  
          public void Start()
          {
              _webApp = WebApp.Start&lt;StartOwin&gt;("http://localhost:8511");
          }
  
          public void Stop()
          {
              _webApp.Dispose();
          }
      }
  
      public class StartOwin
      {
          public void Configuration(IAppBuilder appBuilder)
          {
              var config = new HttpConfiguration();
  
              config.MapHttpAttributeRoutes();
              config.Routes.MapHttpRoute(
                  name: "DefaultApi",
                  routeTemplate: "api/{controller}/{action}/{id}",
                  defaults: new { id = RouteParameter.Optional }
                  );
  
              appBuilder.UseWebApi(config);
          }
      }
  </code></pre>
  
  <p><strong>#UPDATE</strong>
  I have changed port for application to 8512, fully unlocked this port and made following POST requests:</p>
  
  <ul>
  <li><a href="http://localhost:8512" rel="nofollow noreferrer">http://localhost:8512</a> works fine</li>
  <li><a href="http://127.0.0.1:8512" rel="nofollow noreferrer">http://127.0.0.1:8512</a> doesn't work</li>
  <li><a href="http://my_global_address:8512" rel="nofollow noreferrer">http://my_global_address:8512</a> doesn't work</li>
  </ul>
  
  <p><strong>#UPDATE2</strong></p>
  
  <p>After setting 
  <code>_webApp = WebApp.Start&lt;StartOwin&gt;("http://*:8511");</code>
  and <strong>turning off whole firewall</strong> it works as expected, so it's network issue (serverfault.com)</p>
  
  <p><strong>SOLUTION</strong></p>
  
  <p><code>_webApp = WebApp.Start&lt;StartOwin&gt;("http://*:8511");</code>
  and add new firewall rule (allow inbound) for executable of this application</p>