Which of the following configuration files are used by tcpwrapper?
A. /etc/tcpd.allow and etc/tcpd.deny
B. /etc/tcpwrapper.allow and /etc/tcpwrapper.deny
C. /etc/hosts.allow and /etc/hosts.deny
D. /etc/service.allow and /etc/service.deny
題解
TCP Wrapper 可以使用「/etc/hosts.allow」等設定檔來設定允許透過網路連入使用服務的主機。「/etc/hosts.allow」設定檔可用來設定允許透過網路連入使用服務的主機。若連入的主機符合「/etc/hosts.allow」檔案內的規則,就會被允許連入。若「/etc/hosts.deny」檔案存在,則只會拒絕存在於「/etc/hosts.deny」檔案的主機名稱透過網路連入。若「/etc/hosts.allow」檔案和「/etc/hosts.deny」檔案都存在,會先檢查「/etc/hosts.allow」檔案,符合的話就允許連入,不符合的話再檢查「/etc/hosts.deny」檔案,符合的話就拒絕連入。若「/etc/hosts.allow」檔案和「/etc/hosts.deny」檔案都不存在,則所有主機都允許連入。
因此答案是選項「C」。
