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:
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...
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 _...
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...
Change / Update SSL certificate for Amazon Elastic Load Balancer with AWS Command Line Interface
-
Install and configure the AWS Command Line Interface
-
Show existing certificates to test if the AWS Cli is working:
$ aws iam list-server-certificates { "ServerCertificateMetadataList": [...
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...
stopping / restarting libvirt on Ubuntu 16.04 with systemd
Because systemd is the greatest thing ever it's not enough to stop the libvirt service. You need to disable the libvirt socket too.
sudo systemctl stop libvirt-bin
sudo systemctl stop libvirt-bin.socket
sudo systemctl start libvirt-bin
SSH: Fix host key verification error after makandra servers were upgraded to a new Ubuntu version
Important
If your railscomplete-deployment uses the net-ssh-gem please ensure you use version 5.2.0 or newer to ensure you can deploy via Capistrano.
It's best to use the latest version, as there were multiple issues between 5.2.0 and 7.3....
Installing throttled to fix Lenovo laptops with nvidia graphics running Ubuntu losing performance after a while
We have observed Lenovo laptops with nvidia graphics losing performance after they have been in use for a few minutes. While we have not been able to pinpoint exactly what triggered the performance loss, we have found it mostly correlated with hig...
How to prevent duplicate exported resources across a Puppet Infrastructure
There are cases where we have multiple exported resources that are identical. There are nodes that provide the same services for failover reasons. It is likely to have duplicate resources, when exporting nagios_check
from these nodes. From the ...
create htpasswd entry and print to stdout
Create htpasswd entry and print to stdout:
$ sudo apt install apache2-utils # Optional
$ htpasswd -n $USERNAME
New password:
Re-type new password:
$USERNAME:<Password Hash>