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# =============
Luis Peromarta
2025-Jun-22 11:50 UTC
[Samba] Right-way to use " bind interfaces only = Yes"?
Modern distributions use a ?predictable name? scheme. Your network card names are important. I?m not sure eth0 would be the name of the interface in Debian / Ubuntu . Read this : http://samba.bigbird.es/doku.php?id=samba:prepare-your-server On 22 Jun 2025 at 13:01 +0200, Gilles via samba <samba at lists.samba.org>, wrote:> 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# > ============> -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba
Rowland Penny
2025-Jun-22 11:57 UTC
[Samba] Right-way to use " bind interfaces only = Yes"?
On Sun, 22 Jun 2025 13:01:25 +0200 Gilles via samba <samba at lists.samba.org> wrote:> 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# > ============From what you posted in your earlier post, this appears to be Samba 4.17.12, so probably Debian 12. In which case, there is no /etc/init directory and there isn't a smbd.conf file, it will be /etc/samba/smb.conf. I do not think that reloading the Samba config will change the interfaces for a running smbd, it binds to the interfaces at startup. Can I suggest you stop using the default Debian Samba and use the version from bookworm-backports, this will get you 4.22.2 at the moment and that is supported by Samba, 4.17.12 is only supported by Debian and as such isn't likely to get fixed if you have hit a bug, which is unlikely. '0.0.0.0' is not the loopback device. 'ifconfig' is deprecated, it has been replaced with 'ip a', what does that show ? Rowland