Linux hosts.deny文件记录了被系统拒绝的连接请求,可以通过查看该文件来监控系统的安全性和网络活动。要记录hosts.deny日志,可以通过以下方法实现:
chmod +r /etc/hosts.deny
cat /etc/hosts.deny
echo "daemon.err /var/log/hosts.deny.log" >> /etc/syslog.conf
service syslog restart
通过以上方法,可以将hosts.deny文件中记录的被拒绝连接请求的信息记录到日志文件中,以便后续查看和分析。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>