InMotion Hosting Support Center

If you need to filter or block multiple IP addresses, it can sometimes be much quicker and more efficient to block an IP range. In this article, we will show you how you can block an entire range of IPs from sending mail to your email addresses using cPanel and regular expressions.

What is an IP range?

An IP range is exactly that. It is simply a group of IP addresses between one address and another. For example, many consumer routers will assign IP addresses between 192.168.1.101 and 192.168.1.150. The group of IP addresses between, and including these two addresses, would be an IP range.

  1. Log into cPanel
    div>
  2. li>
  3. Under Email choose Email Filters
  4. For the example email account choose Manage Filters
  5. Click Create a New Filter
  6. Fill in the dropdown fields. For the From field, choose Any header. For the second dropdown, choose Matches regex
  7. Here you will add your rule, which will look similar to this:
    ^192\.168\.1\.[0-9]{1,3}$
  8. Choose an action for this filter. (You will most likely want to Discard the message, but you can also filter it to a folder.)
  9. Click Create

Well done on completion of this tutorial. You now know how to filter an IP range.

Support Center Login

Social Media Login

   
Social Login Joomla

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!