I have a VirtualBox vm (Slackware 13.1) which runs a samba share. I just moved that vm from a Windows 7 host to a Linux host (Slackware 14.1).
But now I cannot reach the share anymore. Why?
That's the only vm running on the host. The vm uses NAT and port forwarding is the same as it was in the Windows host:
137 > 137
138 > 138
139 > 139
445 > 445
Should I change something on the host?
I'm not sure the ports are properly forwarded, since I got the following from nmap
on the host:
root@machine:/home/vboxuser# nmap -sT -O localhost
Starting Nmap 6.40 ( http://nmap.org ) at 2016-06-15 09:26 BRT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000039s latency).
Not shown: 993 closed ports
PORT STATE SERVICE
22/tcp open ssh
37/tcp open time
80/tcp open http
113/tcp open ident
2222/tcp open EtherNet/IP-1
3306/tcp open mysql
3389/tcp open ms-wbt-server
No exact OS matches for host (If you know what OS is running on it, see http://nmap.org/submit/ ).
TCP/IP fingerprint:
OS:SCAN(V=6.40%E=4%D=6/15%OT=22%CT=1%CU=40410%PV=N%DS=0%DC=L%G=Y%TM=5761497
OS:2%P=i486-slackware-linux-gnu)SEQ(SP=106%GCD=1%ISR=108%TI=Z%CI=I%II=I%TS=
OS:A)OPS(O1=MFFD7ST11NW7%O2=MFFD7ST11NW7%O3=MFFD7NNT11NW7%O4=MFFD7ST11NW7%O
OS:5=MFFD7ST11NW7%O6=MFFD7ST11)WIN(W1=AAAA%W2=AAAA%W3=AAAA%W4=AAAA%W5=AAAA%
OS:W6=AAAA)ECN(R=Y%DF=Y%T=40%W=AAAA%O=MFFD7NNSNW7%CC=Y%Q=)T1(R=Y%DF=Y%T=40%
OS:S=O%A=S+%F=AS%RD=0%Q=)T2(R=N)T3(R=N)T4(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%
OS:RD=0%Q=)T5(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)T6(R=Y%DF=Y%T=40%W
OS:=0%S=A%A=Z%F=R%O=%RD=0%Q=)T7(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)
OS:U1(R=Y%DF=N%T=40%IPL=164%UN=0%RIPL=G%RID=G%RIPCK=G%RUCK=G%RUD=G)IE(R=Y%D
OS:FI=N%T=40%CD=S)
Network Distance: 0 hops
OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 13.06 seconds
I was expecting nmap
to show 137, 138, 139, 445. Why they are not appearing?
On the guest I see:
PORT STATE SERVICE
22/tcp open ssh
37/tcp open time
113/tcp open auth
139/tcp open netbios-ssn
445/tcp open microsoft-ds
And this:
# netstat -ntlup | grep smbd
tcp6 0 0 :::445 :::* LISTEN 1595/smbd
tcp6 0 0 :::139 :::* LISTEN 1595/smbd
And for nmbd
:
# netstat -ntlup | grep nmbd
udp 0 0 10.0.2.255:137 0.0.0.0:* 1600/nmbd
udp 0 0 10.0.2.15:137 0.0.0.0:* 1600/nmbd
udp 0 0 0.0.0.0:137 0.0.0.0:* 1600/nmbd
udp 0 0 10.0.2.255:138 0.0.0.0:* 1600/nmbd
udp 0 0 10.0.2.15:138 0.0.0.0:* 1600/nmbd
udp 0 0 0.0.0.0:138 0.0.0.0:* 1600/nmbd
netstat -ntlup | grep smbd
), and that it is allowed by your firewall. Samba is installed, and your smb.conf is being loaded right? doestestparm -s
show anything? Anyway NAT problems are always one of the Three P's; Process running, Port established on accessible IP, and Path between the source and dest IPs. so confirm that smbd is running, listening on 0.0.0.0 or the box IP, and isn't being blocked by a firewall between IPs.netstat
seems ok?:::*
is Ipv6 for0.0.0.0
, so thats good. I assume you are using IPv6 only? otherwise there is a problem with samba binding to IPv4. are there entries for UDP\137,138 if you switchsmbd
tonmbd
? if so, and you can connect to samba locally, then the issue is firewall or NAT. You could always put the connection in bridged mode, set a static IP in the lan range, and confirm that everything is working, if you want to eliminate NAT as a potential issue.:::*
and0.0.0.0:*
shown in return ofsmbd
andnmbd
? Is it ok? Locally I can acccess the shares via Dolphin. Since there is no firewall in Slackware I guess that's not the issue.