Accéder au contenu principal

HOW TO INCREASE DENY IP LIMIT IN CSF FIREWALL

 

How to increase DENY IP limit in CSF firewall

 

In CSF firewall, old IP addresses will be automatically removed from /etc/csf/csf.deny file when the ‘DENY_IP_LIMIT ‘ is reached. An example is given below :

root@server [~]# csf -d 192.168.1.1

csf: DENY_IP_LIMIT (200), the following IP’s were removed from /etc/csf/csf.deny

In the above example you can see that DENY_IP_LIMIT is 200 so the oldest IP in csf.deny was removed when you tried to add a new IP to deny list.

Do the below steps to increase deny IP limit in CSF firewall. Setting DENY limit to a very high value will slow down network and website. Make sure there is sufficient resources on the server before you increase this value.

1. Log into linux server via SSH as root

2. First take a backup of the CSF configuration file.

cp -a /etc/csf/csf.conf /etc/csf/csf.conf.original

3. Edit CSF configuration using vi editor

vi /etc/csf/csf.conf

Change the below lines

DENY_IP_LIMIT = “200” to DENY_IP_LIMIT = “500”

DENY_TEMP_IP_LIMIT = “100” to DENY_TEMP_IP_LIMIT = “500”

4. Save the CSF configuration file

5. Run the below command to restart the firewall

csf -r

The changes in csf configuration file will not reflect without restarting the firewall.



Increasing the DENY_IP_LIMIT and DENY_TEMP_IP_LIMIT is very helpful when the server is under attack from different IP address (DOS attack). CSF will be able to hold more IP address in csf.deny file when you increase the value. Increasing DENY_IP_LIMIT to a very high value is not recommended because this will slow down your server.

Setting DENY_IP_LIMIT to 0 will disable limiting and it is not recommended.

Commentaires

Posts les plus consultés de ce blog

Open Media Vault NAS change password

Known Root Password Login to the OMV using the root user and the current password via SSH or Console enter the following command passwd root The new password is now active. Unknown Root Password, but Admin Access to OMV GUI is Available In this scenario we still can help ourselves with the GUI. The method we use is, that we create a cron job for the root user which then resets the password. Navigate to System -> Cron Jobs Press the +Add button UN-tick the enabled box, so that the cronjob does not run automatically. put into the command field the following line, replace newpasswd with your password: echo "root:newpasswd" | chpasswd press okay select the newly created cron job Click the run button. in the opening window click the start button. It will shortly deactivate and activate again. open ssh or console and login as root with your new password. Root and Admin Password Unknown If you do not know the root password, you need to boot with a Li...

How to Install Cpanel/WHM in RHEL/CentOS 6/5

ici quelques notions de bases que je vous invite à lire avant de commencer Basculer un clavier en AZERTY ou en QWERTY sous Linux setxkbmap fr Se connecter en adminstrateur su - root yum update  ( Yellowdog Updater, Modified ) cPane l is one of the most popular Commercial control panel for Linux web hosting, I have been working with cPanel for 2+ years to manage all Shared, Reseller and business hosting customers. It comes with cPanel and Web Host Manager, which makes web hosting easier for you. WHM provides you root level access to your server whereas cPanel provides user level access interface to manage their own web hosting account on the server. Features of cPanel cPanel control panel is very versatile control panel for managing your hosting servers, It has lots of features which make Web hosting easier for you. Some of them are listed below: Powerful GUI controls on your server with WHM. Can perform tedious tasks like Backups, Migrations and restoratio...

Les commandes de base des switchs

Commandes • enable o Depuis le mode utilisateur permet d'accéder au mode privilégié. • configure terminal o Depuis le mode privilégié permet d'accéder au mode de configuration globale. • show version o Permet de vérifier la version de l'IOS et la valeur du registre de configuration. • show running-config o Permet d'afficher le fichier de configuration actif. • show interface FastEthernet [numéro de l'interface] o Affiche le statut de l'interface, le débit, l'auto négociation et les statistiques de l'interface. • show ip interface brief o Voir tous les ports du Switch • show flash ou dir:flash o Affiche la version de l'image de l'IOS contenue dans la mémoire flash, la taille de la mémoire et la mémoire utilisée.  • show interface status o Affiche le mode opérationnel du port. • show controllers ethernet-controller o Affiche les statistiques sur les données reçues et envoyées au niveau matériel.  • show ...