Samba on jail behind NAT

Hello,

I 'd like to install Samba on a FreeBSD jail.
I read some people had trouble with using (or trying to use) Samba behind NAT rather than bridge mode in a FreeBSD jail.
Are there restrictions on using NAT in the Samba case? Are there special settings to take care of within FreeBSD or/and Samba?

thanks
 
SMB uses UDP broadcasts that do not traverse NAT. That's why it's not possible to see an SMB service that is behind a NAT directly in the network neighbourhood in windows. The SMB service itself is usable if used with a direct IP address/hostname.
 
From http://www.samba.org documentation:

Broadcast versus NBNS name registration

As mentioned earlier, there must be a way to resolve a NetBIOS name to a specific IP address; this is known as name resolution. There are two different approaches with NBT here as well:

• Have each computer report back its IP address when it "hears" a broadcast request for its NetBIOS name.

• Use an NBNS to help resolve NetBIOS names to IP addresses.


And:

Normally, only unicast UDP messaging can be forwarded by routers. The remote announce parameter to smb.conf helps to project browse announcements to remote network segments via unicast UDP. Similarly, the remote browse sync parameter of smb.conf implements browse list collation using unicast UDP.

The methods used by MS Windows to perform name lookup requests [...] the NetBIOS node-type. There are four basic NetBIOS node types:

•b-node (type 0x01): The Windows client will use only NetBIOS broadcast requests using UDP broadcast.

•p-node (type 0x02): The Windows client will use point-to-point (NetBIOS unicast) requests using UDP unicast directed to a WINS server.

•m-node (type 0x04): [...]

•h-node (type 0x08): The Windows client will use (NetBIOS unicast) requests using UDP unicast directed to a WINS server, then it will use NetBIOS broadcast requests using UDP broadcast.


Is it not possible to use unicast only if have not a large network?
 
Back
Top