[GH-ISSUE #1781] docker frp nginx 连接成功但是无法远程 #1410

Closed
opened 2026-05-05 12:53:31 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @Haitai-92 on GitHub (Apr 27, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/1781

Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.

Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST

What version of frp are you using (./frpc -v or ./frps -v)?
frp 版本为v0.32.1

What operating system and processor architecture are you using (go env)?
系统为CentOS7 x64 Docker version 19.03.7

Configures you used:
frps服务端配置
[common] bind_port = 7000 token = 123456 authentication_timeout = 900 dashboard_port = 7500 dashboard_user = admin dashboard_pwd = 12345 vhost_http_port = 8080 vhost_https_port = 8443 subdomain_host = example.com

frpc 客户端配置
[common] server_addr = xxx.xxx.xxx.xxx server_port = 7000 token = 123456 [svn] type = http local_port = 80 subdomain = svn [mssql] type = tcp local_ip = 123456 local_port = 1433 remote_port = 1433 [RDP] type = tcp local_ip = 127.0.0.1 local_port = 3389 remote_port = 14330

Steps to reproduce the issue:
1.docker 启动frps
2.docker 启动nginx
3.内网启动frpc,,此时http服务访问正常
4、mssql,RDP均无法正常使用

Describe the results you received:
这个是服务端日志,客户端没有日志
2020/04/27 08:24:07 [I] [dashboard_api.go:314] Http request: [/api/traffic/RDP] 2020/04/27 08:24:07 [I] [dashboard_api.go:308] Http response [/api/traffic/RDP]: code [200] 2020/04/27 08:28:21 [I] [dashboard_api.go:314] Http request: [/api/traffic/mssql] 2020/04/27 08:28:21 [I] [dashboard_api.go:308] Http response [/api/traffic/mssql]: code [200] 2020/04/27 08:28:26 [I] [dashboard_api.go:314] Http request: [/api/traffic/RDP] 2020/04/27 08:28:26 [I] [dashboard_api.go:308] Http response [/api/traffic/RDP]: code [200]
Describe the results you expected:
正常链接SQL客户端,远程内网电脑

Additional information you deem important (e.g. issue happens only occasionally):
docker 启动frps命令
docker run --name=frpServer -d --restart=always -p 7000:7000 -p 7500:7500 -p 8080:8080 -p 8443:8443 -v /www/frp/frps.ini:/frp/frps.ini haitai/frp:laster
服务正常启动
QQ截图20200427170110

Can you point out what caused this issue (optional)

Originally created by @Haitai-92 on GitHub (Apr 27, 2020). Original GitHub issue: https://github.com/fatedier/frp/issues/1781 Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST **What version of frp are you using (./frpc -v or ./frps -v)?** frp 版本为v0.32.1 **What operating system and processor architecture are you using (`go env`)?** 系统为CentOS7 x64 Docker version 19.03.7 **Configures you used:** frps服务端配置 `[common] bind_port = 7000 token = 123456 authentication_timeout = 900 dashboard_port = 7500 dashboard_user = admin dashboard_pwd = 12345 vhost_http_port = 8080 vhost_https_port = 8443 subdomain_host = example.com` frpc 客户端配置 `[common] server_addr = xxx.xxx.xxx.xxx server_port = 7000 token = 123456 [svn] type = http local_port = 80 subdomain = svn [mssql] type = tcp local_ip = 123456 local_port = 1433 remote_port = 1433 [RDP] type = tcp local_ip = 127.0.0.1 local_port = 3389 remote_port = 14330` **Steps to reproduce the issue:** 1.docker 启动frps 2.docker 启动nginx 3.内网启动frpc,,此时http服务访问正常 4、mssql,RDP均无法正常使用 **Describe the results you received:** 这个是服务端日志,客户端没有日志 `2020/04/27 08:24:07 [I] [dashboard_api.go:314] Http request: [/api/traffic/RDP] 2020/04/27 08:24:07 [I] [dashboard_api.go:308] Http response [/api/traffic/RDP]: code [200] 2020/04/27 08:28:21 [I] [dashboard_api.go:314] Http request: [/api/traffic/mssql] 2020/04/27 08:28:21 [I] [dashboard_api.go:308] Http response [/api/traffic/mssql]: code [200] 2020/04/27 08:28:26 [I] [dashboard_api.go:314] Http request: [/api/traffic/RDP] 2020/04/27 08:28:26 [I] [dashboard_api.go:308] Http response [/api/traffic/RDP]: code [200] ` **Describe the results you expected:** 正常链接SQL客户端,远程内网电脑 **Additional information you deem important (e.g. issue happens only occasionally):** docker 启动frps命令 `docker run --name=frpServer -d --restart=always -p 7000:7000 -p 7500:7500 -p 8080:8080 -p 8443:8443 -v /www/frp/frps.ini:/frp/frps.ini haitai/frp:laster` 服务正常启动 ![QQ截图20200427170110](https://user-images.githubusercontent.com/5423555/80354099-dfde6a00-88a8-11ea-9e4e-b99dd3673fb2.png) **Can you point out what caused this issue (optional)**
Author
Owner

@Haitai-92 commented on GitHub (Apr 28, 2020):

另一种方式,不再使用docker,直接部署,然后frps的bind_addr参数与nginx的proxy_pass参数要同时为服务器本地IP即可

<!-- gh-comment-id:620431264 --> @Haitai-92 commented on GitHub (Apr 28, 2020): 另一种方式,不再使用docker,直接部署,然后frps的bind_addr参数与nginx的proxy_pass参数要同时为服务器本地IP即可
Author
Owner

@Kiritow commented on GitHub (Jun 27, 2021):

也许可以尝试一下host网络模式?

<!-- gh-comment-id:869089805 --> @Kiritow commented on GitHub (Jun 27, 2021): 也许可以尝试一下host网络模式?
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#1410
No description provided.