For more secure server, we have to close some ports to users.

If need access to this ports, we can give permission to our IP address.  Please dont forget, “iptables” can be block all IP address but when you restart the server it will be clean all of this commands.

Examples:

1. Closing FTP port except xxx.xxx.xxx.xxx

iptables -t filter -I INPUT 1 -p tcp -s ! xxx.xxx.xxx.xxx –dport 21 -j REJECT –reject-with icmp-host-prohibited

2. Closing SSH port except xxx.xxx.xxx.xxx

Continue Reading…

Just use the following command:

iptables -A INPUT -p tcp --syn --dport 22 -m connlimit --connlimit-above 5 -j REJECT

In this example our connections are limited to 5.

Ofris is an application which serves to lock the system or freeze. Or in other words Ofris is a application similar to Deep Freeze that runs on Linux operating system.

Installation:

sudo add-apt-repository ppa:tldm217/tahutek.net
sudo apt-get update
sudo apt-get install ofris-en

How to run Ofris:
open a terminal and run :

ofris-en

And then select what you want to do, freeze the system for this user or for another user.
You can later unfreeze the system the same way.


There is a better, quicker way to do this which is to clone your entire drive onto a new drive.

You can do this with a tool like GParted, but there is also a command line tool that will get the job done as well. This tool is ddrescue. Now with ddrescue you will have to have your new disc partitioned (it will not partition for you). In this article I am going to show you how to get your dying Linux drive cloned onto a new drive.

Installation of ddrescue:

apt-get install ddrescue gparted

Paritioning your new drive:

After you installed the new drive reboot your server. Then do the following:

  1. Start GParted.
  2. Create a partition scheme on the new drive  identical with the old drive.
  3. Save the new partition scheme and you are ready to clone.

Continue Reading…

rkhunter (Rootkit Hunter) is a Unix-based tool that scans for rootkits, backdoors and possible local exploits. It does this by comparing SHA-1 hashes of important files with known good ones in online database, searching for default directories (of rootkits), wrong permissions, hidden files, suspicious strings in kernel modules, and special tests for Linux and FreeBSD.

Step 1. Installation

apt-get install rkhunter

Step 2. How to use rkhunter

After install you can use rkhunter to scan your linux for rootkits with command:

rkhunter -c

Page 6 of 71234567