The Samba configuration file contains the following lines:

hosts allow = 192.168.1.100 192.168.2.0/255.255.255.0 localhost
host deny = 192.168.2.31
interfaces = 192.168.1.0/255.255.255.0 192.168.2.0/255.255.255.0

A workstation is on the wired network with an IP address of 192.168.1.177 but is unable to access the Samba server. A wireless laptop with an IP address 192.168.2.93 can access the Samba server. Additional trouble shooting shows that almost every machine on the wired network is unable to access the Samba server.

Which alternate host allow declaration will permit wired workstations to connect to the Samba server without denying access to anyone else?

A.

hosts allow = 192.168.1.1-255

B.

hosts allow = 192.168.1.100 192.168.2.200 localhost

C.

hosts deny = 192.168.1.100/255.255.255.0 192.168.2.31 localhost

D.

hosts deny = 192.168.2.200/255.255.255.0 192.168.2.31 localhost

E.

hosts allow = 192.168.1.0/255.255.255.0 192.168.2.0/255.255.255.0 localhost

题解

根据题目的叙述,我们可以知道「192.168.1.0/255.255.255.0」这个网段为有线网络界面,且只有「192.168.1.100」有权限能访问。若要将有线网络界面的访问权限完全开放,就必须要将「192.168.1.0/255.255.255.0」这个网段整个加进「hosts allow」中。

所以答案是选项「E」。