[GH-ISSUE #5404] Reverse Proxy: Not Working after following official migration guide, proxy container shows errors. #11368

Open
opened 2026-08-05 01:29:28 -04:00 by saavagebueno · 14 comments
Owner

Originally created by @NopeNix on GitHub (Feb 20, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5404

Describe the problem
I have upgraded my already existing multi container deployment of netbird to 0.65.3 (i have used traefik all along.) initial installation has been done via the official install script. i followed the Official Migration Guide and after that it did not work, my configured domain showed up in the reverse proxy there are errors in the Logs of the netbird netbirdio/reverse-proxy container which show the following:

WARN client/internal/profilemanager/service.go:360: failed to get active profile state: failed to set default active profile state: failed to set active profile to default: failed to write active profile state: create temp: open /var/lib/netbird/.3084520997active_profile.json: permission denied
ERRO shared/signal/client/grpc.go:70: failed to connect to the signalling server: context canceled
ERRO client/internal/connect.go:561: error while connecting to the Signal Exchange Service ***************:443: context canceled
ERRO client/internal/connect.go:269: rpc error: code = FailedPrecondition desc = failed connecting to Signal Service : context canceled

i can confirm that ***************:443 is reachable from the container.

Additional Checks done / Tries

  • checked that the service i configured is reachable from the netbird proxy container
  • checked signal and management server for errors in log -> no errors
  • removed the proxy container and its config a couple of times and redone it
  • checked file rights on proxy.env
  • tried to temporary sketchy hack arround the first errrormessage by firing: docker compose down proxy && docker compose up proxy -d && docker exec -u 0:0 -it netbird-proxy chown -R 1000:1000 /var/lib/netbird/ that indeed got rid of the error, the file was also created but the errormessages about the signal server still remained
  • updated docker engine to latest stable
  • restarted my whole server
  • checked if the service is reachable from the netbird proxy, which it is. (tested the url which is shown in netbird -> services (under destination))

To Reproduce

Steps to reproduce the behavior:

  1. Upgrade already existing multi Container instance to the now latest version 0.65.3.
  2. verify that everything works.
  3. follow the Official Migration Guide.
  4. after finising this, add a Serviceunder Netbird Management -> Service check if the domain you have configured shows up there (which indicates that there has been communication between the proxy and the management plain?)
  5. From here on a i have a inconsistent state without changing any settings and just by restarting the netbird proxy container a couple of times:
  6. A) netbird error message is show that the proxy is not reachable
    B) netbird errormessage is shown that the service is not reachable but proxy is
    C) timeout, no answer from server

since a couple of restarts i am stuck with the timeout nothing changes anymore, DNS has been tripplechecked seems not to be the problem. i was not able to capture log output from the former runs where at least a error showed up.

Expected behavior

no errormessages and the service i have choosen shows up

Are you using NetBird Cloud?

No

NetBird version

0.65.3

Is any other VPN software installed?

No

Have you tried these troubleshooting steps?

  • Reviewed client troubleshooting (if applicable)
  • Checked for newer NetBird versions
  • Searched for similar issues on GitHub (including closed ones)
  • Restarted the NetBird client
  • Disabled other VPN software
  • Checked firewall settings
