[SELF-HOSTED] Peer Public IP showing local docker network gateway #719

Closed
opened 2025-11-20 05:16:28 -05:00 by saavagebueno · 7 comments
Owner

Originally created by @sgtaziz on GitHub (Mar 18, 2024).

Describe the problem

On a self-hosted installation, all clients have a "Public IP Address" set as the docker network gateway. Using "host" network mode for the management service changes that IP to 127.0.0.1.

To Reproduce

Steps to reproduce the behavior:

  1. Self-host netbird
  2. Join a peer
  3. Open Peers page on Netbird UI
  4. See peer IP Address and Region "Unknown"

Expected behavior

Peer IP Addresses should be correctly set. Perhaps from the COTURN server?

Are you using NetBird Cloud?

No, self-hosted

NetBird version

netbird version
0.26.3

Screenshots

image

Originally created by @sgtaziz on GitHub (Mar 18, 2024). **Describe the problem** On a self-hosted installation, all clients have a "Public IP Address" set as the docker network gateway. Using "host" network mode for the management service changes that IP to 127.0.0.1. **To Reproduce** Steps to reproduce the behavior: 1. Self-host netbird 2. Join a peer 3. Open Peers page on Netbird UI 4. See peer IP Address and Region "Unknown" **Expected behavior** Peer IP Addresses should be correctly set. Perhaps from the COTURN server? **Are you using NetBird Cloud?** No, self-hosted **NetBird version** ``` netbird version 0.26.3 ``` **Screenshots** ![image](https://github.com/netbirdio/netbird/assets/5303104/b51cfde9-5e9a-4a6e-b57c-1d70a927b74d)
saavagebueno added the triage-needed label 2025-11-20 05:16:28 -05:00
Author
Owner

@somnium78 commented on GitHub (Mar 19, 2024):

I have the same problem on almost all my docker hosts with a single exception where the correct ip is displayed.

Update: rebooting the docker host helps. I tried it with two hosts and the public IPs are correct now.

@somnium78 commented on GitHub (Mar 19, 2024): I have the same problem on almost all my docker hosts with a single exception where the correct ip is displayed. Update: rebooting the docker host helps. I tried it with two hosts and the public IPs are correct now.
Author
Owner

@sgtaziz commented on GitHub (Mar 21, 2024):

Just to clarify, all my peers having this issue are normal clients. iOS, Linux, and Windows. The selfhosted instance is the only thing running on docker.

@sgtaziz commented on GitHub (Mar 21, 2024): Just to clarify, all my peers having this issue are normal clients. iOS, Linux, and Windows. The selfhosted instance is the only thing running on docker.
Author
Owner

@sgtaziz commented on GitHub (Mar 22, 2024):

Turns out this was caused by the reverse proxy I was using (NGINX).
Below line fixed it:
grpc_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

@sgtaziz commented on GitHub (Mar 22, 2024): Turns out this was caused by the reverse proxy I was using (NGINX). Below line fixed it: `grpc_set_header X-Forwarded-For $proxy_add_x_forwarded_for;`
Author
Owner

@Askotion commented on GitHub (Mar 25, 2024):

Hi,

unfortunately this doesn't fix it for setups without reverse proxy. My "Public IP-Address" always shows the docker gateway for my netbird server on all linux peers. MacOS peers are not affected.

@Askotion commented on GitHub (Mar 25, 2024): Hi, unfortunately this doesn't fix it for setups without reverse proxy. My "Public IP-Address" always shows the docker gateway for my netbird server on all linux peers. MacOS peers are not affected.
Author
Owner

@turbotorsten commented on GitHub (Mar 28, 2024):

Hi,

unfortunately this doesn't fix it for setups without reverse proxy. My "Public IP-Address" always shows the docker gateway for my netbird server on all linux peers. MacOS peers are not affected.

Can confirm, public IP is broken for almost all my docker hosts. Strangely, some do display the correct public IP.

@turbotorsten commented on GitHub (Mar 28, 2024): > Hi, > > unfortunately this doesn't fix it for setups without reverse proxy. My "Public IP-Address" always shows the docker gateway for my netbird server on all linux peers. MacOS peers are not affected. Can confirm, public IP is broken for almost all my docker hosts. Strangely, some do display the correct public IP.
Author
Owner

@pomology commented on GitHub (May 10, 2024):

I have the same issue. Someone above said MacOS peers were not affected, but mine are.

@pomology commented on GitHub (May 10, 2024): I have the same issue. Someone above said MacOS peers were not affected, but mine are.
Author
Owner

@mlsmaycon commented on GitHub (May 11, 2024):

Guys, can you open a new issue and share more details about your setups? The IP address are checked using regular reverse proxy headers. So it will be important for us to learn what is your current setup, like are you using a reverse-proxy like nginx?

@mlsmaycon commented on GitHub (May 11, 2024): Guys, can you open a new issue and share more details about your setups? The IP address are checked using regular reverse proxy headers. So it will be important for us to learn what is your current setup, like are you using a reverse-proxy like nginx?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#719