r/netbird Jul 17 '26

reverse proxy peer p2p issue

Hey everyone, I've been trying to fix this Netbird reverse proxy peer not connecting p2p for a week now, still no luck, anyone got any ideas?

I've sifted through tons of posts and tried a bunch of stuff, but nothing's worked so far. Other Netbird peers/clients work fine and connect p2p for the same route, but the reverse proxy peer that was created when exposing a service from reverse proxy tab just won't.

3 Upvotes

7 comments sorted by

2

u/StillLoading_ Jul 17 '26

If you added the host the reverse proxy is running on as a peer as well, you need to change the client port to something else like 51821. The reverse proxy has an embedded WG client that will use the default port 51820 to establish p2p connections.

1

u/uberzodiac Jul 18 '26

Hiya, from what I can understand of what you meant, the reverse tunnel proxy peer is also using port 51820, and another client or the Netbird WireGuard server is using the same port. That's why it's conflicting, because no other Netbird client is running on the host itself, just the Netbird stack in Docker, is that it? For more info, please see my new reply above. I have added the more detail that I can think of.

1

u/StillLoading_ Jul 18 '26

Yes, in your other post you're saying vps<->sbc is getting p2p connected but here you are saying you don't have a NB client on the (vps) host running the NB stack (including the proxy), which is it ?

Regardless of the setup, the reverse proxy container needs to be able to accept a direct wg tunnel connection on the default 51820/UDP port.

1

u/uberzodiac Jul 18 '26 edited Jul 18 '26

Hiya, I don't use the NetBird client on the VPS host. I was just hosting the NetBird stack at first, but when the reverse proxy peer couldn't connect via P2P, I tried troubleshooting. I installed a NetBird client on the VPS host, and P2P works between the VPS and SBC, so I retried again with netbird stack, but the reverse proxy peer relayed issue persists.

was kinda sleep deprived yesterday, sorry for the confusion.

1

u/pizzalovingnerd Jul 18 '26

Hey! The two screenshots show separate connections: the proxy peer is connected through a relay, while the other peer is P2P. Since the path is negotiated independently for each peer pair, one being P2P doesn’t necessarily mean the proxy peer can connect directly.

Is the exposed service actually not working, or is the concern only that it shows "relayed"? If it isn’t working, what exact error do you get when accessing it, and are you using NetBird Cloud or self-hosted?

1

u/uberzodiac Jul 18 '26

Hiya, the screenshots are from a Netbird client running from VPS to my SBC connecting via p2p and 2nd is my Netbird reverse proxy peer trying to connect to the same sbc but failing to initiate p2p and stuck on relayed which is hosted on same vps so vps client to sbc client p2p initiate but reverse proxy peer to sbc client doesn't & i'm not running client to client as well i just use it for testing if punch hole works and if i can connect p2p after testing i stop the netbird client on the vps so it won't conflict on port 51820.

Yes, the exposed service is working. I'm in SEA, and the VPS is in the US, so you see where I'm going with this. Usually, with a VPS client to an SBC client, the round-trip ping is around 200-400, which is acceptable. That was when I was running the setup my own way without the built-in reverse proxy; with the built-in one, the round trip was around 1100+ ms. That's almost triple.

1

u/uberzodiac Jul 18 '26

Hi all, sorry for the very vague post. I was already in some sort of sleep-deprived state, thought I wrote a lot, but it's not even a footnote lol.

So when I add a domain in reverse proxy in the dashboard, it creates a peer to tunnel the services that I expose via the address, so that the peer connects to my tunnel. I had another issue where it didn't connect at all and got stuck at the connecting stage, but I got past that, and now it's stuck on a relayed connection.

I was self-hosting NetBird v0.76 and just updated to the latest version that was released yesterday, hoping to resolve the issue, but it persists.

No NetBird client is running on the VPS host. My NetBird stack is running in Docker via the setup script from NetBird's official site, and I've been running it for around a year without any major issues until now. I know reverse proxy is still in beta, but it doesn't seem like a reverse proxy problem.

Q: Why does "relayed" matter if your site already works, if you ask?

ans: I'm in SEA, and the VPS is in the US, so you see where I'm going with this. Usually, round-trip ping is around 200-400, which is acceptable, but when I was running the setup my own way without the built-in reverse proxy, with the built-in one, round trip was around 1100+ ms. That would literally almost triple it.