title: Docker Swarm container reachable although port is not open?
body: <p>I followed these instructions <a href="https://www.digitalocean.com/community/tutorials/how-to-create-a-cluster-of-docker-containers-with-docker-swarm-and-digitalocean-on-ubuntu-16-04" rel="nofollow noreferrer">here</a> to build a 3 node Docker Swarm cluster. </p>
  
  <p>In the beginning I opened multiple ports with <code>ufw</code> in order to communicate between the docker nodes:</p>
  
  <pre><code># ufw status verbose
  Status: active
  Logging: on (low)
  Default: deny (incoming), allow (outgoing), deny (routed)
  New profiles: skip
  
  To                         Action      From
  --                         ------      ----
  22/tcp                     ALLOW IN    Anywhere                  
  2376/tcp                   ALLOW IN    Anywhere                  
  2377/tcp                   ALLOW IN    Anywhere                  
  7946/tcp                   ALLOW IN    Anywhere                  
  7946/udp                   ALLOW IN    Anywhere                  
  4789/udp                   ALLOW IN    Anywhere                  
  22/tcp (v6)                ALLOW IN    Anywhere (v6)             
  2376/tcp (v6)              ALLOW IN    Anywhere (v6)             
  2377/tcp (v6)              ALLOW IN    Anywhere (v6)             
  7946/tcp (v6)              ALLOW IN    Anywhere (v6)             
  7946/udp (v6)              ALLOW IN    Anywhere (v6)             
  4789/udp (v6)              ALLOW IN    Anywhere (v6)
  </code></pre>
  
  <p>As you can see port 80 is <strong>not</strong> open.</p>
  
  <p>So, at the end of the tutorial I deployed the official nginx docker image to the cluster:</p>
  
  <p><code>docker service create -p 80:80 --name webserver nginx</code></p>
  
  <p>I was able to enter the IP address of my server and was presented the nginx hello world page.</p>
  
  <p>Now I am wondering, why am I able to reach the webserver although port 80 is not open?</p>