Block countries using CSF Firewall
In the 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.
Deploy your new Virtual Machine Today
What is the CSF Firewall?
CSF (ConfigServer Security & Firewall) is a popular and powerful firewall application that provides an additional layer of security for Linux servers. It is designed to enhance the security posture of your server by controlling incoming and outgoing network traffic.
Here are some key features and benefits of CSF Firewall:
- Advanced Firewall Protection: CSF Firewall implements a robust set of firewall rules and security policies to protect your server from unauthorized access and malicious activity. It actively monitors network traffic and filters packets based on predefined rules to allow or block specific connections.
- Intrusion Detection System (IDS): CSF includes an integrated Intrusion Detection System that can identify and block suspicious activities and intrusion attempts in real-time. It analyzes log files and uses various algorithms and signatures to detect common attack patterns and known exploits.
- Brute Force Detection and Prevention: CSF incorporates intelligent mechanisms to detect and prevent brute force attacks, where an attacker tries to gain unauthorized access by repeatedly guessing login credentials. It can automatically detect excessive failed login attempts and dynamically block the offending IP addresses.
- Centralized Management: CSF provides a user-friendly command-line interface (CLI) and a web-based control panel for easy management and configuration. You can modify firewall rules, whitelist or blacklist IP addresses, and customize various security settings through a centralized interface.
- Email Notifications: CSF can send email notifications to the server administrator when specific events occur, such as blocked IP addresses, suspicious activities, or configuration changes. This allows you to stay informed about potential security threats and take appropriate actions promptly.
- IPv6 Support: CSF Firewall fully supports IPv6, allowing you to secure both IPv4 and IPv6 network traffic on your server. This ensures comprehensive protection and compatibility with modern networking protocols.
- Integration with Other Security Tools: CSF can be integrated with other security applications and tools, such as intrusion prevention systems (IPS) and log analyzers, to provide a comprehensive security solution for your server. It can work in conjunction with tools like Fail2Ban and Logwatch to enhance the overall security posture.
CSF Firewall is widely used and trusted by system administrators and web hosting providers to protect their Linux servers from various security threats. It offers a flexible and customizable security framework that can be tailored to meet the specific needs of your server environment.