An all new category about current security issues like the shellshock bug

Encrypting and Decrypting data using SSL Key

First generate the RSA key (key.pem): openssl genrsa -out key.pem 4096 openssl rsa -in key.pem -text -noout   Then save the public key in pub.pem: openssl rsa -in key.pem -pubout -out pub.pem openssl rsa -in pub.pem -pubin -text -noout   As an example we're creating a simple text file and encrypt it: echo test12345 > […]

Securing SSH access with Port Knocking using iptables

This is working for Ubuntu and Debian and might be slightly different for other distributions. However, the rules that are implemented will work on every distribution's iptables. First install the package iptables-persistent: apt-get install iptables-persistent Do not save the current configuration when asked as we will create a new one. Now put the following contents […]

How to secure SSH server access with MFA

First install Google Authenticator: apt-get install libpam-google-authenticator This works well on Ubuntu (Trusty or newer). Next, login to your server with the user you’re going to use MFA with, execute google-authenticator and follow the steps as indicated below. You may scan the QR-Code which is shown on the console with your phone (for example using the Google Authenticator […]

Gentoo: system and security updates

First install gentoolkit emerge gentoolkit Then search for security updates using glsa-check: glsa-check -t all Check which packets would be installed: glsa-check -p $(glsa-check -t all) Then run the actual installation glsa-check -f $(glsa-check -t all) Or install them one by one: glsa-check -f INSTALLNUM Replace INSTALLNUM by the update number, for example 200608-15 System […]