Samba on two Interfaces

Issues related to configuring your network
Post Reply
may24
Posts: 30
Joined: 2014/10/13 15:35:36

Samba on two Interfaces

Post by may24 » 2015/09/02 14:37:23

Hi All,

I've a File Server running CENTOS 7.1 with two interfaces: enp4s0 & enp4s1

enp4s0: 192.168.1.10
enp4s1: 192.168.2.10

Both shall share different dir's of the underlying Raid system.
But how to setup the Samba service to work on two interfaces ?
Or if that's not possible, how to setup multiple instances of Samba ?

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Samba on two Interfaces

Post by aks » 2015/09/02 18:30:07

Can't you get Samba to listen on both interfaces? Is that the problem?

may24
Posts: 30
Joined: 2014/10/13 15:35:36

Re: Samba on two Interfaces

Post by may24 » 2015/09/02 20:55:09

No, that's not the problem.
The point is: I've two interfaces that support two different networks. And both net's should get their shares from this machine

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Samba on two Interfaces

Post by gerald_clark » 2015/09/02 21:31:14

Then what is the problem?

may24
Posts: 30
Joined: 2014/10/13 15:35:36

Re: Samba on two Interfaces

Post by may24 » 2015/09/03 11:34:34

How to:

configure samba to work on two different sub-nets

or

start two different instances of Samba so I'd have one per subnet

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Samba on two Interfaces

Post by TrevorH » 2015/09/04 00:10:13

Samba works on multiple interfaces at the same time if you tell it to do so. What is your concern about doing that?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: Samba on two Interfaces

Post by lightman47 » 2015/09/04 11:26:10

How to:
Going out on a limb here I think they're eluding to options in the /etc/samba/smb.conf file. I'm by no means an expert but I'd guess it's a matter of defining the interfaces. I did a little digging and found the docs below but didn't immediately spot any references to your question therein.

https://access.redhat.com/documentation ... samba.html

Hopefully someone with more know-how than myself will step in. In the meantime perhaps you'll find something worth while.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Samba on two Interfaces

Post by aks » 2015/09/04 17:35:02

As a clue, if samba is listening on all interfaces (usually presented as *:<port number> in ss and netstat) then it'll "get" requests to it from any network connected.

User avatar
barry905
Posts: 89
Joined: 2014/07/18 02:11:38

Re: Samba on two Interfaces

Post by barry905 » 2015/09/06 08:17:23

If I understand it correctly, samba by defaults listens on all active interfaces. You can restrict it, or include a complete list using the "interfaces" directive, but you only need one instance of samba to provide shares to you network.

You may have a problem, however, if you want to offer different services on each interface.

Post Reply