View previous topic :: View next topic |
Author |
Message |
kevdoig Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/575095653412cce8333f69.gif)
Joined: 03 May 2004 Posts: 171
|
Posted: Thu May 13, 2004 8:59 pm Post subject: samba 2NIC's |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
GetCool Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1565351838445b15bd7c336.jpg)
Joined: 23 Nov 2003 Posts: 324 Location: Madison, Wisconsin
|
Posted: Thu May 13, 2004 9:06 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
grepcomputers Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 16 Sep 2003 Posts: 375
|
Posted: Thu May 13, 2004 9:06 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
GetCool Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1565351838445b15bd7c336.jpg)
Joined: 23 Nov 2003 Posts: 324 Location: Madison, Wisconsin
|
Posted: Thu May 13, 2004 9:09 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
grepcomputers Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 16 Sep 2003 Posts: 375
|
Posted: Fri May 14, 2004 12:43 am Post subject: |
|
|
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:
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 |
|
![](templates/gentoo/images/spacer.gif) |
kevdoig Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/575095653412cce8333f69.gif)
Joined: 03 May 2004 Posts: 171
|
Posted: Fri May 14, 2004 9:01 am Post subject: |
|
|
thanks working fine now ![Laughing :lol:](images/smiles/icon_lol.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|