mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #5289] UDP On the server for frp is not forwarding fully. #4083
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#4083
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @liam6080 on GitHub (Apr 15, 2026).
Original GitHub issue: https://github.com/fatedier/frp/issues/5289
Bug Description
It is in regards to the server calling on: *:19132 and *:30004 yet it can not be accessed via the public IP.
I can not see any way to set the server to fully listen on the public IP's and it does not work via the host IP's as expected.
So the main thing is, It works from client to the server, Yet the server is not pushing out the ports public & This is causing issues for things like: bedrock and simple voice chat on Minecraft.
frpc Version
0.68.0
frps Version
0.68.0
System Architecture
ubuntu/amd64
Configurations
Proxy/Server 1:
Proxy/Server 2:
Client configs:
Logs
No response
Steps to reproduce
...
Affected area
@fatedier commented on GitHub (Apr 15, 2026):
Hi @liam6080, a few things to check before this can be treated as a frp bug:
1. Typo in the voice-chat proxy:
2. Remove
transport.proxyProtocolVersion = "v2"from the Minecraft Bedrock UDP proxy. frpc prepends a PROXY v2 header to the first UDP packet, which corrupts the RakNet handshake because Bedrock servers don't understand PROXY protocol. Only use this whenlocalPortis something that actually parses PROXY protocol.3. "Not reachable via public IP" is almost always a firewall / security group issue, not frp. frps binds UDP on
0.0.0.0:<remotePort>by default. Please verify:and confirm your cloud security group /
ufw/iptablesallows inbound UDP on 19132, 30004, 19131, 30100.4. Please attach
frpsandfrpclogs (theLogssection is empty) — without them we can't tell whether the proxy is even registered on the server.Fix 1 & 2, then share the
ssoutput and logs and we can go from there.@liam6080 commented on GitHub (Apr 15, 2026):
1: I fixed that IP address issue, Thank you!
2: I removed the proxy protocal.
3: Running on the server:
3.1: Running remote:
"No reply".
4: Here are the logs:
Client 1 for Proxy 1 stopped working even after copying the same config of client: "didn't edit anything and the port filters are the same on each server"
Proxy 1:
Client 2 for Proxy 2:
Proxy 2:
Also on top of that even with the working: 62.72.177.172 I can not connect to bedrock or simple voice chat as well.
@fatedier commented on GitHub (Apr 15, 2026):
Thanks for the details. A few observations:
1.
nc -u ... 19132→ "no reply" is not a valid reachability test.nc -uonly sends data when you type something on stdin, and even if a packet does get through, a Minecraft Bedrock server will not reply to arbitrary non-RakNet bytes. This result tells us nothing about whether the port is actually reachable.2. The
incoming a new work connection for udp proxylog does not mean user traffic arrived. frps proactively pre-establishes a UDP work connection ~500 ms after the proxy starts (server/proxy/udp.go). So the line you see is just the control-plane setup — we still have no evidence that any real Bedrock / Voice Chat packet ever reached frps.3. Client 1 → Proxy 1 (
.171)connection write timeoutpoints at a blocked UDP 7000 on that host. Your clients usetransport.protocol = "kcp", i.e. the control connection runs over UDP/7000. Client 2 logs in to Proxy 2 (.172) fine with the same config, while Client 1 times out against.171. That strongly suggests the.171server's UDP/7000 is blocked somewhere (cloud security group,ufw/iptables, or upstream network).4. To actually locate where UDP is dropping, please run
tcpdumpon both sides while a real Bedrock client tries to connect.On the frps host:
On the frpc host (at the same time):
Then try connecting from a real Minecraft Bedrock client (not
nc). This splits the path into three segments:172.18.0.1:19132(visible on the client-side capture)Whichever capture is empty is the broken segment. Please share both captures plus the output of
sudo iptables -S/ufw status verboseand your cloud provider's security group rules for UDP.Also please confirm: is
172.18.0.1:19132the Docker bridge gateway, or the container IP of the Bedrock server? If it's the gateway, you need a port publish (-p 19132:19132/udp) on the container so the gateway actually has something listening.@liam6080 commented on GitHub (Apr 15, 2026):
Hello,
I can see on the server:
On the client:
UFW is only set on the client: "java works via haproxy"
iptables: "Should not be working due to UFW else it removes iptables anyway when UFW is in use yet it works for haproxy/java"
@liam6080 commented on GitHub (Apr 16, 2026):
Hello,
As a update, I was able to get it to work by changing the bedrock server to the public IP.
Yet I was not able to get the same for simple voice chat.
I also fixed it so both proxy 1 and 2 work.
Proxy 2:
Client:
Configs:
Proxy 2:
Client:
Do you have any idea why voice chat may not be sending and passing fully to the client??
Also as well, Do you know any better config like way to pass the players raw IP and also any way to better the loading of things for players?
Thanks!
@fatedier commented on GitHub (Apr 16, 2026):
Glad Bedrock is working — but I want to point out what's actually happening, because frp is not in your user traffic path.
1. Your tcpdump shows an iptables DNAT, not frp, is carrying the packets.
The "Out" packet keeps the original player source IP and source port, only the destination IP is rewritten. frp cannot produce this: frp tunnels UDP over the work connection (KCP/TCP on 7000), it never emits raw UDP toward
45.X.X.X:30004, and it would never preserve the client's source IP as the outgoing source IP. This pattern is a classiciptables -t nat PREROUTING -p udp --dport 30004 -j DNAT --to 45.X.X.X:30004(no SNAT). Please run on the frps host:That rule is intercepting packets before frps ever sees them. frps is listening on
:30004but never receives anything.2. Why Bedrock "works" and voice-chat doesn't.
Your new client config sets
localIP = "45.X.X.X"— that's frpc's own public IP. The DNAT on the frps host redirects packets to45.X.X.X:30004externally, so something must be listening there on the frpc machine:45.X.X.X:19132→ it works.172.18.0.1:30004(docker-proxy). Nothing listens on45.X.X.X:30004, so the DNAT'd packet is dropped.Fix (same shape as your Bedrock fix): republish the voice-chat container without binding to
172.18.0.1, e.g.-p 30004:30004/udpinstead of-p 172.18.0.1:30004:30004/udp.3. If you actually want to use frp instead of the DNAT hack:
localIP = "172.18.0.1"(the Docker bridge), matching the original working setup for Java.172.18.0.1:<port>as they were.4. Passing the player's real IP.
With your current DNAT path the source IP is already preserved (that's why you saw
188.X.X.Xon the frpc side). If you move back to a real frp path, settransport.proxyProtocolVersion = "v2"only on proxies whose target parses PROXY protocol. Minecraft Bedrock / RakNet does not; Simple Voice Chat supports it on recent versions — check your SVC version before enabling.5. Performance.
Nothing frp-specific will help much here. A couple of knobs:
transport.protocol = "kcp"unless you actually have a lossy link; plain TCP is lower overhead for the control channel.transport.protocol = "quic"(must be set on both frps and frpc).udpPacketSize = 1500/ largemaxPoolCountyou set earlier are not useful for this scenario; defaults are fine.Since the underlying problem is your iptables NAT setup, not an frp bug, I'd suggest we close this issue once voice-chat is working on your side. Happy to keep helping in the thread.
@github-actions[bot] commented on GitHub (May 1, 2026):
Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.