가장 많은 해킹 시도는 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
Comments List
관리자만 볼 수 있는 댓글입니다.
관리자만 볼 수 있는 댓글입니다.
관리자만 볼 수 있는 댓글입니다.