使用 samba 4.1.17-Debian 我尝试了以下 smb.conf 条目来将 samba 绑定到链接本地 ipv6 地址
interfaces = fe80::d270:36a5:ac03:37ea%br0 fe80::/10 ::1
bind interfaces only = yes
Run Code Online (Sandbox Code Playgroud)
但使用 netstat 检查只显示 smbd 监听 ::1
该手册指出,除了可以指定接口名称地址或地址+掩码外,还可以指定任何一种方法。
更新配置:
# ip addr show dev br0 | grep -c fe80
1
# smb.conf
bind interfaces only = yes
interfaces = 192.168.0.0/16 ::1 127.0.0.1 fe80::%br0/64
# smbd --version
Version 4.5.12-Debian
# netstat -lnp | grep smb
tcp 0 0 192.168.0.3:139 0.0.0.0:* LISTEN 17048/smbd
tcp 0 0 127.0.0.1:139 0.0.0.0:* LISTEN 17048/smbd
tcp 0 0 …Run Code Online (Sandbox Code Playgroud)