Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
samba 2NIC's
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
kevdoig
Apprentice
Apprentice


Joined: 03 May 2004
Posts: 171

PostPosted: Thu May 13, 2004 8:59 pm    Post subject: samba 2NIC's Reply with quote

Hi, i'm trying to setup a 2 NIC system. eth0 will be used for a samba network, and eth1 for internet access (assigned by DHCP) . I think i'll have to bind my samba server to eth0, but can't find any advice on how to do this? any suggestions or smb.conf for similar setups, would be much appreciated.
Back to top
View user's profile Send private message
GetCool
Guru
Guru


Joined: 23 Nov 2003
Posts: 324
Location: Madison, Wisconsin

PostPosted: Thu May 13, 2004 9:06 pm    Post subject: Reply with quote

Well what I do is use a firewall on my server and only open the samba-related ports on my internal network. That way you can't get to my samba share from the internet. I'm not sure if you can bind samba to a particular NIC or not, but I do know you can also use the "hosts allow =" parameter in your smb.conf to only allow internal addresses, like this:
Code:
[global]
hosts allow = 192.168.0.


Last edited by GetCool on Thu May 13, 2004 9:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
grepcomputers
Guru
Guru


Joined: 16 Sep 2003
Posts: 375

PostPosted: Thu May 13, 2004 9:06 pm    Post subject: Reply with quote

From smb.conf:
Code:
# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
   interfaces = 192.168.0.2


This binds my samba server to my internal network, on interface eth2 (eth2/my computer has an ip of 192.168.0.2)

cheers...
...grep
Back to top
View user's profile Send private message
GetCool
Guru
Guru


Joined: 23 Nov 2003
Posts: 324
Location: Madison, Wisconsin

PostPosted: Thu May 13, 2004 9:09 pm    Post subject: Reply with quote

grepcomputers wrote:
From smb.conf:
Code:
# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
   interfaces = 192.168.0.2


This binds my samba server to my internal network, on interface eth2 (eth2/my computer has an ip of 192.168.0.2)

cheers...
...grep

Well there you go ;)

I'd also recommend using a firewall if that machine is going to be directly on the internet, just as an extra precaution.
Back to top
View user's profile Send private message
grepcomputers
Guru
Guru


Joined: 16 Sep 2003
Posts: 375

PostPosted: Fri May 14, 2004 12:43 am    Post subject: Reply with quote

GetCool wrote:
I'd also recommend using a firewall if that machine is going to be directly on the internet, just as an extra precaution.


I heartily second that.

Also, from "man smb.conf"
Quote:
interfaces (G)
This option allows you to override the default network inter-
faces list that Samba will use for browsing, name registration
and other NBT traffic. By default Samba will query the kernel
for the list of all active interfaces and use any interfaces
except 127.0.0.1 that are broadcast capable.

The option takes a list of interface strings. Each string can be
in any of the following forms:

a network interface name (such as eth0). This may include
shell-like wildcards so eth* will match any interface starting
with the substring "eth"

an IP address. In this case the netmask is determined from the
list of interfaces obtained from the kernel

an IP/mask pair.

a broadcast/mask pair.

The "mask" parameters can either be a bit length (such as 24 for
a C class network) or a full netmask in dotted decimal form.

The "IP" parameters above can either be a full dotted decimal IP
address or a hostname which will be looked up via the OS's nor-
mal hostname resolution mechanisms.


so it would appear that:
Code:
interfaces = eth2

will do the same thing (and probably is what I should use instead...huh, learn something new everyday. I must remember, "man pages are our friends")

cheers...
Back to top
View user's profile Send private message
kevdoig
Apprentice
Apprentice


Joined: 03 May 2004
Posts: 171

PostPosted: Fri May 14, 2004 9:01 am    Post subject: Reply with quote

thanks working fine now :lol:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum