centos8 變動比較大,默認沒python,可以執(zhí)行:dnf install python2
alternatives --set python /usr/bin/python2
pip2 install ipaddr
后再進行安裝
Press any key to start...or Press Ctrl+c to cancel
Last metadata expiration check: 0:02:00 ago on Sun 22 Mar 2020 02:13:00 PM CST.
No match for argument: python
There are following alternatives for "python": python2, python36
Package rsyslog-8.37.0-13.el8.x86_64 is already installed.
No match for argument: python-ipaddr
Error: Unable to find a match: python python-ipaddr
Redirecting to /bin/systemctl restart rsyslog.service
Downloading...
denyhosts-3.1.tar.gz [found]
../include/main.sh: line 430: cd: /src: No such file or directory
Uncompress denyhosts-3.1.tar.gz...
cd denyhosts-3.1...
Installing...
./denyhosts.sh: line 33: python: command not found
Copy files...
cp: cannot stat '/usr/bin/daemon-control-dist': No such file or directory
chown: cannot access '/usr/bin/daemon-control': No such file or directory
chmod: cannot access '/usr/bin/daemon-control': No such file or directory
cp: cannot stat '/usr/bin/daemon-control': No such file or directory
sed: can't read /etc/init.d/denyhosts: No such file or directory
sed: can't read /etc/init.d/denyhosts: No such file or directory
Add denyhosts service at system startup...
error reading information on service denyhosts: No such file or directory
error reading information on service denyhosts: No such file or directory
Start DenyHosts...
./denyhosts.sh: line 82: /etc/init.d/denyhosts: No such file or directory
@xiao, 這個就是官網(wǎng)的方法用腳本來實現(xiàn)的,測試看是沒問題,能正常移除ip。lnmp安裝包tools目錄下也有,你也可以直接用安裝包里的試試
]]>你文中提到的“wget http://soft.vpser.net/security/denyhosts/denyhosts_removeip.sh && bash denyhosts_removeip.sh 要解封的IP”解封ip的方法好像不行了,試過報錯了。
官方文檔的方法需要手動刪除多個文件中的ip記錄,http://denyhosts.sourceforge.net/faq.html#3_19。
]]>@Aceslup, 長期禁用只能通過iptables 自己單獨添加了
]]>@葉子天堂, 白名單在 /usr/share/denyhosts/data/allowed-hosts 沒這個文件的話創(chuàng)建一個 將ip添加到這個文件里 重啟就可以
]]>