[Samba] Right-way to use " bind interfaces only = Yes"?

Gilles codecomplete at free.fr
Sun Jun 22 11:01:25 UTC 2025


Hello,

Is  "bind interfaces only = Yes" a good thing to use, and in that case, 
what's the right way to fix it 
<https://askubuntu.com/questions/108040/samba-needs-additional-restart-on-reboot/349142#349142> 
(on Debian)?

If I use it, Samba only listens to the loopback interface.

Thank you.

=============
root at debian-dell:~# netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address  State      
  PID/Program name
tcp        0      0 127.0.0.1:445           0.0.0.0:*  LISTEN      396/smbd
=============
root at debian-dell:~# cat /etc/samba/smb.conf
[global]
netbios name = DEBIAN-DELL
server role = standalone server
security = user
disable netbios = yes
smb ports = 445

map to guest = Bad User
guest account = www-data

;interfaces = lo, enp4s0
;interfaces = 192.168.0.19/255.255.255.0 127.0.0.1/255.255.255.255
interfaces = 192.168.0.19/24 127.0.0.1/32
bind interfaces only = Yes
=============
vi smb.conf

[global]
...
interfaces = 192.168.0.19/24 127.0.0.1/32
;bind interfaces only = Yes
=============
systemctl restart smbd
=============
root at debian-dell:/etc/samba# netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address  State      
  PID/Program name
tcp        0      0 0.0.0.0:445             0.0.0.0:*  LISTEN      515/smbd
=============
root at debian-dell:/etc/samba# cat /etc/init/smbd.conf
cat: /etc/init/smbd.conf: No such file or directory
root at debian-dell:/etc/samba# which smbd.conf
root at debian-dell:/etc/samba#
=============


More information about the samba mailing list