Thursday, November 5, 2026

How you can permit/deny site visitors by nation in CSF firewall through WHM?

-


We will make restrictions for the server entry primarily based on nations utilizing distinctive nation codes through the CSF interface in WHM.
We will write permit or deny guidelines primarily based on the requirement. We will get the nation code listing from: en.wikipedia.org/wiki/ISO_3166-1_alpha-2 After getting the listing, observe the steps offered beneath to use the block:

  1. Login to the WHM panel as root and select the choice ConfigServer Safety & Firewall utilizing the search choice.

  2. Scroll down and choose the choice ‘Firewall Configuration’ from ‘csf – ConfigServer Firewall’ part.

  3. There you possibly can see the configuration file and discover the ‘Nation Code Lists and Settings’ from that part.
  4. Scroll down a bit and you may see the ‘CC_DENY’ part. There you possibly can present the nation codes you have to block the entry from as offered within the picture beneath:

  5. A number of nations could be added with a comma separation with no areas in between. For instance, “AM, BM,CO” deny entry to the nations Armenia, Bermuda, and Columbia as proven within the picture beneath:

  6. If we have to permit a number of nations solely and deny all others, higher use ‘CC_ALLOW_FILTER’ choice there and supply the nation listing in the identical means talked about earlier than.

  7. As soon as the modifications are carried out, press the ‘Change’ button on the backside to avoid wasting the modifications after which restart the firewall to use the brand new settings.

 



Source_link

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Related Stories