title: failed (113: No route to host) while connecting to upstream
body: <p>I want using nginx make reverse proxy(docker container). However, there have been some exceptions.</p>
  
  <strong><em>issue context</em></strong>
  
  <ul>
  <li>Centos version: 7.4.1708</li>
  <li>nginx version: 1.13.12</li>
  <li>docker version: 1.13.1</li>
  </ul>
  
  <h3>Open firewall and exposed 80 port</h3>
  
  <ul>
  <li>nginx reproxy on docker container: failed (113: No route to host) while connecting to upstream</li>
  <li>nginx reproxy on host: function normal</li>
  </ul>
  
  <p><strong><em>nginx configuration:</em></strong></p>
  
  <pre><code>server
  {
      listen 80;
      server_name web.pfneo.geo;
      location / {
          proxy_redirect off;
          proxy_set_header Host $host;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_pass http://172.18.0.249:88;
      }
      access_log logs/web.tk_access.log;
  }
  </code></pre>
  
  <h3>close the firewall</h3>
  
  <ul>
  <li>nginx reproxy on docker container: function normal</li>
  <li>nginx reproxy on host: function normal</li>
  </ul>
  
  <h3>Open firewall not expose port</h3>
  
  <ul>
  <li>nginx app service on docker container（88 port）: function normal</li>
  </ul>
  
  <blockquote>
    <p>It seems that this problem is caused by docker?</p>
    
    <p>Docker can ignore the host firewall?</p>
  </blockquote>