Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

快速驗證服務是否支持 TCP Wrappers (libwrap) 的兩種方法

編輯:Linux 教學

TCP Wrappers 通過 /etc/hosts.allow、/etc/hosts.deny 實現基於主機的訪問控制。並非所有網絡服務都編譯了 libwrap 支持,需快速驗證。

方法一:ldd 檢查動態鏈接依賴

ldd $(which vsftpd) | grep libwrap

輸出含 libwrap.so.0 即支持。

方法二:strings 搜索特徵字符串

strings $(which portmap) | grep hosts

輸出含 /etc/hosts.allow 和 /etc/hosts.deny 即支持。

判定標準

任一條件滿足,即確認該服務支持 TCP Wrappers。

Copyright © Windows教程網 All Rights Reserved