• Home
    • Home – Layout 1
    • Home – Layout 2
    • Home – Layout 3
    • Home – Layout 4
    • Home – Layout 5
  • World
  • Politics
  • Business
  • Science
  • Tech
  • Entertainment
  • Lifestyle
Wednesday, June 3, 2026
  • Login
No Result
View All Result
NEWSLETTER
Bizmart Africa
  • Home
    • Home – Layout 1
    • Home – Layout 2
    • Home – Layout 3
    • Home – Layout 4
    • Home – Layout 5
  • World
  • Politics
  • Business
  • Science
  • Tech

    Trending Tags

    • Sillicon Valley
    • Climate Change
    • Election Results
    • Flat Earth
    • Golden Globes
    • MotoGP 2017
    • Mr. Robot
  • Entertainment
  • Lifestyle
    • All
    • Health
    Ebola Outbreak Africa

    Ebola Outbreak in Africa Sparks Urgent Regional Response

    Trending Tags

    • Golden Globes
    • Mr. Robot
    • MotoGP 2017
    • Climate Change
    • Flat Earth
  • Home
    • Home – Layout 1
    • Home – Layout 2
    • Home – Layout 3
    • Home – Layout 4
    • Home – Layout 5
  • World
  • Politics
  • Business
  • Science
  • Tech

    Trending Tags

    • Sillicon Valley
    • Climate Change
    • Election Results
    • Flat Earth
    • Golden Globes
    • MotoGP 2017
    • Mr. Robot
  • Entertainment
  • Lifestyle
    • All
    • Health
    Ebola Outbreak Africa

    Ebola Outbreak in Africa Sparks Urgent Regional Response

    Trending Tags

    • Golden Globes
    • Mr. Robot
    • MotoGP 2017
    • Climate Change
    • Flat Earth
No Result
View All Result
Bizmart Africa
No Result
View All Result
Home How to

How to block IPs with ConfigServer Firewall in WHM

by Nyongesa Sande
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.

Table of Contents

Toggle
  • 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

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

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

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

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.

‌

Post Views: 75
Tags: WHM
Nyongesa Sande

Nyongesa Sande

Nyongesa Sande is a seasoned writer, editor, and digital publisher passionate about delivering high-quality, SEO-optimized content across diverse fields including politics, technology, culture, business, and sports. As the founder and driving force behind NyongesaSande.com, he has built a trusted platform that blends in-depth reporting with accessible storytelling, making complex issues understandable to a broad audience. With a strong background in East African and global affairs, Sande is dedicated to providing readers with accurate, engaging, and impactful insights that both inform and inspire.

Related Posts

How Canada Is Competing in the Global Innovation Economy (2026)

How Canada Is Competing in the Global Innovation Economy (2026)
by Dancan Odhiambo
January 6, 2026
0

In the 21st century, economic power is increasingly defined not by natural resources alone, but by innovation, technology, talent, and...

Read moreDetails

How to Delete Facebook, Instagram, and Threads Accounts

How to Delete Facebook, Instagram, and Threads Accounts
by Bizmart
January 13, 2025
0

If you're reconsidering your relationship with Meta's platforms—Facebook, Instagram, and Threads—here’s a comprehensive guide to deleting these accounts, including tips...

Read moreDetails

Ways to Build Your Social Media Presence

Ways to Build Your Social Media Presence
by Bizmart
January 13, 2025
0

A strong social media presence is essential for businesses and individuals looking to thrive in today's digital landscape. Here's a...

Read moreDetails

How to Uninstall Apps on Mac Computers

How to Uninstall Apps on Mac Computers
by Nyongesa Sande
January 7, 2025
0

Comprehensive Guide to Uninstalling Apps on a Mac Removing programs from a Mac is straightforward in most cases, but some...

Read moreDetails

Living the Soft Life: Embracing Ease, Intentionality, and Joy

How to Live a Soft Life
by Nyongesa Sande
December 31, 2024
0

If you’ve spent any time on social media, you’ve likely come across the term "soft life." More than just a...

Read moreDetails

How to Clear Your Mind and Stay Focused

How to clear your Mind
by Nyongesa Sande
December 23, 2024
0

Life can often feel overwhelming, with work, school, or a busy schedule leading to mental clutter. Stress, anxious thoughts, and...

Read moreDetails
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?

  • About
  • Advertise
  • Careers

© 2026 Bizmart Africa

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
No Result
View All Result
  • Home
  • Politics
  • World
  • Business
  • Science
  • National
  • Entertainment
  • Gaming
  • Movie
  • Music
  • Sports
  • Fashion
  • Lifestyle
  • Travel
  • Tech
  • Health
  • Food

© 2026 Bizmart Africa