Automate Global IP Banning with Defender and The Hub (for Free!)

Automate Global IP Banning with Defender and The Hub (for Free!)

Our new Global IP Banning feature saves you loads of time securing sites. Simply create your IP block and allowlist once, then automatically sync to some or all of your WordPress sites with a few clicks.

A global IP allowlist and blocklist feature has been a top Defender security request for a while. So now…

“I logged into a client site this morning and saw a notification about the new global IP list-banning feature that allows us to sync our IP ban lists across Hub sites. I have raised this request in previous topics with Support and I am sooooooo happy that it has been made live. You guys rock!”

Andre – WPMU DEV Member

It’s here, free to use, and managed directly from your Hub! As you’ll see, it’s easy to quickly apply the same allowlist and blocklist IPs to all of your sites in bulk.

This article will cover:

So, let’s show you how it’s done! First though…

Why Block and Allow IPs?

Just to touch on it quickly, there are many reasons for configuring a WordPress site to allow or block IPs.

For example, maybe you want to monitor online behavior (e.g. to restrict specific web platforms from accessing an educational site). Or, to protect your website from attacks. Also, you may not want a particular country or place to access your online information.

So, there are practical scenarios (like not allowing access to unwanted sites) and security protocols (preventing unwanted or harmful sites or servers from connecting with your network or computer).

Whatever the purpose, allowing and banning IPs should be in your control. With Defender, they are.

Let’s show you how our Defender security plugin makes it easy.

IP Banning and Allowing From The Hub

The Hub makes it easy and simple to create and manage IP Banning.

You can block and allow IP addresses from this area and automatically sync those lists with all or several of your WordPress sites.

The IP Banning section is located in the My Sites menu area.

IP Banning from the Hub.
IP Banning is a click away whenever you need to access it in The Hub.

In this section, you can see your Global Blocklist and Global Allowlist, where you’ll add your IPs.

Global block and allowlist areas.
These are the sections where all of the IPs will be entered.

Simply insert one IP address per line and keep in mind that IPv4 and IPv6 are supported. Plus, IP ranges are also accepted in CIDR or hyphenated format.

The entered IPs.
Once you have your IPs added, click ‘Save.’

Ever want to edit? It’s no problem. You can add and remove IPs at any time!

Selecting Sites to Block and Allow IPs

It’s up to you to determine what sites of yours you want IPs blocked or allowed. So, before syncing IPs with sites, decide what sites you want to associate with IP block and allow lists.

Head to Activate on Site(s) to pick what site you want to include.

Where all of your sites are listed.
All of your sites will be listed here.

After clicking, you’ll see all the available sites to activate global IP banning.

You’ll also be able to see any website that doesn’t have Defender activated and any other issues that would affect syncing.

The sites that can be activated for IP syncing.
Select all in one-click or individually.

If you want, you can search with Filters & Labels when browsing through your websites. There are options for filtering by ‘Hosted with us,’ ‘Hosted elsewhere,’ favorites/non-favorites, and labels.

Plus, you can enter a site title and search relevant sites.

Filters to search by.
Want just sites hosted with us? Click that option to filter and browse those.

When your sites are selected, tap Activate – and that’s it! It takes just a few moments for the sites to be included.

With that being said, it’s time to…

Sync IPs with WordPress Sites

It takes one click to sync your IPs with your WordPress sites. Just tap on the bright blue Sync IPs with Sites, and all the selected sites will be synced.

IPs to sync.
After listing all your IPs, click ‘Save’ before syncing.

A message informing you of what is about to take place will pop up to ensure you’d like to proceed.

Sounds good to still sync? Then click Continue.

Message for syncing.
Click ‘Continue’ will get the sync started.

After hitting Continue, you can sit back and relax as all of your chosen sites are synced with IPs on your blocklist and allowlist! It takes just a few moments.

Global IPs From Defender’s Dashboard

Now that you know how to set up global IPs from The Hub, you can also monitor and sync IPs in WordPress under Defender > Firewall > IP Banning.

Defender dashboard for IPs.
You’ll see it synced up here as long as the Block/Allow Global IPs are activated.

After syncing, all the IPs you have entered in The Hub will be in a list.

One thing to note is that you can’t add new IPs from Defender’s WordPress admin. Simply add them in The Hub and re-sync – and that’s it!

It’s also an area where you can enable and disable the global IP feature anytime.

Top Blocked Countries

Now that you have global IP bans in place, do you want to know what countries are blocked the most? Thanks to Defender’s Top Block Countries widget, it’s all displayed directly from Defender’s dashboard.

It shows the country, followed by the number of blocked IPs in the last seven days.

Image of top countries blocked by Defender.
As you can see, the United States is number one, with 45 blocks in the past seven days.

If you click Update Blocked Countries, it will take you to Defender’s Firewall — where you can update your bans on specific countries at any time.

Allow and Block Global IPs with Ease

As you can see, allowing and blocking global IPs can be done in just a few clicks with Defender and The Hub. It’s never been simpler to control global IPs across any number of sites simultaneously!

If you aren’t using The Hub yet, sign up for free. The same goes for Defender, which also doesn’t cost a thing from wp.org.

And now, blocking and allowing IPs is a breeze!

Have you tried Defender's allowlist and blocklist for IPs? What do you think of this new feature? Let us know in the comments!

N. Fakes

N. Fakes Nathanael Fakes is a blog writer and cartoonist at WPMU DEV. He’s worked with WordPress for over a decade. Beyond WordPress, he’s a published author, syndicated cartoonist, and donut enthusiast. Connect with Nate on Instagram and learn more about his work on his comics website.