Nyongesa Sande
No Result
View All Result
  • News
    • World
    • Africa
  • Politics
  • Business
  • Tech
  • AI
  • Telecom
  • Sports
  • Opinion
  • Lifestyle
  • Live
Nyongesa Sande
No Result
View All Result
Nyongesa Sande
No Result
View All Result
  • News
  • Politics
  • Business
  • Tech
  • AI
  • Telecom
  • Sports
  • Opinion
  • Lifestyle
  • Live
ADVERTISEMENT

Home » How to block IPs with ConfigServer Firewall in WHM

How to block IPs with ConfigServer Firewall in WHM

NyongesaSande News Desk by NyongesaSande News Desk
3 years ago
in How To
Reading Time: 4 mins read
A A
How to block IPs with ConfigServer Firewall in WHM

The following procedure can be used to block IP addresses with the ConfigServer Firewall plugin in WHM.

  • IMPORTANT
  • Procedure
    • To block a single IP address:
    • If you have more complex blocking requirements:

IMPORTANT

ConfigServer Firewall software is not created by, provided by, or supported by cPanel. The following information is provided as a courtesy only, and cPanel support cannot provide assistance with performing the procedure outlined below. If you need assistance with configuring your ConfigServer Firewall, please reach out to ConfigServer support, or make use of the ConfigServer forums.

Also please keep in mind that it is possible to completely block yourself and others from accessing your server by editing firewall rules. Before making any changes to the firewall, you must confirm that you have console access to the server, meaning that you have the ability to connect to the server even if the server’s network is completely down or blocked. If you’re not sure how to do this, you must reach out to your hosting provider or datacenter for assistance with getting console access. cPanel support has no ability to assist with console access or firewall-related issues.

Procedure

To block a single IP address:

1. Login to WHM as the root user

ADVERTISEMENT

2. Navigate to: Home »Plugins »ConfigServer Security & Firewall

3. Scroll down to: “csf – Quick Actions”

ADVERTISEMENT

4. Enter the IP that you need to block in the pink box

5. Click “Quick Deny”

If you have more complex blocking requirements:

1. Login to WHM as the root user

ADVERTISEMENT

2. Navigate to: Home »Plugins »ConfigServer Security & Firewall

3. Scroll to: “csf – ConfigServer Firewall”

4. Click the “Firewall Deny IPs” button

5. Review the configuration in full and review the comments to learn about the file

6. Take note that the comments mention that you can learn more by reading the /etc/csf/readme.txt file on the server

7. Next add your desired rule to the configuration. The following are some examples from the readme.txt.

NOTE: One thing that is not mentioned below is the fact that you can use CIDR notation to block a range of IP addresses. If you are unsure how to implement CIDR notation in this configuration, please reach out to the ConfigServer Forums or ConfigServer Support for advice. cPanel support does not have access to a reliable example of what blocking a range exactly looks like in this configuration.

/etc/csf/readme.txt

10. Advanced Allow/Deny Filters
###############################

In /etc/csf/csf.allow and /etc/csf/csf.deny you can add more complex port and
ip filters using the following format (you must specify a port AND an IP
address):

tcp/udp|in/out|s/d=port|s/d=ip|u=uid

Broken down:

tcp/udp : EITHER tcp OR udp OR icmp protocol
in/out : EITHER incoming OR outgoing connections
s/d=port : EITHER source OR destination port number (or ICMP type)
(use a _ for a port range, e.g. 2000_3000)
(use a , for a multiport list of up to 15 ports, e.g. 22,80,443)
s/d=ip : EITHER source OR destination IP address
u/g=UID : EITHER UID or GID of source packet, implies outgoing connections,
s/d=IP value is ignored

Note: ICMP filtering uses the "port" for s/d=port to set the ICMP type.
Whether you use s or d is not relevant as either simply uses the iptables
--icmp-type option. Use "iptables -p icmp -h" for a list of valid ICMP types.
Only one type per filter is supported

Examples:

# TCP connections inbound to port 3306 from IP 11.22.33.44
tcp|in|d=3306|s=11.22.33.44

# TCP connections outbound to port 22 on IP 11.22.33.44
tcp|out|d=22|d=11.22.33.44

Note| If omitted, the default protocol is set to "tcp", the default connection
direction is set to "in", so|

# TCP connections inbound to port 22 from IP 44.33.22.11
d=22|s=44.33.22.11

# TCP connections outbound to port 80 from UID 99
tcp|out|d=80||u=99

# ICMP connections inbound for type ping from 44.33.22.11
icmp|in|d=ping|s=44.33.22.11

