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