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

Linux Kernel Hacking Lessons from LinuxChix

Those who are interested in understanding the Linux Kernel, and wants to be a Linux Kernel Developer might find this website interesting as a stating point, the LinuxChix Kernel Hacking Lessons.

Structured in an easy to follow lessons, the whole online course designed to make you familiar with the kernel development tools, linux system calls and the overview of the kernel source code structure. The course comes in 10 lessons which you may find it interesting as it offers simplified explanation and practical examples :

  1. Lesson #0: Check for Materials
  2. Lesson #1: Get the Kernel Source
  3. Lesson #2: Configure Your Kernel
  4. Lesson #3: Compile Your Kernel
  5. Lesson #4: Boot Your New kernel
  6. Lesson #5: Your First printk
  7. Lesson #6: Overview of the Kernel Source
  8. Lesson #7: Understanding System Calls
  9. Lesson #8: Your First kernel Module
  10. Lesson #9: Creating, Applying and Submitting Patches

Visit LinuxChix Kernel Hacking Lessons. for more information.