I have an Isilon NAS connected to two subnets. I can mount the SMB share fine from the same subnet the Isilon is in, but can't from the other. My It team has assured me ports 445 (and 139 for that matter) are open between the subnets with no IP restrictions.
Weirdly even though I'm specifying SMB2 in the smbclient command it seemly is trying to connect to the NAS using port 139 but can't. I've used mtr to trace ports 445 and 139 from the client to the NAS and everything seems fine.
Here's the smbclient command:
sudo smbclient //my.server/share -U DOMAIN/username%password -m SMB2 --debuglevel=5
And here's the output:
doing parameter client min protocol = SMB2
doing parameter client max protocol = SMB3
doing parameter log level = 5
doing parameter workgroup = WORKGROUP
doing parameter server string = %h server (Samba, Ubuntu)
doing parameter interfaces = lo enp1s0
doing parameter bind interfaces only = yes
doing parameter log file = /var/log/samba/log.%m
doing parameter max log size = 1000
doing parameter logging = file
doing parameter panic action = /usr/share/samba/panic-action %d
doing parameter server role = standalone server
doing parameter obey pam restrictions = yes
doing parameter unix password sync = yes
doing parameter passwd program = /usr/bin/passwd %u
doing parameter passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
doing parameter pam password change = yes
doing parameter map to guest = bad user
doing parameter usershare allow guests = yes
pm_process() returned Yes
added interface lo ip=::1 bcast= netmask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
added interface lo ip=127.0.0.1 bcast=127.255.255.255 netmask=255.0.0.0
added interface enp1s0 ip=<<client ipv6>> bcast= netmask=ffff:ffff:ffff:ffff::
added interface enp1s0 ip=<<client ipv4>> bcast=<<redacted ipv4>> netmask=255.255.255.224
Client started (version 4.15.13-Ubuntu).
Opening cache file at /run/samba/gencache.tdb
sitename_fetch: No stored sitename for realm ''
namecache_fetch: name my.server#20 found.
Connecting to <<server ipv6>> at port 445
convert_string_handle: E2BIG: convert_string(UTF-8,CP850): srclen=28 destlen=16 error: No more room
convert_string_handle: E2BIG: convert_string(UTF-8,CP850): srclen=25 destlen=16 error: No more room
Connecting to <<server ipv6>> at port 139
do_connect: Connection to my.server failed (Error NT_STATUS_IO_TIMEOUT)
Any ideas why smbclient is using port 139 here?