桑巴,主机allow = .example.com

我试图限制对.example.com域上的主机访问Samba共享。 但是,当我尝试从该域上的主机连接,我被拒绝。

smb.conf文件

[share1] ... valid users = ralph hosts allow = .example.com 

Samba日志

 check_ntlm_password: authentication for user [ralph] -> [ralph] -> [ralph] succeeded Denied connection from 10.234.56.1 (10.234.56.1) 

这个IP地址有一个反向DNSlogging。 这让我想知道Samba服务器是否真的检查反向logging来查看主机是否在该域中。

如果我删除主机允许声明共享按预期工作。 每次重新启动smb服务时,我都重新启动了nmb服务。

哪个组件负责执行PTRlogging查找?

DNSparsing似乎不起作用。 在hosts allow添加前三个三元组而不是域:

hosts allow = 10.234.56

重新启动桑巴并再次尝试login。

如果需要使用DNS,那么在Samba中需要一些额外的configuration:

7.3.4.4 dns代理

 If you want the domain name service (DNS) to be used if a name isn't found in WINS, you can set the following option: [global] dns proxy = yes 

另请检查以下内容:

7.3.4.5名称parsing顺序

 The global name resolve order option specifies the order of services that Samba will use in attempting name resolution. The default order is to use the LMHOSTS file, followed by standard Unix name resolution methods (some combination of /etc/hosts, DNS, and NIS), then query a WINS server, and finally use broadcasting to determine the address of a NetBIOS name. You can override this option by specifying something like the following: [global] name resolve order = lmhosts wins hosts bcast 

为了使主机允许使用主机名的条目工作,你需要启用

 hostname lookups = yes 

在smb.conf的全局configuration中。

没有WINS设置是我需要这个工作。 nmb服务testing禁用的份额继续工作。