1:tcpwrapper
显示誰连接我的ssh被禁止了:
vim /etc/hosts.deny
sshd: all : spawn (wall "sshd deny" %a ) &
帮助: man hosts.deny
通过日志的方法显示 如下:
防止ssh暴力破解
yum install fail2ban
vim /etc/fail2ban/
mac和ip绑定:
yum install arp-scan
arp-scan -I eth0 -l | tail -n +3 | head -n -3 | awk '{print $2,$1}' >>/etc/ethers
for i in {1..254};do grep -w 192.168.30.$i /etc/ethers || "00.00.00.00.00.00 192.168.30.$i" >> /etc/ehters ;done