我有一个 VirtualBox 虚拟机 (Slackware 13.1),它运行 samba 共享。我刚刚将该虚拟机从 Windows 7 主机移至 Linux 主机 (Slackware 14.1)。
但现在我无法再访问该共享。为什么?
这是主机上运行的唯一虚拟机。虚拟机使用 NAT,端口转发与 Windows 主机中的相同:
137 > 137
138 > 138
139 > 139
445 > 445
我应该在主机上做些改变吗?
我不确定端口是否正确转发,因为我从nmap
主机上获得了以下信息:
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
我原本期望nmap
显示 137、138、139、445。为什么它们没有出现?
在客人身上我看到:
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
和这个:
# netstat -ntlup | grep smbd
tcp6 0 0 :::445 :::* LISTEN 1595/smbd
tcp6 0 0 :::139 :::* LISTEN 1595/smbd
对于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