tcp_wrapper
兩個配置文件:
/etc/hosts.allow
/etc/hosts.deny
關係:先看allow,後看deny。如果allow裏面有匹配,deny裏的相同匹配不生效
#vim /etc/hosts.allow 添加一行
sshd:10.18.44.196
守護進程名稱:ip
域名
10.18.44.
10.18.44.?
10.18.4?.28
10.18.44.*
10.18.44.0/255.255.255.0
linux.huxulong.cn
.huxulong.cn
#gedit /etc/hosts.deny 添加一行
ALL:ALL
vsftpd:10.18.44.196
查看 一個服務是否支持tcp_wrapper:
[root@server ftp]# ldd which sshd
| grep wrap
libwrap.so.0 => /lib64/libwrap.so.0 (0x00007f5218565000)
[root@server ftp]# ldd which httpd
| grep wrap