20170327-小知识-fail2ban等

1:tcpwrapper

显示誰连接我的ssh被禁止了:

vim /etc/hosts.deny

sshd: all : spawn (wall "sshd deny" %a ) &

帮助: man hosts.deny

通过日志的方法显示 如下:

28212649_DV6e.jpg

28212649_2Beo.jpg

防止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

 

28212649_GuKQ.jpg

28212649_Ar3d.jpg

28212649_PGh6.jpg

28212649_dCj2.jpg

转载于:https://my.oschina.net/u/3217381/blog/868667

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值