Iptables rule to safeguard SSH server from crackers

Secured Shell or SSH is a service to enable users to access remote system securely. However, SSH servers depending on password-based authentication might be vulnerable to dictionary-based (or brute-force) attacks by crackers.

Luckily iptables can be used with ‘–limit-burst‘ and ‘–limit’ option to reduce the number of attempts and connection that a cracking tool can make in a period of time.

For example, in order to limit an IP address to making only 5 connections per minute in burst of 2 connections, you can use this iptables rules:

iptables -A INPUT -p tcp --dport ssh -m limit --limit 5/minute --limit-burst 2 -j ACCEPT

This will result in the iptables will only allow up to 5 connections per minute with 2 maximum initial number of connections, which will make any brute-force or dictionary-based attack uneconomical/unfeasible for the server.

Read more about iptables –limit and –limit-burst in Linux Iptables Limit the number of incoming tcp connection / syn-flood attacks

How to remove user name from MeMenu in Unity (Ubuntu Natty)

The newly released Ubuntu 11.04 (Natty Narwhal) features Unity shell interface which displays the current user name the top right of the panel (MeMenu) that adds a personalized feeling to desktop users.

However some users might not be comfortable to have their username appears on the computer screen, especially when they are working on a publicly accessible computer or when they do not want their username to appear on screenshots or screen-casts of their desktop.

So to remove the username, one only need to open a console, and run the following command:
gconftool -s /system/indicator/me/display –type int 0

Before

Before

After

Before

Alternatively, you can also choose to display your own fullname on MeMenu. You can do that by running the following command:
gconftool -s /system/indicator/me/display –type int 2

You return to the default setting of displaying your current username, by running:
gconftool -s /system/indicator/me/display –type int 1

.
.
.
[via Chicomonte]

Generate QR Code in Ubuntu Linux

You can easily generate QR Code under Ubuntu using the command line ‘qrencode’ package. In Ubuntu 11.04 Natty Narwhal, you can install qrencode using this command:

apt-get install qrencode

To generate QR Code image, you only need to run this command:
qrencode -l L -v 1 -o qrcode-test.png "Hello, World!"

QR Code is a form of 2 dimensional barcode which can store arbitary text data including URL, email or plain text. For more information, please refer to the QR Code Wikipedia Entry