mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #536] 请问frp能否转发smb协议,实现内网文件共享。 #415
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#415
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 @beijiaoff on GitHub (Nov 26, 2017).
Original GitHub issue: https://github.com/fatedier/frp/issues/536
RT,尝试了修改frpc.ini添加下面的内容。没有生效。是我搞错了还是暂时不具备这个功能?
[smb-udp137]
type = udp
local_ip = 127.0.0.1
local_port = 137
remote_port = 137
[smb-tcp139]
type = udp
local_ip = 127.0.0.1
local_port = 139
remote_port = 139
[smb-tcp445]
type = udp
local_ip = 127.0.0.1
local_port = 445
remote_port = 445
[smb-udp138]
type = udp
local_ip = 127.0.0.1
local_port = 138
remote_port = 138
@lihuimail commented on GitHub (Dec 2, 2017):
type写错了
@beijiaoff commented on GitHub (Dec 5, 2017):
type那里是笔误,实际改了也无效的。
@openmynet commented on GitHub (Dec 6, 2017):
这个工具可能是你需要的udp2raw-tunnel ,不过我没测试。我目前使用的方案是 homeNas[SoftEtherServer] -> SoftEtherClient -> frpc ->frps ->frpc ->SoftEtherClient-> workspace pc
@genkagen commented on GitHub (Dec 6, 2017):
我的方案是client -> frps -> frpc -> sftp -> HomeNas
@beijiaoff commented on GitHub (Dec 7, 2017):
谢谢各位回复。我再尝试一下
@cercky commented on GitHub (Dec 8, 2017):
我的方案更加暴力,openvpn client
@fcying commented on GitHub (Dec 16, 2017):
sftp win下用起来不方便. 还是能转发samba比较好
@whitegerry commented on GitHub (Dec 23, 2017):
用下来win和debian都没问题, 不过是type是tcp
[smb-win]
type = tcp
local_ip = 192.168.1.100
local_port = 445
remote_port = 44501
[smb-debian]
type = tcp
local_ip = 192.168.1.200
local_port = 445
remote_port = 44502
@chuxubank commented on GitHub (Sep 11, 2018):
遇到了同样的问题 @whitegerry 的方法配置无法连接。
@whitegerry commented on GitHub (Sep 12, 2018):
我刚又测试了一遍,没问题的
[smb-debian]
type = tcp
local_ip = 192.168.100.200
local_port = 445
remote_port = 44502
frps.log:
2018/09/12 11:14:55 [I] [smb-debian] tcp proxy listen port [44502]2018/09/12 11:16:07 [I] [smb-debian] get a new work connection: [125.125.125.125:8847]2018/09/12 11:18:10 [I] [smb-debian] get a new work connection: [125.125.125.125:8847]@chuxubank commented on GitHub (Sep 12, 2018):
谢谢,应该是我路由器smb协议或者防火墙的问题,我在Windows上部署的frpc 445端口就可以直接穿透了。
@15klli commented on GitHub (Mar 25, 2019):
@chuxubank 请问能否提供一下您的frpc.ini 呢?方便说一下您的windows系统吗?
@chuxubank commented on GitHub (Mar 25, 2019):
已经很久没有使用了... 配置文件找不到了... 但是高赞回复应该差不多。 系统是Win10
@hxxful commented on GitHub (May 18, 2019):
frpc配置tcp 445转445不行,配置成445转44501倒是可以,但win下访问samba又不能指定端口,我卡在这儿了
@SCGabriel commented on GitHub (Jun 29, 2019):
linux上绑定低于1024的端口需要特权,因为如果你要把445端口的samba印射到另一台机器的445端口,frps需要以root账户运行
或者执行以下命令
sudo setcap cap_net_bind_service=ep /usr/local/frp/frps
(/usr/local/frp/frps 替换成你的frps二进制文件所在位置)
给frps二进制加特权,使得可以绑定低于1024端口
by 某个遇到同样问题,被大佬点通的人喵
@nie11kun commented on GitHub (Mar 13, 2022):
请问下如何配置域名方式访问 smb 呢,我用的 cf 和 nginx
@yjd commented on GitHub (Jul 13, 2022):
可以在本地电脑再转发一下,不过有点小瑕疵,本地共享服务要先停掉,不然445端口已经被占用。
cmd执行:
netsh interface portproxy add v4tov4 listenaddress=本地ip listenport=445 connectaddress=服务器ip connectport=44501
win访问smb:
\\本地ip
@1500256797 commented on GitHub (Mar 13, 2023):
telnet 101.43.118.68 44502 也没问题
我按照映射,445--》44502,然后在公网上也开通了端口。
我在我的另一台windows11上进行访问,提示无法连接。

报错

@lhuanyun commented on GitHub (May 25, 2025):
印象中,win里面samba加端口也不生效。