# TCP connections inbound to port 22 from Dynamic DNS address
# www.configserver.com (for use in csf.dyndns only)
tcp|in|d=22|s=www.configserver.com

# TCP connections inbound to port 22,80,443 from IP 44.33.22.11
d=22,80,443|s=44.33.22.11

8. Once you have added your desired rules, click on the “Change” button at the bottom of the page

cPanel. “How to Block IPs with ConfigServer Firewall in WHM,” February 20, 2021. https://support.cpanel.net/hc/en-us/articles/1500002973762-How-to-block-IPs-with-ConfigServer-Firewall-in-WHM.

‌

Tags: How ToWHM
Google Add as a Preferred Source on Google
Previous Post

Dangote Refinery

Next Post

How To Check What PHP Version Roundcube Is Using?

NyongesaSande News Desk

NyongesaSande News Desk

Nyongesa Sande offers diverse content across news, technology, entertainment, and more, aiming to provide readers with a wide range of informative and engaging articles. NYONGESA SANDE's dedicated team provides our audience not only with the highly relevant news but also with outstanding interactive experience.

Related Posts

How to Weld a 2-Block Rectangular Hollow Block Mold: Measurements, Materials and Step-by-Step Guide
How To

How to Weld a 2-Block Rectangular Hollow Block Mold: Measurements, Materials and Step-by-Step Guide

by NyongesaSande News Desk
4 weeks ago
0

Building a strong hollow block mold is one of the most important steps in producing...

Read moreDetails
How to Create a Facebook Account on iPhone App
How To

How to Fix Facebook Confirmation Email Not Received

by NyongesaSande News Desk
1 month ago
0

How to Fix Facebook Confirmation Email Not Received is a common issue for users who...

Read moreDetails
How to Create a Facebook Account on iPhone App
How To

How to Fix Facebook Confirmation Code Not Received

by NyongesaSande News Desk
1 month ago
0

How to Fix Facebook Confirmation Code Not Received is a common issue for users trying...

Read moreDetails
How to Create a Facebook Account on iPhone App
How To

How to Confirm Your Facebook Email or Phone Number

by NyongesaSande News Desk
1 month ago
0

How to Confirm Your Facebook Email or Phone Number is an important step when creating...

Read moreDetails
How to Create a Facebook Account on iPhone App
How To

How to Understand Your Facebook Account and Profiles

by NyongesaSande News Desk
1 month ago
0

How to Understand Your Facebook Account and Profiles is essential for anyone using Facebook to...

Read moreDetails
How to Create a Facebook Account on iPhone App
How To

How to Fix Facebook Name Not Accepted

by NyongesaSande News Desk
1 month ago
0

How to Fix Facebook Name Not Accepted is a common issue for users trying to...

Read moreDetails
Load More
Next Post
How to block IPs with ConfigServer Firewall in WHM

How To Check What PHP Version Roundcube Is Using?

How to block IPs with ConfigServer Firewall in WHM

How To Increase The memory_limit Directive For Roundcube?

ADVERTISEMENT

Who We Are

Nyongesa Sande

NyongesaSande.com is a digital news and media platform covering breaking news, business, technology, AI, politics, sports, world affairs and African innovation.

News Sections

  • News
    • World
    • Africa
  • Politics
  • Business
  • Tech
  • AI
  • Telecom
  • Sports
  • Opinion
  • Lifestyle
  • Live

Editorial Standards

  • Editorial Policy
  • Fact Checking Policy
  • Corrections Policy
  • Ethics Policy
  • AI Usage Policy
  • News Tips
  • Submit Press Release

Legal

  • Privacy Policy
  • Terms of Use
  • Cookie Policy
  • Disclaimer
  • Risk Disclaimer
  • DMCA
  • Ad Choices

Our Company

  • About Us
    • Nyosake Designers
      • Nyosake Webmasters
      • Nyosake Investment
  • Contact Us
    • Newsroom Contact
  • Ownership Disclosure
  • Advertise
  • Privacy Policy
  • Terms of Use
  • Cookie Policy
  • Disclaimer
  • Risk Disclaimer
  • DMCA
  • Ad Choices

NyongesaSande.com is an independent digital news and media platform covering Africa, business, technology, AI, politics and global developments.

© 2026 NyongesaSande.com. All rights reserved.

No Result
View All Result
  • News
    • World
    • Africa
  • Politics
  • Business
  • Tech
  • AI
  • Telecom
  • Sports
  • Opinion
  • Lifestyle
  • Live

NyongesaSande.com is an independent digital news and media platform covering Africa, business, technology, AI, politics and global developments.

© 2026 NyongesaSande.com. All rights reserved.