mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #3235] 默认服务端开启了IPV6监听,但是没有监听IPV4,所有客户端无法连接 #2598
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#2598
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 @fschenkun22 on GitHub (Jan 2, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3235
Bug Description
服务器配置如下:
使用Linux 命令 netstat -ant 查看端口占用情况
只能看到监听了tcp6的端口 ,但是ipv4的默认没有监听,所以所有客户端都无法进行连接。
文档中没有发现对应监听IPV4 或者 IPV6 的配置项
frpc Version
0.46.0
frps Version
0.46.0
System Architecture
linux/amd64 ;Linux first 3.10.0-1160.71.1.el7.x86_64 #1 SMP Tue Jun 28 15:37:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Configurations
server端配置:
客户端配置:
Logs
客户端连接时超时,因为服务端没有监听IPV4 所以出现超时
Steps to reproduce
...
Affected area
@superzjg commented on GitHub (Jan 2, 2023):
日志信息中出现的"my server ip"字样,我感到很困惑,能解释一下吗?猜测日志信息如果你贴上来没有进行修改,那么配置的server_addr = "my server ip"并不是你为了暴露隐私而改的,而是就是这样设置的(那么肯定连不上)。
@fschenkun22 commented on GitHub (Jan 3, 2023):
就是隐私 “my server ip” 替代了我现在真实ip 加了引号
@superzjg commented on GitHub (Jan 3, 2023):
我也用命令netstat -ant看了,确实跟你说的情况一致,只有:::54235 LISTEN,但是我的frpc可以通过ipv4的54235端口连接,连接以后再次使用命令可看到有一个格式为::ffff:175.0.XX.XX:54235 ESTABLISHED状态的连接,这种格式有点特殊,其中175.0.XX.XX为ipv4地址。并且另外的服务,比如frps的仪表盘端口和filebrowser的监听也是同样的显示,但是平时使用都是ipv4连接。所以不能以此命令显示的为准。
@Becods commented on GitHub (Jan 5, 2023):
尝试将
net.ipv6.bindv6only设置为0通常情况下
go绑定的tcp6是ipv6和ipv4都可以被访问到的https://github.com/nodejs/node/issues/9390
https://stackoverflow.com/questions/20657650/socket-listener-for-ipv6-and-ipv4
@cinling commented on GitHub (Feb 11, 2023):
以前我也遇到过类似的情况,我碰到的原因是服务器的防火墙或网关禁止这个端口的访问,可以尝试开放端口或关闭防火墙来解决
原因并不是因为 frps 只监听 ipv6(tcp6)导致的,而是因为端口无法访问,显示 tcp6,用ipv4的地址也是可以连接的
希望可以帮到其他人
@crystal0913 commented on GitHub (Jan 6, 2025):
开放一下端口试试:
@cinling commented on GitHub (Jan 6, 2025):
这是来自QQ邮箱的假期自动回复邮件。
我也许不在,但我回尽快回复你的
@linQian99 commented on GitHub (Jan 9, 2025):
我是发现萌新的我不知道云服务还要自己加规则允许某个端口....