How to Block VPN and Data Center IP Submissions in WPDiscuz?

WPDiscuz

WPDiscuz does not natively block VPNs or data center IPs. If you want to stop comment spam from AWS, Google Cloud, VPNs, and proxies, you must use external IP intelligence or network-level rules.

The solution is OOPSpam Anti-Spam, which filters risky IPs before comments are saved. Cloudflare rules can help at scale, but they are not WPDiscuz-specific and must be used carefully.

This guide shows both methods, explains when to use each, and focuses only on what works for WPDiscuz comment submissions.

Method 1: Use OOPSpam Anti-Spam

This is the most accurate and WPDiscuz-friendly approach, because spam is filtered before the comment is saved and without relying on static IP blocklists.

OOPSpam Anti-Spam (that’s us 👋) evaluates each submission in real time using continuously updated threat intelligence, including:

Because detection happens at the application layer, this method avoids blocking legitimate visitors who may simply be browsing your site through a VPN.

Setup Steps

Start by installing the plugin. In your WordPress dashboard, go to Plugins → Add New, search for OOPSpam Anti-Spam, then install and activate it.

OOPSpam Anti-Spam

Next, connect your API key. Create an account in the OOPSpam dashboard and copy your API key. 

OOPSpam dashboard

Return to WordPress and go to Settings → OOPSpam Anti-Spam. Paste the key into the My API Key field and save your changes.

Paste the key into the My API Key field and save your changes.

Once the API key is connected, confirm WPDiscuz integration. Make sure spam protection is enabled for WPDiscuz. No additional WPDiscuz configuration is required.

Make sure spam protection is enabled for WPDiscuz.

Finally, enable IP filtering. Open the IP Filtering tab in the OOPSpam settings. 

IP Filtering tab in the OOPSpam settings

After setup, spam submissions are filtered automatically in the background. Comments from VPNs, proxies, and cloud infrastructure are blocked before WPDiscuz stores or displays them, keeping your comment sections clean without disrupting real users.

Using Manual Moderation When Spam Is Targeted

Not all WPDiscuz spam is automated. Some messages are written to look real, rotate IPs, and bypass basic filters. In these cases, manual moderation is needed.

OOPSpam includes a Manual Moderation section for handling targeted abuse without blocking entire networks or disrupting real users.

Manual Moderation

Inside the Manual Moderation tab, you can:

These rules take effect immediately and work without any changes to WPDiscuz itself.

Method 2: Block VPN and Cloud Traffic Using Cloudflare Security Rules

If your site is already using Cloudflare, you can block or challenge unwanted traffic at the network edge, before it ever reaches WordPress.

This method relies on ASN-based rules, which target entire network operators such as cloud providers commonly abused for bot traffic.

Important limitation: Cloudflare rules are not WPDiscuz-specific. Unless scoped carefully, they apply to your entire website, not just comment submissions.*

How ASN-Based Blocking Works

Each major cloud provider operates under one or more Autonomous System Numbers (ASNs). For example:

Blocking or challenging an ASN affects all traffic coming from that provider.

Step-by-Step: Create a Cloudflare ASN Rule

Create a Cloudflare ASN Rule

  1. Log in to your Cloudflare dashboard
  2. Select your website
  3. Navigate to Security → Security Rules → Custom rules
  4. Click Create rule
  5. Set the condition:
    • Field: AS Num
    • Operator: equals
    • Value: 16509 (Amazon AWS example)

Expression preview: (ip.src.asnum eq 16509)

  1. Choose an action:
    • Managed Challenge (recommended starting point)
    • Block (only if you are confident)
  2. Name the rule clearly (e.g. Block AWS ASN 16509)
  3. Deploy the rule

OOPSpam vs Cloudflare: Which Should You Use?

Feature OOPSpam Cloudflare ASN Rules
VPN detection Yes Partial
Cloud IP detection Yes Yes
WPDiscuz-specific Yes No
False-positive risk Low Medium to High
Scope Comments only Entire site
Setup complexity Low Medium

Final Recommendation

For WPDiscuz comment spam involving VPNs and data center IPs:

This layered approach balances security, accuracy, and user experience without breaking legitimate access or overblocking privacy-conscious users.

Spam Protection for WordPress, Zapier, Make and more.

Since our launch in 2017 we’ve been perfecting our API to be the trusted option for small businesses to enterprise— and continue to stick to our values of being the accessibility and privacy-friendly option. Give us a shot!

Try OOPSpam for free → Try our WordPress plugin for free →

✓ No credit card required ✓ Cancel anytime

Enjoy Reading This Article?

Here are some more articles you might like to read next: