title: problem solving service name in a docker swarm deployed over ssh and remote port forwarding
body: <p>Hello docker swarm gurus!</p>
  <p>I need your help today please.</p>
  <p>I am facing some issue trying to deploy a swarm between a manager on a machine A and a worker on a machine B reached via ssh. The challenge here is that the machine B can only be reached via ssh through a vpn, so every communication with machine A has to happen via the VPN link using ssh port forwarding</p>
  <p>I was able to build the swarm properly but when ever a service spawns a replica on the machine B, the container cannot connect to other services in the swam as if the dns or the swarm routing mesh was not properly forwarded on the machine B.</p>
  <p>to set up my swarm from A where the swarm manager is running, I forwarded the port 2377, 7946 and 4789</p>
  <pre><code>machine-A$ ssh -R 2377:localhost:2377 -R 7946:localhost:7946 -R 4789:localhost:4789 machine-B
  </code></pre>
  <p>from there I was able to join the swarm</p>
  <pre><code>machine-B$ swarm join --token xxxxx localhost:2377
  </code></pre>
  <p>I am able to start services on both machines A and B and they do show in the swarm as running..... but..... the issue is when I search accessing to some service from another container running. only services spawned on node A can ping each other. any service hosted on B does not respond to ping. and in any container running on machine B, they cannot ping any service running either on B or A....</p>
  <p>I checked /etc/resolv.conf in container on B, and it reads:</p>
  <pre><code>search mydomain.local
  nameserver 127.0.0.11
  options ndots:0
  </code></pre>
  <p>127.0.0.11 answers to the ping, but a ping to any other services returns</p>
  <pre><code>ping: &lt;service_name&gt;: Name  or service not known
  </code></pre>
  <p>Any idea of what I am missing?</p>
  <p>Is there any specific more to do to configure the swarm routing mesh properly?</p>
  <p>thanks for any suggestion</p>
  <p>Sam.</p>