openwrt网络共享zeroTier异地无法访问原因

写在前面

设置共享这些就不写了,主要写一下这次遇到的问题

1,共享后,本地局域网IP:192.168.2.2 能正常打开共享目录

1

2,zerotier后,虚拟的IP:192.168.192.215 ,WEB能正常访问

3,IP:192.168.192.215 SMB不能访问共享目录

过程

首先以为是防火墙问题,一通设置后,把原来跑不满千兆原因反而找到了,也算因额外收获吧!

https://mailberry.com.cn/2021/01/%e8%ae%b0%e5%bd%95%e4%b8%80%e4%b8%8b%e7%8e%a9%e5%ae%a2%e4%ba%91%e5%ae%89%e8%a3%85openwrt%e5%8f%8a%e9%85%b8%e9%85%b8%e4%b9%b3plus%e8%bf%87%e7%a8%8b/

接着从共享找原因

先看对比以前能正常使用的模板

[global]
netbios name = |NAME|
display charset = |CHARSET|
interfaces = |INTERFACES|
server string = |DESCRIPTION|
unix charset = |CHARSET|
workgroup = |WORKGROUP|
bind interfaces only = no
deadtime = 30
enable core files = no
# invalid users = root
local master = no
map to guest = Bad User
max protocol = SMB2
min receivefile size = 16384
null passwords = yes
security = user
passdb backend = smbpasswd

smb passwd file = /etc/samba/smbpasswd

use sendfile = yes

现在固件代码

[global]
netbios name = |NAME|
display charset = |CHARSET|
interfaces = |INTERFACES|
server string = |DESCRIPTION|
unix charset = |CHARSET|
workgroup = |WORKGROUP|
bind interfaces only = yes
deadtime = 30
enable core files = no
#invalid users = root
local master = yes
map to guest = Bad User
max protocol = SMB2
min receivefile size = 16384
null passwords = yes

passdb backend = smbpasswd
security = user
smb passwd file = /etc/samba/smbpasswd
socket options = TCP_NODELAY IPTOS_LOWDELAY
use sendfile = yes

通过对比

以现能正常使用的模板与不能访问的新模板有2行代码不一样

bind interfaces only = no

local master = no

新模板还多了行代码

socket options = TCP_NODELAY IPTOS_LOWDELAY

解决办法

只要把bind interfaces only = yes 改成no就可以了

暂无评论

发表评论

您的电子邮件地址不会被公开,必填项已用*标注。

相关推荐

hg556a刷了官方openwrt安装aria2,增加自启动

其实hg556a已经有很好的大集合功能固件了!如:

openwrt-HW556-squashfs-cfe(BIG).bin
这个固件=管版+中文LUCI+Samba+挂载点+aria2+aria2中文LUCI+aria2中文web+transmission+transmission中文LUCI+transmission中文Web+DDNS+Upnp+P2Plock+Multi-WAN+QOS(一步到位方便不会弄得人,全是中文哦~~~~)

hg556a官方openwrt固件安装挂载点

前面介绍了,装好aira2自启动!《hg556a刷了官方openwrt安装aria2,增加自启动》无非就是想实现离线下载嘛,既然要下载,那挂上移动硬盘和U盘那是必须的嘛,但官方固件没有集成这些挂载点的WEB管理页面,那就自己装吧!

微信扫一扫,分享到朋友圈

openwrt网络共享zeroTier异地无法访问原因