对于能过xinetd程序启动的网络服务,比如ftp telnet,我们就可以修改/etc/hosts.allow和/etc/hosts.deny的配制,来许可或者拒绝哪些IP、主机、用户可以访问。
/etc/hosts.allow配置示例:
sshd:211.XX.xx.*:allow
sshd:117.152.XX.XX:allow
/etc/hosts.deny配置示例
sshd:ALL:deny
对于能过xinetd程序启动的网络服务,比如ftp telnet,我们就可以修改/etc/hosts.allow和/etc/hosts.deny的配制,来许可或者拒绝哪些IP、主机、用户可以访问。
/etc/hosts.allow配置示例:
sshd:211.XX.xx.*:allow
sshd:117.152.XX.XX:allow
/etc/hosts.deny配置示例
sshd:ALL:deny