vulcan

低头做事,抬头看路

   :: 首页 :: 联系 :: 聚合  :: 管理
  41 Posts :: 7 Stories :: 28 Comments :: 0 Trackbacks
放在外网的机器,比较怕的是ssh的暴力破解,因此记录登录失败日志,并且借用一些攻击,比如sshguard等,或者写个脚本自动的把日志中尝试登录次数过多的IP加入到hosts.deny中比较明智。不过新装的Gentoo居然没有发现/var/log/auth.log这个日志文件?用Ubuntu和Redhat的时候都发现有的。查了一下网络,才发现是syslog-ng的配置问题。Gentoo默认的syslog-ng的配置中并没有配置些auth log的项,可以加上一下三行:
filter f_authpriv { facility(auth, authpriv); };
destination authlog { file(
"/var/log/auth.log"); };
log { source(src); filter(f_authpriv); destination(authlog); };
这样登录失败的尝试就可以被记录了。syslog-ng很好,有空还要好好学一下详细使用。
对于配置了iptables的用户,用sshguard的解决方案比较好,它自动的处理登录失败的尝试,并且在iptables拒绝尝试过多的IP,挺好的,不过他在gentoo上还是被hardened profile mask的。

posted on 2007-12-29 12:40 vulcan 阅读(393) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: