hardcoded port 445

Christopher R. Hertel crh at ubiqx.mn.org
Mon Oct 31 14:11:16 MDT 2011

Oskar Liljeblad wrote:
> Hi!
> I will be using Samba4 to operate in client mode.  The tunneling is simple,
> set up with ssh.  E.g.:

Samba is not a client, it is a server.  The Samba project provides a client
library called libsmbclient.  Is that what you what you will be using?

> ssh -L 10000: remotehost
> My application will then connect to to manage the services
> (MSRPC svcctl) on Windows host The reason I can't do
> ssh -L 445:

I am not suggesting that you do so.

> are many: Samba may already be running on the local host, the user may not
> have permissions to listen on 445, and so on.
> I hope that is clear enough, please let me know otherwise!

I am trying to get a clearer picture of your configuration, but at this
point I am only guessing that you are trying to use the libsmbclient toolkit
to make the connection.

Chris -)-----

> On Monday, October 31, 2011 at 14:06, Christopher R. Hertel wrote:
>> By default, the NetBIOS over TCP (NBT) transport protocol (defined in
>> RFC1001/1002) uses port 139.  "Naked" TCP Transport (SMB over TCP without
>> the NBT layer) uses port 445.  One easy way to determine whether or not the
>> NBT layer is in use is to take a look at the port that is being used.
>> Oskar:
>> Are you using Samba as a server or are you using the libsmbclient library to
>> operate in client mode?
>> "NetBIOS" is an API, not a protocol.  "CIFS" is a generic term used in
>> different ways in different contexts.  For example, the official Microsoft
>> protocol specification for the SMB protocol as implemented in Windows NT
>> (3.51 & 4) is known as [MS-CIFS].  What you want to be discussing here is
>> NBT transport vs. Naked (or "Direct Hosted") TCP.
>>> My application will connect to a >=1024, only that it is forwarded
>>> to port 445 on a remote machine. So it will talk MSRPC, only on
>>> a different port than 445.
>> At some point, the packets will be be traveling to/from port 445 or port 139
>> (the latter, only if you use NBT transport).  It is not clear from your
>> messages how the tunneling is intended to work.
> [..]

"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org

More information about the samba-technical mailing list