Line 90: |
Line 90: |
| to launch the script, do the following command: | | to launch the script, do the following command: |
| /root/checklist_ban | | /root/checklist_ban |
| + | |
| + | ==== Unban an IP ==== |
| + | In certain case you would to unban an IP immediately because you don't want waste time to wait the automatic IP unban process of fail2ban. |
| + | In first you you have to find the specific jail which has blocked you IP, you can refer to the mail that the admin user has received or you can list a specific jail. |
| + | |
| + | fail2ban-client status qpsmtpd |
| + | |
| + | Status for the jail: qpsmtpd |
| + | |- filter |
| + | | |- File list: /var/log/qpsmtpd/current /var/log/sqpsmtpd/current |
| + | | |- Currently failed: 5 |
| + | | `- Total failed: 119 |
| + | `- action |
| + | |- Currently banned: 1 |
| + | | `- IP list: 93.17.128.20 |
| + | `- Total banned: 1 |
| + | |
| + | If you want to know all you active jail, then do : |
| + | |
| + | fail2ban-client status |
| + | |
| + | Therefore you have to play with this command to unban your IP |
| + | |
| + | fail2ban-client set qpsmtpd unbanip 93.17.128.20 |
| + | |
| + | the generic command is : |
| + | |
| + | fail2ban-client set JAIL unbanip MYIP |
| | | |
| ===Jail.conf=== | | ===Jail.conf=== |
Line 179: |
Line 207: |
| action = smeserver-iptables[bantime=604800] | | action = smeserver-iptables[bantime=604800] |
| smeserver-sendmail[name="Recidive",dest=root] | | smeserver-sendmail[name="Recidive",dest=root] |
− |
| |
− | === Unban an IP ===
| |
− | In certain case you would to unban an IP immediately because you don't want waste time to wait the automatic IP unban process of fail2ban.
| |
− | In first you you have to find the specific jail which has blocked you IP, you can refer to the mail that the admin user has received or you can list a specific jail.
| |
− |
| |
− | fail2ban-client status qpsmtpd
| |
− |
| |
− | Status for the jail: qpsmtpd
| |
− | |- filter
| |
− | | |- File list: /var/log/qpsmtpd/current /var/log/sqpsmtpd/current
| |
− | | |- Currently failed: 5
| |
− | | `- Total failed: 119
| |
− | `- action
| |
− | |- Currently banned: 1
| |
− | | `- IP list: 93.17.128.20
| |
− | `- Total banned: 1
| |
− |
| |
− | If you want to know all you active jail, then do :
| |
− |
| |
− | fail2ban-client status
| |
− |
| |
− | Therefore you have to play with this command to unban your IP
| |
− |
| |
− | fail2ban-client set qpsmtpd unbanip 93.17.128.20
| |
− |
| |
− | the generic command is :
| |
− |
| |
− | fail2ban-client set JAIL unbanip MYIP
| |
| | | |
| === Uninstall === | | === Uninstall === |