To see all jails:
fail2ban status
Our $JAIL is usually ssh
.
To see which IPs are banned currently:
fail2ban-client status ssh
If you want to unban a host banned by fail2ban on Ubuntu 14.04 or later use this method:
fail2ban-client set $JAIL unbanip $IP
#example with a jail named ssh
fail2ban-client set ssh unbanip 10.0.0.20
Please don't try to undo the ban by deleting the iptables
rule. Fail2ban will recreate the rule if it is missing but fail2ban has still stored the ban.
On 12.04 hosts fail2ban is too old and doesn't know the unbanip
action.
sudo iptables -F
is the only way here since sudo service fail2ban restart
just re-bans the IP again after starting.
Related cards:
HowTo: Curl applications that are usually behind reverse proxies with TLS termination without the application redirecting to https schema
A lot of web applications require being called over https
, which is a good thing. It's possible to configure this requirement at the web- or proxy server level, where nginx
or apache
will just redirect every request on http
to https
. Som...
How to Protect container images with production tag from ECR lifecycle rules
If you want to automatically delete old container images from your Elastic Container Registry, the solution is a quite simple ECR Lifecycle Rule that deletes images e.g. 7 days after they have been pushed to the registry.
If you however want to _...
How to remove cloud init from ubuntu
If you're trying to start a cloud-init based Ubuntu VM with KVM you will suffer long boot times and confusing output on the terminal. If you want to get rid of it you need to remove cloud-init.
- wait until the VM boots
- login
- `echo 'datas...
HowTo Generate Nagios Config with puppet fast
Creating Nagios Config with puppet
Let's have a look at the classic way of managing Nagios configuration with exported Puppet resources.
Here is [a good article about the topic](https://www.ericholzbach.net/blog/automating-nagios-with-puppet-a...
HowTo apply Test Driven Development to Container Images
Apply Test Driven Development(TDD) to the process of building container images by defining test before writing code and automate the testing process. Iterate through the TDD cycle while developing and running the tests later in continuous integrat...
HowTo: Rebalance Elasticsearch Shards
If you end up with an Elasticsearch cluster which has a very different disk usage on it's nodes you can use these steps to rebalance the shards.
Before we begin it's important to understand how Elasticsearch defines [balance](https://www.elastic....
HowTo: Clone a MariaDB database with mariabackup, mbstream and netcat
If you have a very large datadir in MariaDB and you want to transfer the data to another host (e.g. for replication) you may want to avoid storing it locally and copying it between the hosts.
You can stream the backup directly via netcat
.
##...
HowTo: verify SSL private key matches SSL certificate
When receiving a new SSL-Certificate for an existing SSL-key it should be checked that they match cryptographically.
Maybe the customer accidentally created a new key and certificate and sent us just the certificate.
It's also possible that the c...
Lenovo Laptop BIOS Update with Linux
You will need to look here and find your own device. Look for the "bootable CD" download, which will give you an ISO file.
Then you need a Perl script from the interne...
HowTo: Fix nginx not reloading with long gzip_types lines
When using many or very long entries of MIME-types that shoudl be gziped in gzip_types
directives in nginx
you might not be able to successfully reload the service and get this error message instead:
nginx: [emerg] could not build the tes...