1. 问题描述
在GPU云服务器Ubuntu上安装了Samba服务后,在
该GPU云服务器上用smbclient无论用公网IP还是私有IP都可以列出共享目录,但在公网上Windows或Mac系统无法访问该共享目录。
2. 报错信息
在公网的Windows上资源浏览器访问\\{公网IP}\{共享目录名}提示找不到。
在公网的Windows上ping {公网IP}显示不通。
ping
{公网IP}
PING
{公网IP} (
{公网IP}) 56(84) bytes of data.
...
---
{公网IP} ping statistics ---
14 packets transmitted, 0 received, 100% packet loss, time 13103ms
3. 详细log
在新买的GPU云服务器上安装samba服务。按照这个教程:
https://help.ubuntu.com/community/How%20to%20Create%20a%20Network%20Share%20Via%20Samba%20Via%20CLI%20%28Command-line%20interface/Linux%20Terminal%29%20-%20Uncomplicated%2C%20Simple%20and%20Brief%20Way%21
安装完毕后,用公网IP在GPU云服务器上测试是OK的:
smbclient -L //
{公网IP}
WARNING: The "syslog" option is deprecated
Enter root's password:
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.3.11-Ubuntu]
Sharename Type Comment
--------- ---- -------
netlogon Disk Network Logon Service
print$ Disk Printer Drivers
share Disk Shared
IPC$ IPC IPC Service (iZuf6fn42lql5tio94cab7Z server (Samba, Ubuntu))
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.3.11-Ubuntu]
Server Comment
--------- -------
IZUF6FN42LQL5TI iZuf6fn42lql5tio94cab7Z server (Samba, Ubuntu)
Workgroup Master
--------- -------
WORKGROUP
但在公网上的Windows机器远程访问\\
{公网IP}\share提示找不到。
另外,我也已经配置了安全组策略: