Disable IPv6 on Linux

To completely disable IPv6:

Then, reload kernel config:

Change FDE password on Linux

Admitting the encrypted partition is /dev/sda5, add the new password with the following command:

Then, delete the old password with:

Encrypt a USB drive on Linux

USB thumbdrives often store confidential information. However, it is very easy to loose. Encrypt a USB drive helps protecting your data with a password.

Here is how to encrypt a USB drive with cryptsetup:

First, install the cryptsetup package:

Then, ensure the USB drive is not mounted (replace /dev/sdb1 with the USB drive partition):

Now, let’s create an encrypted filesystem on the partition (choose a strong password):

Then, mount the filesystem and format it as FAT:

Then, unmount the device:

Next time the USB drive is inserted, a password will be prompted.

Block facebook, twitter, linkedin widgets… with no software.

Social networks are omnipresent on the Internet. Most websites include social widgets, allowing to “like” or “bookmark” pages. However, these widget can help track your browser’s IP, user agent, history, gelocation etc. This happens even if you are not connected and don’t own an account on the social network.

To avoid this, we can edit the hosts file, which contains IP address / hostname associations.

On Windows, it is located at C:\Windows\System32\drivers\etc\hosts, on Linux it is at /etc/hosts and on Mac it is there: /private/etc/hosts.

Then, it is sufficient to add this line at the end of the file and save (you need administrator privileges to save).

Adapt the domain name list with any domain you would like to block.

Here is an example hosts file blocking facebook.com.

Now, you should see Facebook widgets disappear like by magic on every page you visit !

Add SSH key to server

First, generate a SSH RSA keypair:

The public key should be copied on the remote server you want to access though SSH:

The private key should be on every machine you want to connect from (usually, only your own).

Now, simply log in with ssh user@myserver.com