mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #1997] stcp with frpc run by docker fail 容器中运行frpc的stcp功能无法访问 #1588
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#1588
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 @fanlix on GitHub (Sep 21, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/1997
使用stcp, 在A机透过frps访问B机的端口.
如果A机中的frpc运行在docker中, 则A机无法访问到B机
难道stcp对docker的端口映射有什么特殊要求?
环境:
相同环境下的参考:
frpc-B.ini
frpc-A.ini
A机的docker-compose.yml
A机docker启动logs
@blizard863 commented on GitHub (Sep 21, 2020):
ssh -p 7122 abc@127.0.0.1 -vvv 看下详情
@blizard863 commented on GitHub (Sep 21, 2020):
可以在本机访问的时候, 抓个包看下为什么 reset by peer。
@fanlix commented on GitHub (Sep 22, 2020):
在docker内运行frpc时无法连接, ssh -vvv完整日志
tcpdump 完整过程
最后一条, 连接被17122端口直接Reset了. 其他看不懂.
此时, docker层和frpc层无任何日志.
对比: 直接在OS运行frpc时, ssh可以连接, -vvv部分日志
tcpdump
相同环境,创建了个简单的sshd容器, 能通过docker端口转发连进容器里的sshd的22端口.
tcpdump
any more idea?
@ReeFish commented on GitHub (Oct 7, 2020):
@fanlix 遇到相同的问题,有解决么?
@ReeFish commented on GitHub (Oct 8, 2020):
大致知道了原因,mac电脑下,如果docker以host模式运行容器,是不会生效的,因为host模式只有支持linux。可以参考:https://yuanmomo.net/2019/06/13/docker-network/
如果在linux下没有问题
@fanlix commented on GitHub (Oct 13, 2020):
我用的就是linux.
@fatedier commented on GitHub (Oct 13, 2020):
@fanlix 注意上面提到的以 host 模式运行容器。
@ReeFish commented on GitHub (Oct 17, 2020):
@fanlix docker-compose.yml里增加配置:
@ReeFish commented on GitHub (Oct 17, 2020):
hi @fatedier ,顺便问下,针对mac电脑通过docker部署frp的visitor,
有没有可能开发支持 bind_addr 绑定mac电脑本地局域网的IP,比如
而不是
来解决容器和宿主网络不通的问题呢?
@fatedier commented on GitHub (Oct 25, 2020):
@ReeFish 这个参数已经支持,但是不使用 host 模式,是无法绑定在 mac 上网卡的 IP 的。