Block countries using CSF Firewall
There are two main ways to block a user from accessing a website. You can use mod_geoip, which is basically lines that you enter to your .htaccess file, or you can use the Firewall on the server to stop users from even accessing the site.
If you’re on a VPS or Dedicated Server, the block using the Firewall is the best solution. It places less overhead on the server, as you’re blocking the user from even attempting to load a page on your site. This will save CPU and Memory resources for your REAL visitors that really need it. If you know you’re never going to ship a product to China, Turkey or Iraq, we recommend that you block the country from even accessing the site. This will help reduce the number of fraud orders that you receive.
Here’s the steps for modifying the ConfigServer Security & Firewall (CSF):
- Open WHM in your VPS , Cloud Server or Dedicated Server. Scroll to the bottom left and find the “ConfigServer Security&Firewall”
- Click the “Firewall Configuration” button
- Scroll down the page (or use the FIND in your browser) to the section with “CC_DENY”
These are comma separated list of 2 letter Country Codes. Here’s a link to the codes – http://www.worldatlas.com/aatlas/ctycodes.htm
For every country you want to deny, you just enter those letters in the field (separated by a comma).
Once you’re done, scroll to the bottom of the page and click CHANGE. This will restart the firewall, and you’re now all set to go.
FASTDOT’s Enterprise Cloud Server are excellent choices for:
- IaaS Cloud Stack for reselling virtualised environments
- Mission critical financial institutions running MetaTrader / Forex Trading Solutions
- Implementing mission-critical SAP, Exchange, Sharepoint, Zimbra or MS SQL Database Server
- Security with high-grade ISO 27001 qualifications.
- Businesses looking to upgrade to a dedicated server, but not looking to spend thousands of dollars on hardware and datacenter hosting costs.
- Setting up your own external Exchange or MSSQL database server powered by the resources of a Tier 3 data centre.
- Small or large dynamic websites needing to move away from restrictive shared hosting environments.
- Web hosting resellers looking to take their business to the next level.
- A cost-effective method for delivering dynamically scalable “Infrastructure as a Service” (IaaS Hosting) and “Software as a Service Hosting” (SaaS Hosting) solutions which can scale up or down with your evolving business needs.
- Customers who require Mission-Critical hosting environments with dynamic scalability where 24/7 uptime is absolutely critical to your business needs
Get Started with VMware Cloud Hosting
Your new VMware Virtual Servers will be commissioned shortly.