[Samba] Right-way to use " bind interfaces only =?utf-8?Q?=3D_?=Yes"?
Luis Peromarta
lperoma at icloud.com
Sun Jun 22 11:50:24 UTC 2025
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
More information about the samba
mailing list