Originally created by @NopeNix on GitHub (Feb 20, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5404 **Describe the problem** I have upgraded my already existing multi container deployment of netbird to `0.65.3` (i have used traefik all along.) initial installation has been done via the official install script. i followed the [Official Migration Guide](https://docs.netbird.io/selfhosted/migration/enable-reverse-proxy) and after that it did not work, my configured domain showed up in the reverse proxy there are errors in the Logs of the netbird netbirdio/reverse-proxy container which show the following: ``` WARN client/internal/profilemanager/service.go:360: failed to get active profile state: failed to set default active profile state: failed to set active profile to default: failed to write active profile state: create temp: open /var/lib/netbird/.3084520997active_profile.json: permission denied ERRO shared/signal/client/grpc.go:70: failed to connect to the signalling server: context canceled ERRO client/internal/connect.go:561: error while connecting to the Signal Exchange Service ***************:443: context canceled ERRO client/internal/connect.go:269: rpc error: code = FailedPrecondition desc = failed connecting to Signal Service : context canceled ``` i can confirm that ***************:443 is reachable from the container. **Additional Checks done / Tries** - checked that the service i configured is reachable from the netbird proxy container - checked signal and management server for errors in log -> no errors - removed the proxy container and its config a couple of times and redone it - checked file rights on proxy.env - tried to temporary sketchy hack arround the first errrormessage by firing: `docker compose down proxy && docker compose up proxy -d && docker exec -u 0:0 -it netbird-proxy chown -R 1000:1000 /var/lib/netbird/` that indeed got rid of the error, the file was also created but the errormessages about the signal server still remained - updated docker engine to latest stable - restarted my whole server - checked if the service is reachable from the netbird proxy, which it is. (tested the url which is shown in netbird -> services (under destination)) **To Reproduce** Steps to reproduce the behavior: 1. Upgrade already existing multi Container instance to the now latest version `0.65.3`. 2. verify that everything works. 3. follow the [Official Migration Guide](https://docs.netbird.io/selfhosted/migration/enable-reverse-proxy). 4. after finising this, add a Serviceunder Netbird Management -> Service check if the domain you have configured shows up there (which indicates that there has been communication between the proxy and the management plain?) 6. From here on a i have a inconsistent state without changing any settings and just by restarting the netbird proxy container a couple of times: 7. A) netbird error message is show that the proxy is not reachable B) netbird errormessage is shown that the service is not reachable but proxy is C) timeout, no answer from server since a couple of restarts i am stuck with the timeout nothing changes anymore, DNS has been tripplechecked seems not to be the problem. i was not able to capture log output from the former runs where at least a error showed up. **Expected behavior** no errormessages and the service i have choosen shows up **Are you using NetBird Cloud?** No **NetBird version** `0.65.3` **Is any other VPN software installed?** No **Have you tried these troubleshooting steps?** - [x] Reviewed [client troubleshooting](https://docs.netbird.io/how-to/troubleshooting-client) (if applicable) - [x] Checked for newer NetBird versions - [x] Searched for similar issues on GitHub (including closed ones) - [x] Restarted the NetBird client - [ ] Disabled other VPN software - [x] Checked firewall settings
saavagebueno added the triage-needed label 2026-08-05 01:29:28 -04:00
Author
Owner

@micudaj commented on GitHub (Feb 20, 2026):

I have exactly the same behavior

<!-- gh-comment-id:3937535577 --> @micudaj commented on GitHub (Feb 20, 2026): I have exactly the same behavior
Author
Owner

@NopeNix commented on GitHub (Feb 22, 2026):

Update:
after restarting my system again and applying docker updates the proxy container shows some new errors:

2026-02-22T11:14:12.826Z ERRO shared/management/client/grpc.go:516: failed to login to Management Service: rpc error: code = PermissionDenied desc = no peer auth method provided, please use a setup key or interactive SSO login
2026-02-22T11:14:12.829Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d6dea12adcqs73ev74c0 client_ip=10.0.50.7 method=GET host=192.168.198.195:2020 path=/.env status=502 title="Proxy Not Connected" err=client start failed: login: rpc error: code = InvalidArgument desc = invalid setup-key or no sso information provided, err: invalid UUID length: 0
2026-02-22T11:14:12.879Z ERRO shared/management/client/grpc.go:516: failed to login to Management Service: rpc error: code = PermissionDenied desc = no peer auth method provided, please use a setup key or interactive SSO login
2026-02-22T11:14:12.880Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d6dea12adcqs73ev74cg client_ip=10.0.50.7 method=GET host=192.168.198.195:2020 path=/.env status=502 title="Proxy Not Connected" err=client start failed: login: rpc error: code = InvalidArgument desc = invalid setup-key or no sso information provided, err: invalid UUID length: 0

when accessing the configured domain i also get errormessages again:
Image

i have checked if the token i have created for the proxy is still valid and i use which is confirmed by the management plain:

root@727e8c389eca:/# /go/bin/netbird-mgmt token list
2026/02/22 14:43:09 listen tcp 127.0.0.1:6060: bind: address already in use
ID                    NAME        CREATED     EXPIRES  LAST USED         REVOKED
--                    ----        -------     -------  ---------         -------
d6b3fqobtf6c76enipkg  mydomain.x  2026-02-18  never    2026-02-22 14:40  no
root@727e8c389eca:/# 

based on the last used i can see that proxy is at least partly able to communicate with management plain. hope that helps

<!-- gh-comment-id:3941096001 --> @NopeNix commented on GitHub (Feb 22, 2026): **Update:** after restarting my system again and applying docker updates the proxy container shows some new errors: ``` 2026-02-22T11:14:12.826Z ERRO shared/management/client/grpc.go:516: failed to login to Management Service: rpc error: code = PermissionDenied desc = no peer auth method provided, please use a setup key or interactive SSO login 2026-02-22T11:14:12.829Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d6dea12adcqs73ev74c0 client_ip=10.0.50.7 method=GET host=192.168.198.195:2020 path=/.env status=502 title="Proxy Not Connected" err=client start failed: login: rpc error: code = InvalidArgument desc = invalid setup-key or no sso information provided, err: invalid UUID length: 0 2026-02-22T11:14:12.879Z ERRO shared/management/client/grpc.go:516: failed to login to Management Service: rpc error: code = PermissionDenied desc = no peer auth method provided, please use a setup key or interactive SSO login 2026-02-22T11:14:12.880Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d6dea12adcqs73ev74cg client_ip=10.0.50.7 method=GET host=192.168.198.195:2020 path=/.env status=502 title="Proxy Not Connected" err=client start failed: login: rpc error: code = InvalidArgument desc = invalid setup-key or no sso information provided, err: invalid UUID length: 0 ``` when accessing the configured domain i also get errormessages again: <img width="1072" height="780" alt="Image" src="https://github.com/user-attachments/assets/77d00453-5669-493f-9a3b-f1f045063c81" /> i have checked if the token i have created for the proxy is still valid and i use which is confirmed by the management plain: ``` root@727e8c389eca:/# /go/bin/netbird-mgmt token list 2026/02/22 14:43:09 listen tcp 127.0.0.1:6060: bind: address already in use ID NAME CREATED EXPIRES LAST USED REVOKED -- ---- ------- ------- --------- ------- d6b3fqobtf6c76enipkg mydomain.x 2026-02-18 never 2026-02-22 14:40 no root@727e8c389eca:/# ``` based on the last used i can see that proxy is at least partly able to communicate with management plain. hope that helps
Author
Owner

@byCrookie commented on GitHub (Feb 25, 2026):

I also followed the migration guide after seeing that https://github.com/netbirdio/netbird/issues/5326 was resolved, to try the new way where the proxy directly connects to the netbird-server over the docker network without leaving the network. I got it working, so that the proxy now can connect to the management server, but then i got the exact same error. Probably the signal endpoint got forgotten in the change https://github.com/netbirdio/docs/pull/623

The error:
2026-02-25T18:28:23.511Z WARN client/internal/profilemanager/service.go:360: failed to get active profile state: failed to set default active profile state: failed to set active profile to default: failed to write active profile state: create temp: open /var/lib/netbird/.642236595active_profile.json: permission denied 2026-02-25T18:28:53.064Z ERRO shared/signal/client/grpc.go:70: failed to connect to the signalling server: context canceled 2026-02-25T18:28:53.064Z ERRO client/internal/connect.go:561: error while connecting to the Signal Exchange Service netbird.****.com:443: context canceled 2026-02-25T18:28:53.064Z ERRO client/internal/connect.go:269: rpc error: code = FailedPrecondition desc = failed connecting to Signal Service : context canceled

<!-- gh-comment-id:3961297376 --> @byCrookie commented on GitHub (Feb 25, 2026): I also followed the migration guide after seeing that https://github.com/netbirdio/netbird/issues/5326 was resolved, to try the new way where the proxy directly connects to the netbird-server over the docker network without leaving the network. I got it working, so that the proxy now can connect to the management server, but then i got the exact same error. Probably the signal endpoint got forgotten in the change https://github.com/netbirdio/docs/pull/623 The error: ` 2026-02-25T18:28:23.511Z WARN client/internal/profilemanager/service.go:360: failed to get active profile state: failed to set default active profile state: failed to set active profile to default: failed to write active profile state: create temp: open /var/lib/netbird/.642236595active_profile.json: permission denied 2026-02-25T18:28:53.064Z ERRO shared/signal/client/grpc.go:70: failed to connect to the signalling server: context canceled 2026-02-25T18:28:53.064Z ERRO client/internal/connect.go:561: error while connecting to the Signal Exchange Service netbird.****.com:443: context canceled 2026-02-25T18:28:53.064Z ERRO client/internal/connect.go:269: rpc error: code = FailedPrecondition desc = failed connecting to Signal Service : context canceled `
Author
Owner

@Dalewn commented on GitHub (Feb 26, 2026):

I see a similar error like OP although I didn't migrate and bit the bullet to start from scratch. I can't get the proxy to do anything really...

The error:

[netbird-proxy] 
2026-02-26T10:53:19.383Z WARN client/internal/profilemanager/service.go:360: failed to get active profile state: failed to set default active profile state: failed to set active profile to default: failed to write active profile state: create temp: open /var/lib/netbird/.384699069active_profile.json: permission denied
[netbird-proxy] 
2026/02/26 10:53:19 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.
[netbird-proxy] 
2026-02-26T10:53:19.870Z WARN client/firewall/create_linux.go:49: failed to create native firewall: create firewall: no firewall manager found. Proceeding with userspace
[netbird-proxy] 
2026-02-26T10:55:28.970Z WARN [peer: 9kjzV...=] client/internal/peer/worker_ice.go:160: ICE Agent is not initialized yet

The ICE Agent error then continues to repeat.

<!-- gh-comment-id:3965842899 --> @Dalewn commented on GitHub (Feb 26, 2026): I see a similar error like OP although I didn't migrate and bit the bullet to start from scratch. I can't get the proxy to do anything really... The error: ``` [netbird-proxy] 2026-02-26T10:53:19.383Z WARN client/internal/profilemanager/service.go:360: failed to get active profile state: failed to set default active profile state: failed to set active profile to default: failed to write active profile state: create temp: open /var/lib/netbird/.384699069active_profile.json: permission denied [netbird-proxy] 2026/02/26 10:53:19 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details. [netbird-proxy] 2026-02-26T10:53:19.870Z WARN client/firewall/create_linux.go:49: failed to create native firewall: create firewall: no firewall manager found. Proceeding with userspace [netbird-proxy] 2026-02-26T10:55:28.970Z WARN [peer: 9kjzV...=] client/internal/peer/worker_ice.go:160: ICE Agent is not initialized yet ``` The ICE Agent error then continues to repeat.
Author
Owner

@czadikem commented on GitHub (Feb 27, 2026):

I am getting the same issue. I am using option 1 for the proxy though.

<!-- gh-comment-id:3973668348 --> @czadikem commented on GitHub (Feb 27, 2026): I am getting the same issue. I am using option 1 for the proxy though.
Author
Owner

@Linoex-hash commented on GitHub (Feb 28, 2026):

+1 getting this issue, except I installed netbird from scratch using the traefik proxy. I'm self hosting this, and I opened port 80/443 TCP and 3478 UDP. I followed the guide exactly, and I'm getting the following error:

XXXXXXXXXXXXX:~$ docker logs netbird-proxy -f
2026-02-28T04:14:58.202Z WARN client/internal/profilemanager/service.go:360: failed to get active profile state: failed to set default active profile state: failed to set active profile to default: failed to write active profile state: create temp: open /var/lib/netbird/.3644981901active_profile.json: permission denied
2026-02-28T04:15:27.782Z ERRO shared/signal/client/grpc.go:70: failed to connect to the signalling server: context canceled
2026-02-28T04:15:27.782Z ERRO client/internal/connect.go:561: error while connecting to the Signal Exchange Service XXXXXXXXXXXXXXXX:443: context canceled
2026-02-28T04:15:27.782Z ERRO client/internal/connect.go:269: rpc error: code = FailedPrecondition desc = failed connecting to Signal Service : context canceled
2026-02-28T04:15:27.890Z WARN client/internal/profilemanager/service.go:360: failed to get active profile state: failed to set default active profile state: failed to set active profile to default: failed to write active profile state: create temp: open /var/lib/netbird/.2126777625active_profile.json: permission denied
2026-02-28T04:15:39.485Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d6h6nj8lr4gs73e82qog client_ip=10.23.5.10 method=GET host=XXXXXXXXXXXXXX path=/ status=504 title="Request Timeout" err=client start failed: context deadline exceeded

After a while the proxy times out and I get a 502 error instead of the 504. My netbird server manager is in a DMZ network, and I use peers in my internal server network and lan network to route the traffic to so I don't have to allow DMZ -> Server traffic on my firewall, I can just route through the peers.

<!-- gh-comment-id:3977268726 --> @Linoex-hash commented on GitHub (Feb 28, 2026): +1 getting this issue, except I installed netbird from scratch using the traefik proxy. I'm self hosting this, and I opened port 80/443 TCP and 3478 UDP. I followed the guide exactly, and I'm getting the following error: ``` XXXXXXXXXXXXX:~$ docker logs netbird-proxy -f 2026-02-28T04:14:58.202Z WARN client/internal/profilemanager/service.go:360: failed to get active profile state: failed to set default active profile state: failed to set active profile to default: failed to write active profile state: create temp: open /var/lib/netbird/.3644981901active_profile.json: permission denied 2026-02-28T04:15:27.782Z ERRO shared/signal/client/grpc.go:70: failed to connect to the signalling server: context canceled 2026-02-28T04:15:27.782Z ERRO client/internal/connect.go:561: error while connecting to the Signal Exchange Service XXXXXXXXXXXXXXXX:443: context canceled 2026-02-28T04:15:27.782Z ERRO client/internal/connect.go:269: rpc error: code = FailedPrecondition desc = failed connecting to Signal Service : context canceled 2026-02-28T04:15:27.890Z WARN client/internal/profilemanager/service.go:360: failed to get active profile state: failed to set default active profile state: failed to set active profile to default: failed to write active profile state: create temp: open /var/lib/netbird/.2126777625active_profile.json: permission denied 2026-02-28T04:15:39.485Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d6h6nj8lr4gs73e82qog client_ip=10.23.5.10 method=GET host=XXXXXXXXXXXXXX path=/ status=504 title="Request Timeout" err=client start failed: context deadline exceeded ``` After a while the proxy times out and I get a 502 error instead of the 504. My netbird server manager is in a DMZ network, and I use peers in my internal server network and lan network to route the traffic to so I don't have to allow DMZ -> Server traffic on my firewall, I can just route through the peers.
Author
Owner

@Linoex-hash commented on GitHub (Feb 28, 2026):

I figured out my issue. My machine was blocking DMZ -> DMZ traffic (which goes through the router for NAT hairpinning). In the future though, I'd really like to see the signal server be the internal docker hostname to avoid the NAT hairpinning altogether.

<!-- gh-comment-id:3978919338 --> @Linoex-hash commented on GitHub (Feb 28, 2026): I figured out my issue. My machine was blocking DMZ -> DMZ traffic (which goes through the router for NAT hairpinning). In the future though, I'd really like to see the signal server be the internal docker hostname to avoid the NAT hairpinning altogether.
Author
Owner

@henrikekblad commented on GitHub (Mar 2, 2026):

See my solution here: https://github.com/netbirdio/netbird/issues/5349#issuecomment-3983395120

<!-- gh-comment-id:3986002806 --> @henrikekblad commented on GitHub (Mar 2, 2026): See my solution here: https://github.com/netbirdio/netbird/issues/5349#issuecomment-3983395120
Author
Owner

@NopeNix commented on GitHub (Mar 3, 2026):

@henrikekblad thanks but the problem you posted seem not to be relted to my issue

<!-- gh-comment-id:3988803477 --> @NopeNix commented on GitHub (Mar 3, 2026): @henrikekblad thanks but the problem you posted seem not to be relted to my issue
Author
Owner

@NopeNix commented on GitHub (Mar 5, 2026):

Ah, okay — it is indeed NAT hairpinning.

Workaround for NAT Hairpinning with Cheap VPS Servers

I can work around this problem by placing a small DNS server in the middle, redirecting traffic for netbird.yourdomain.com to the internal Docker DNS name of my Traefik instance. All other queries fall back to the default DNS.

1. Docker Compose for the DNS Server (using CoreDNS)

services:
  coredns:
    image: coredns/coredns:latest
    container_name: coredns
    # Ports are exposed via the overlay network — not published to host
    # ports:
    #   - "53:53/udp"
    #   - "53:53/tcp"
    volumes:
      - /data/internal_dns/Corefile:/Corefile:ro
    networks:
      nat_hairpinning_workaround:
        ipv4_address: 10.0.50.69
    restart: unless-stopped

networks:
  nat_hairpinning_workaround:
    external: true

⚠️ Important: Make sure you've already created the overlay network in your desired IP range. You may need to adjust the ipv4_address to fit your network's subnet.

2. CoreDNS Config File (Corefile)

# Corefile
. {
    # Match netbird.yourdomain.com and return a CNAME pointing to the internal Traefik service
    template IN A netbird.nopenix.de {
        match "netbird\.yourdomain\.com."
        answer "{{ .Name }} 60 IN CNAME traefik_traefik."
    }

    # Forward all other queries to Docker's internal DNS
    forward . 127.0.0.11

    # Reload the config every 5 seconds if changed
    reload 5s

    # Log DNS queries (optional, useful for debugging)
    log
}

💡 You’ll likely need to adjust the CNAME target (traefik_traefik) to match your actual Docker service name and network scope.

3. Configure NetBird Proxy to Use This DNS Server

I did this by attaching the NetBird proxy container to the nat_hairpinning_workaround network and explicitly setting the DNS server to 10.0.50.69 (the IP we assigned to CoreDNS).

proxy:
  image: netbirdio/reverse-proxy:latest
  container_name: netbird-proxy
  restart: unless-stopped
  networks:
    - default
    - nat_hairpinning_workaround  # Attach to the DNS network
  dns:
    - 10.0.50.69  # Point to our custom DNS resolver

After running docker compose up -d, start the DNS service first, then the NetBird proxy — and it should work immediately.

Final Notes

This setup acts as a general workaround for NAT hairpinning issues with NetBird — and realistically, any containerized reverse proxy setup where you're hitting DNS or routing limitations on a cheap VPS without proper hairpin NAT support.

It’s janky? Sure.
Does it work? Absolutely.

I’ve used this to fix multiple hairpinning-related issues beyond just NetBird. If you're stuck behind a shitty VPS NAT and your services don't resolve internally, this might just save your night.

You're welcome.

<!-- gh-comment-id:4003718079 --> @NopeNix commented on GitHub (Mar 5, 2026): Ah, okay — it **is** indeed NAT hairpinning. # Workaround for NAT Hairpinning with Cheap VPS Servers I can work around this problem by placing a small DNS server in the middle, redirecting traffic for `netbird.yourdomain.com` to the internal Docker DNS name of my Traefik instance. All other queries fall back to the default DNS. ## 1. Docker Compose for the DNS Server (using CoreDNS) ```yaml services: coredns: image: coredns/coredns:latest container_name: coredns # Ports are exposed via the overlay network — not published to host # ports: # - "53:53/udp" # - "53:53/tcp" volumes: - /data/internal_dns/Corefile:/Corefile:ro networks: nat_hairpinning_workaround: ipv4_address: 10.0.50.69 restart: unless-stopped networks: nat_hairpinning_workaround: external: true ``` ⚠️ **Important**: Make sure you've already created the overlay network in your desired IP range. You may need to adjust the `ipv4_address` to fit your network's subnet. ## 2. CoreDNS Config File (`Corefile`) ``` # Corefile . { # Match netbird.yourdomain.com and return a CNAME pointing to the internal Traefik service template IN A netbird.nopenix.de { match "netbird\.yourdomain\.com." answer "{{ .Name }} 60 IN CNAME traefik_traefik." } # Forward all other queries to Docker's internal DNS forward . 127.0.0.11 # Reload the config every 5 seconds if changed reload 5s # Log DNS queries (optional, useful for debugging) log } ``` 💡 You’ll likely need to adjust the CNAME target (`traefik_traefik`) to match your actual Docker service name and network scope. ## 3. Configure NetBird Proxy to Use This DNS Server I did this by attaching the NetBird proxy container to the `nat_hairpinning_workaround` network and explicitly setting the DNS server to `10.0.50.69` (the IP we assigned to CoreDNS). ```yaml proxy: image: netbirdio/reverse-proxy:latest container_name: netbird-proxy restart: unless-stopped networks: - default - nat_hairpinning_workaround # Attach to the DNS network dns: - 10.0.50.69 # Point to our custom DNS resolver ``` After running `docker compose up -d`, start the DNS service first, then the NetBird proxy — and it should work immediately. ## Final Notes This setup acts as a general workaround for NAT hairpinning issues with **NetBird** — and realistically, **any containerized reverse proxy setup** where you're hitting DNS or routing limitations on a cheap VPS without proper hairpin NAT support. It’s janky? Sure. Does it work? Absolutely. I’ve used this to fix multiple hairpinning-related issues beyond just NetBird. If you're stuck behind a shitty VPS NAT and your services don't resolve internally, this might just save your night. You're welcome.
Author
Owner

@byCrookie commented on GitHub (Mar 5, 2026):

I would not close this issue because the workaround is just a workaround. The proxy still does not respect management server url in proxy.config for the signal server endpoint (combined image), at least as in my try https://github.com/netbirdio/netbird/issues/5404#issuecomment-3961297376.

Setting NB_PROXY_MANAGEMENT_ADDRESS=http://netbird-server:80 only partially works (signal server is called wrong tho).

My workaround currently is to fix the hairpin issue by setting the following extra host in my podman compose:

extra_hosts:
  - "netbird.example.com:172.30.0.10"

and using NB_PROXY_MANAGEMENT_ADDRESS=https://netbird.example.com:443

<!-- gh-comment-id:4005670117 --> @byCrookie commented on GitHub (Mar 5, 2026): I would not close this issue because the workaround is just a workaround. The proxy still does not respect management server url in proxy.config for the signal server endpoint (combined image), at least as in my try https://github.com/netbirdio/netbird/issues/5404#issuecomment-3961297376. Setting `NB_PROXY_MANAGEMENT_ADDRESS=http://netbird-server:80` only partially works (signal server is called wrong tho). My workaround currently is to fix the hairpin issue by setting the following extra host in my podman compose: ``` extra_hosts: - "netbird.example.com:172.30.0.10" ``` and using `NB_PROXY_MANAGEMENT_ADDRESS=https://netbird.example.com:443`
Author
Owner

@NopeNix commented on GitHub (Mar 6, 2026):

that are some good points @byCrookie !

tons of people will have this problem it would be nice if this can be solved for everyone.

<!-- gh-comment-id:4011372089 --> @NopeNix commented on GitHub (Mar 6, 2026): that are some good points @byCrookie ! tons of people will have this problem it would be nice if this can be solved for everyone.
Author
Owner

@pace-ttuerel commented on GitHub (Apr 25, 2026):

I had the same problem, and in my case, it was because the server hostname resolved to the loopback address 127.0.1.1 (debian system) —not the external IP—both inside and outside the container. The Signal service doesn’t respond to that address. I updated the /etc/hosts file, and the reverse proxy has been working perfectly ever since (after a reboot).

<!-- gh-comment-id:4320068008 --> @pace-ttuerel commented on GitHub (Apr 25, 2026): I had the same problem, and in my case, it was because the server hostname resolved to the loopback address 127.0.1.1 (debian system) —not the external IP—both inside and outside the container. The Signal service doesn’t respond to that address. I updated the /etc/hosts file, and the reverse proxy has been working perfectly ever since (after a reboot).
Author
Owner

@mrmainx commented on GitHub (Apr 29, 2026):

I had the same issue as https://github.com/netbirdio/netbird/issues/5404#issuecomment-3961297376 on a fresh installation with version v0.69.0.

The workaround https://github.com/netbirdio/netbird/issues/5404#issuecomment-4005670117 in addition with the added pathprefix management.ProxyService
traefik.http.routers.netbird-grpc.rule=Host(`netbird.example.com`) && (PathPrefix(`/signalexchange.SignalExchange/`) || PathPrefix(`/management.ManagementService/`) || PathPrefix(`/management.ProxyService/`))
fixed it for me.

So like described in the documentation.

<!-- gh-comment-id:4342443683 --> @mrmainx commented on GitHub (Apr 29, 2026): I had the same issue as https://github.com/netbirdio/netbird/issues/5404#issuecomment-3961297376 on a fresh installation with version v0.69.0. The workaround https://github.com/netbirdio/netbird/issues/5404#issuecomment-4005670117 in addition with the added pathprefix **management.ProxyService** ``traefik.http.routers.netbird-grpc.rule=Host(`netbird.example.com`) && (PathPrefix(`/signalexchange.SignalExchange/`) || PathPrefix(`/management.ManagementService/`) || PathPrefix(`/management.ProxyService/`))`` fixed it for me. So like described in the [documentation](https://docs.netbird.io/selfhosted/migration/enable-reverse-proxy#connecting-through-traefik-instead-of-docker-network).
Sign in to join this conversation.
No Label triage-needed
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#11368