SMB Share on second NIC

Hi,

i add a second nic to my ucs server. i want to mount a smb share from server to my client connected via second network. But it does not work. The client connected via first nic can mount the share without problems. i think i must enable smb service on second nic.

Hi @bumann,

what is the out put of?

root@ucs:~# ucr search samba/interfaces

That would be my first try to set the values there.

Best, Bernd

1 Like

Hi Bernd,

the output is:

samba/interfaces/bindonly: yes
 If this variable is set to 'yes', Samba only listens to requests on the network interfaces specified in the variable 'samba/interfaces'. If the variable is unset, Samba listens on all interfaces.

samba/interfaces: lo <interfaces/primary> lo
 If the variable 'samba/interfaces/bindonly' is set to 'yes', Samba only binds to the interfaces listed in this variable. Multiple entries need to be separated by blanks.

i think i must set the interface in smb.conf file but i cannot find a place in ucs.

Configure Samba to Bind to Specific Interfaces
If your Server uses multiple network interfaces, you can configure Samba to bind only to specific interfaces. For example, if Samba is installed on a router with one network interface connected to the internet and one to the internal network.

To bind all Samba services to the eth0 and the loopback (lo) device:

Add the following parameters to the [global] section of your smb.conf file:
bind interfaces only = yes
interfaces = lo eth0
The interfaces parameter enables you to use alternative values, such as IP addresses instead of device names. For further details, see the smb.conf (5) man page.
Note that you should always enable Samba to listen on the loopback (lo) devices. Several utilities connect to the loopback IP if no host name is provided.
Restart the Samba service(s).

i found the solution to set the ucr-variable in ucs webgui.
I set samba/interfaces/bindonly to no

Thanks!

From cli, do the following:
I tried using ucr set samba/interfaes/bindonly='no' which looked like it worked, but the smb config was not set. Instead I did vi /etc/samba/smb.conf, search for “bind”, and change the “bind only” value to no. Then run a systemctl restart samba-ad-dc.service.
Check your work with --> netstat -tulpn | grep "3269\|3268\|636\|389", or replace which ports you want to check. If “0.0.0.0:” is listed, its listening on all interfaces.

Mastodon