IT 주제, 특히 리눅스를 다룹니다.

Posted
Filed under Linux/Gentoo
fail2ban은 iptables을 이용하여 지정된 조건에 맞는 접속 시도를 효과적으로 차단한다.
가장 많은 해킹 시도는 ssh를 통해 이루어진다.
ssh 필터링을 위해 system logger는 /var/log/auth.log 를 생성해야 한다.

emerge -av fail2ban

(syslog-ng 수정)
destination auth { file("/var/log/auth.log"); };
filter f_auth { facility(auth); };
log { source(src); filter(f_auth); destination(auth); flags(final); };

(/etc/fail2ban/jail.d/ssh-iptables.conf)
[ssh-iptables]
enabled  = true
filter   = sshd
action   = iptables[name=SSH, port=ssh, protocol=tcp]
logpath  = /var/log/auth.log
maxretry = 5

service fail2ban start
2015/04/18 18:42 2015/04/18 18:42

IT SeedBox

IT 주제, 특히 리눅스를 다룹니다.

IT 주제, 특히 리눅스를 다룹니다.

IT 주제, 특히 리눅스를 다룹니다.