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」。