Category «Linux»

Upload file with bash/curl to endpoint (with password)

This example takes the file as a parameter and asks for a password that is sent along with the file.

 

Certbot – Reload Nginx after renewing certificates

renew-hook has been deprecated in recent versions of certbot. Plus, debian moved from using cronjobs for automatic renewals to systemd timer if they are available. On the other hand, now certbot supports having hooks in configuration files. Create a file  /etc/letsencrypt/renewal-hooks/deploy/01-reload-nginx with the following content:

Don’t forget to make the file executable.

Stop SSH bruteforce attacks

If we receive 4 failed login attempts within 60 seconds; drop the following attempts.