- Log into your WHM
- Sroll down to the bottom and click on the "Plugin" menu option
- Click the "ConfigServer Security&Firewall" link
- Search for "Counrty Code Lists and Settings"
- Search for "CC_DENY"
- In the field enter a comma seperated list of 2 letter Country Codes you want to block from accessing your Server/VPS.
You can find the list of A2(ISO) codes here http://www.worldatlas.com/aatlas/ctycodes.htm
e.g. Entering US, GB, DE into the field will block all connections from United States, United Kingdom and Germany. This will not prevent connections from those countries if they use a VPN from a different location. - Once done, scrol to the bottom of the page and click "Change" to update the firewall configuration.
- When the screen change to "Changes saved" you need to click "Restart csf+lfd" to restart the firewall and apply the updated configuration.
Be sure to visit your deny list once in a while to make sure it stays current.