[GH-ISSUE #2407] 通过FRP映射的端口无法正常工具,通过路由器的NAT映射是可以正常工作的,有什么建议吗? #1912

Closed
opened 2026-05-05 13:14:04 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @zsinba on GitHub (May 20, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2407

[REQUIRED] hat version of frp are you using

Version: 36.2

[REQUIRED] What operating system and processor architecture are you using
OS: Ubuntu 20.04
CPU architecture: Intel 至强

[REQUIRED] description of errors

confile

log file

Steps to reproduce the issue
我有一个应用, 这个应用放在内网里. 把FRP安装在最外层的路由上的. 应用服务器是下层跨了一个路由器了.

  1. 在应用服务器上面配置FRPC,连接到FRPS, 映射 指定的端口, 两个TCP,一个UDP端口. (WEBRTC的会议软件 )
  2. 通过外网访问内网应用服务器的应用时,无法正常通信.TCP和UDP通信都通了.但是软件无法正常工具.
  3. 不使用FRPC+FRPS的方式了. 我通过最外层的路由器端口映射到内部的路由器,再通过内部的路由器映射到应用服务器上. 就正常工作了. 经过了两层路由器的映射,映射的还是两个TCP和一个UDP端口,其他的没有映射. 正常工作了.

所以怀疑是FRP映射出来的端口,比如UDP映射了10000端口出来 , 远端的客户端向这个1万端口发数据时,可能还需要一个端口通信。
如果这样理解的话,又不对, 通过路由器的端口转发,一切是正常的。 端口转发和FRP映射是同样的端口和协议。所以不知道是什么原因了。

Supplementary information

Can you guess what caused this issue

Checklist:

  • [] I included all information required in the sections above
  • [] I made sure there are no duplicates of this report (Use Search)
Originally created by @zsinba on GitHub (May 20, 2021). Original GitHub issue: https://github.com/fatedier/frp/issues/2407 <!-- From Chinese to English by machine translation, welcome to revise and polish. --> <!-- ⚠️⚠️ Incomplete reports will be marked as invalid, and closed, with few exceptions ⚠️⚠️ --> <!-- in addition, please use search well so that the same solution can be found in the feedback, we will close it directly --> <!-- for convenience of differentiation, use FRPS or FRPC to refer to the FRP server or client --> **[REQUIRED] hat version of frp are you using** <!-- Use ./frpc -v or ./frps -v --> Version: 36.2 **[REQUIRED] What operating system and processor architecture are you using** OS: Ubuntu 20.04 CPU architecture: Intel 至强 **[REQUIRED] description of errors** **confile** <!-- Please pay attention to hiding the token, server_addr and other privacy information --> **log file** <!-- If the file is too large, use Pastebin, for example https://pastebin.ubuntu.com/ --> **Steps to reproduce the issue** 我有一个应用, 这个应用放在内网里. 把FRP安装在最外层的路由上的. 应用服务器是下层跨了一个路由器了. 1. 在应用服务器上面配置FRPC,连接到FRPS, 映射 指定的端口, 两个TCP,一个UDP端口. (WEBRTC的会议软件 ) 2. 通过外网访问内网应用服务器的应用时,无法正常通信.TCP和UDP通信都通了.但是软件无法正常工具. 3. 不使用FRPC+FRPS的方式了. 我通过最外层的路由器端口映射到内部的路由器,再通过内部的路由器映射到应用服务器上. 就正常工作了. 经过了两层路由器的映射,映射的还是两个TCP和一个UDP端口,其他的没有映射. 正常工作了. 所以怀疑是FRP映射出来的端口,比如UDP映射了10000端口出来 , 远端的客户端向这个1万端口发数据时,可能还需要一个端口通信。 如果这样理解的话,又不对, 通过路由器的端口转发,一切是正常的。 端口转发和FRP映射是同样的端口和协议。所以不知道是什么原因了。 **Supplementary information** **Can you guess what caused this issue** **Checklist**: <!--- Make sure you've completed the following steps (put an "X" between of brackets): --> - [] I included all information required in the sections above - [] I made sure there are no duplicates of this report [(Use Search)](https://github.com/fatedier/frp/issues?q=is%3Aissue)
gitea-mirror 2026-05-05 13:14:04 -06:00
Author
Owner

@lgish commented on GitHub (May 24, 2021):

同问

<!-- gh-comment-id:846842478 --> @lgish commented on GitHub (May 24, 2021): 同问
Author
Owner

@zsinba commented on GitHub (May 25, 2021):

估计是打洞的原因. 使用FRP映射的时候, 打洞的时候, 系统以为我有外网IP, 其实我没有.
使用路由的端口转发时, 就不一样了. 所以可能是这个原因.

<!-- gh-comment-id:847545000 --> @zsinba commented on GitHub (May 25, 2021): 估计是打洞的原因. 使用FRP映射的时候, 打洞的时候, 系统以为我有外网IP, 其实我没有. 使用路由的端口转发时, 就不一样了. 所以可能是这个原因.
Author
Owner

@github-actions[bot] commented on GitHub (Jul 10, 2021):

Issues go stale after 45d of inactivity. Stale issues rot after an additional 10d of inactivity and eventually close.

<!-- gh-comment-id:877522587 --> @github-actions[bot] commented on GitHub (Jul 10, 2021): Issues go stale after 45d of inactivity. Stale issues rot after an additional 10d of inactivity and eventually close.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#1912
No description provided.