|Version||Latest Diff||Latest SRPM|
There are no current plans to integrate this patch into the official Samba code base. Until Microsoft releases IPv6-enabled SMB clients and servers, there is very little demand for IPv6 in Samba.
Traditionally, Samba and Microsoft Windows have run SMB on top of the NetBIOS protocol. On the Internet, NetBIOS can be layered on top of TCP and UDP using ports 137, 138, and 139. This is called NetBIOS-over-TCP, or NBT for short, and is essentially a giant hack by Microsoft to make their old legacy networking protocols run on TCP/IP. Since IPv4 addressing is deeply embedded in NBT, it will probably never be possible to run NetBIOS on IPv6, but this is probably for the best.
Fortunately, with Windows 2000 and Windows XP, Microsoft has introduced what they call "direct-hosted SMB", which simply means that the SMB protocol is run directly on TCP on port 445 without all the NetBIOS cruft. SMB itself has no IPv4 dependencies, so it can run on IPv6 without trouble. This is what is supported with the Samba IPv6 patch.
smbd has, for some time, had the ability to accept connections on port 445, but it does not listen on this port when started with the -D option. An Internet "superserver" like inetd must be configured to accept connections on port 445 and start smbd (without the -D flag, of course) as the backend daemon. All that is necessary to IPv6-enable the patched smbd is to ensure that inetd is listening to port 445 on IPv6.
The patch also includes improvements to the address-based access control to allow IPv6 address prefixes to be included in the "hosts allow" directive. For example:
hosts allow = 127. ::1 192.168.0.0/255.255.0.0 3ffe:ffff:1234::/48
The patched smbclient will automatically look up IPv6 addresses as well as IPv4 addresses when resolving names with DNS. For each address that is returned, a connection will be attempted, and if an attempt fails, the next address will be tried. This will be transparent to the user but may be viewed in action with a debug level of 3 or higher. On my system, it looks like this:
$ smbclient -L marduk -d3 Initialising global parameters params.c:pm_process() - Processing configuration file "/etc/samba/smb.conf" Processing section "[global]" added interface ip=192.168.123.75 bcast=192.168.123.255 nmask=255.255.255.0 Client started (version 2.2.3a). resolve_hosts: Attempting getaddrinfo for name marduk<0x20> Connecting to 3ffe:2900:f10a::1 at port 445 error connecting to [3ffe:2900:f10a::1]:445 (Connection refused) Connecting to 192.168.10.1 at port 445 error connecting to [192.168.10.1]:445 (Connection refused) Connecting to 192.168.10.1 at port 139 Password: Domain=[NETWORK] OS=[Unix] Server=[Samba 2.2.3a] Sharename Type Comment --------- ---- ------- [...]
Using IPv6 SMB servers works in the rest of the Samba package, too. For example, an IPv6 host may be used as a password authentication server.
Since Microsoft has yet to make their SMB software IPv6-capable, it is not yet possible to connect to IPv6 Samba servers with Windows. However, a "relay" program may be used to allow a Windows 2000 or XP system to listen on IPv6 at port tcp/445 and relay connections to port 445 on the IPv4 loopback address, but this setup is not recommended for use other than testing.
According to Microsoft literature, the Windows .NET server will support SMB over IPv6, but there have been no reports confirming this and the .NET server has not been tested with the Samba IPv6 patch.