fail2ban 설치하려다 귀찮아서 php 쉘 스크립트 하나 맹금.

<?php $exec_string = shell_exec('cat /var/log/secure  | grep "sshd.*failures.*rhost" | awk \'{print $16}\' | awk -F = \'{print $2}\' | uniq -c | sort -n'); $data = explode("\n", $exec_string); $ip_lists = $output = array(); foreach ($data as $v..