title: How do I enable Nginx Proxy Manager on a macvlan Docker network to successfully redirect to Synology DSM on the host?
body: <p>I'm running the full htpc suite (Sonarr / Radarr / Plex etc) on a Synology NAS, with <a href="https://github.com/jc21/nginx-proxy-manager" rel="nofollow noreferrer">Nginx Proxy Manager</a> successfully redirecting from personal sub-domains to containerised services, e.g.:</p>
  <ul>
  <li><code>plex.domain.com</code> -&gt; Plex @ <code>192.168.0.10</code></li>
  <li><code>ombi.domain.com</code> -&gt; Ombi @ <code>192.168.0.11</code></li>
  </ul>
  <p>All of my containers are defined in docker-compose, using <code>macvlan</code> in order to have an IP per service. This works great on all fronts (about 15  different services), with the exception of connecting to the NAS admin itself. After defining an Nginx Proxy Manager proxy-host to redirect to the NAS admin, any request is always met with a <code>502</code>, served by Nginx Proxy Manager.</p>
  <p>Example docker-compose network and service definitions are as follows (Docker version 18.09.0-0519):</p>
  <pre><code>...
  
  networks:
    internal_net:
      driver: macvlan
      driver_opts:
        parent: ovs_eth0
      ipam:
        config:
          - subnet: 192.168.0.0/24
  
  nginx-proxy-manager:
    image: jc21/nginx-proxy-manager:latest
    hostname: nginx-proxy-manager
    domainname: domain.com
    networks:
      internal_net:
        ipv4_address: 192.168.0.50
    ...
  
  plex:
    image: ghcr.io/linuxserver/plex
    hostname: plex
    domainname: domain.com
    networks:
      trackness_net:
        ipv4_address: 192.168.0.10
    ...
  </code></pre>
  <p>With the Nginx Proxy Manager proxy-host pointing <code>dsm.domain.com</code> to <code>192.168.0.&lt;nas-ip&gt;:5000</code> (and having tried <code>80</code>, <code>443</code>, and <code>5001</code> out of desperation), the result is always the same: <code>502</code>.</p>
  <p>From what I've been able to determine, this is due to a macvlan network being unable to connect to the host, which leaves me in a pickle. I can't imagine I'm the only person to ever shoot for this setup or one similar; can anyone help? How do I enable Nginx Proxy Manager on <code>macvlan</code> to communicate with <code>192.168.0.&lt;nas-ip&gt;:5000</code>?</p>