If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Calling on Cloudflare experts

Calling on Cloudflare experts

Started by swguy on 1 Feb 2024, 11:31 AM · Views: 3,191

Results 1 to 12 of 12
1 Feb 2024, 11:31 AM
#1
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Post #1 by swguy

If you have Cloudflare experience, would you please write up a FAQ on using it? All we have is a small paragraph on

https://docs.zen-cart.com/user/troubleshooting/blocking_attacks/

You can submit it as a PR to the documentation repo or just attach it here, whatever is easier for you. Thanks.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

12 Jun 2024, 3:03 PM
#2
dannyvarley avatar

dannyvarley

Zen Follower

Join Date:
Dec 2011
Posts:
287
Plugin Contributions:
0

Post #2 by dannyvarley

I just wanted to add my limited experience with Cloudflare and exactly how it helps us mitigate attacks and also serve data with cache more efficiently. We originally set this up to help us mitigate website attacks and once you know the proccess it is very simple.

If you have access to your DNS records and a limited technical knowledge it is quite easy to set up cloudfare by following the setup guide when you make an account.

1. Mitigating Attacks
We were having problems with huge spikes fo traffic from certain ip addresses and ranges from specifically Singapore, Russia and Pakistan. Wanting a way to block the entire country we have resulted in using Cloudflare. When set up you can go to Your Website > Security > WAF

This will allow you to set up a custom rule for specific countries to either challenge them with a captcha or outright block them:

Attachment 20649

To find our exactly what countries you may be getting attacked from it is worth looking at either the website logs if any are being created, the server logs including access logs where mine details the ips that are most connecting to the website. Then checking these ips via a whois checker online.

12 Jun 2024, 3:13 PM
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Post #3 by swguy

Thank you @DannyVarley! I will update the docs with your content.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

21 Aug 2024, 7:20 PM
#4
spminis avatar

spminis

Zen Follower

Join Date:
Feb 2015
Location:
USA
Posts:
194
Plugin Contributions:
0

Post #4 by spminis

DannyVarley:

I just wanted to add my limited experience with Cloudflare and exactly how it helps us mitigate attacks and also serve data with cache more efficiently. We originally set this up to help us mitigate website attacks and once you know the proccess it is very simple.

If you have access to your DNS records and a limited technical knowledge it is quite easy to set up cloudfare by following the setup guide when you make an account.

1. Mitigating Attacks
We were having problems with huge spikes fo traffic from certain ip addresses and ranges from specifically Singapore, Russia and Pakistan. Wanting a way to block the entire country we have resulted in using Cloudflare. When set up you can go to Your Website > Security > WAF

This will allow you to set up a custom rule for specific countries to either challenge them with a captcha or outright block them:

Attachment 20649

To find our exactly what countries you may be getting attacked from it is worth looking at either the website logs if any are being created, the server logs including access logs where mine details the ips that are most connecting to the website. Then checking these ips via a whois checker online.

I installed it but ran into a strange problem. My site worked on firefox and Edge on the computer but not on Iphone or Ipad. I got a "server not found" message and when I put my site into "is my site down" it showed it as down even though it was up on the the 2 browsers that I mentioned. If you know of a quick fix I'd appreciate as right now I don't have the time to try to fix the problem.
Thanks
Carol

21 Aug 2024, 11:30 PM
#5
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,908
Plugin Contributions:
23

Post #5 by dbltoe

It may not have propagated on the DNS being used by your iPhone (rather doubt it).

On your iPhone, go to dnschecker.org and enter the domain. See if the IP addresses for all the DNS servers matches that of CloudFlare.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

21 Aug 2024, 11:37 PM
#6
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Post #6 by swguy

or the iPhone might have the old information cached.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

21 Aug 2024, 11:44 PM
#7
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,908
Plugin Contributions:
23

Post #7 by dbltoe

Toggling airplane mode should be the quickest way to clear the cache on an iPhone.

Restarting the iPhone should do it as well, but that takes time.

Chrome on an iPhone may need to have you separately clear its cache as well.

There's more than one standard DNS server used by an iPhone. It's more provider specific than iPhone specific.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

24 Jan 2026, 10:15 PM
#8
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,819
Plugin Contributions:
24

Post #8 by balihr

Just going to share my thoughts on Cloudflare in hopes it helps someone else. Let me start by pointing out I'm nowhere near a fan of Cloudflare and I tend to avoid it whenever that's possible. Quality hosts handle protection themselves either as part of the plan or as an extra service. From my experience, if your host is advising to use Cloudflare, consider changing your host - they DO have the ability to help you (yes, even on shared plans), but they choose not to be bothered.
Cloudflare is not a magic wand and it should not be considered as the first (and/or only) choice when fighting bots and/or attacks.

Country blocking
If you want to block just a few countries, you should be fine. However, do NOT go the opposite way and block all countries except the ones you're interested in. For example, if your targeted audience is only US, you might think it's a good idea to block all countries except the US. It's NOT. Search engines will visit your site from multiple locations, not just the US. It gets even worse if you have an AdWords campaign - your campaigns will get blocked in no time. Google Merchant Center uses multiple bots/fetchers from various locations - if it can't reach your site, your ads get disapproved.

Bot fighting mode
Unless you're on one of the paid plans, you can not adjust any parameters for the "Bot fighting mode" and you only get an on/off switch. As much as they advertise it as smart, I keep seeing how it blocks Googlebot. There are numerous reports about it and Cloudflare seems to be ignoring it. The only solution currently available is to disable that mode.

Rules
You only get to add 5 rules with the free plan, which was balanced perfectly well to pull you into paid plans because ideally you need 6 or more. Here's my Top 5:
Rule name: Allow Verified Bots
Rule condition: cf.client.bot
Rule action: Skip

Rule name: Challenge High Risk Countries
Rule condition: (ip.geoip.country in {"RU" "CN" "IR" "KP" "BR" "IN" "LV" "AR" "MX" "VN" "MA" "ZA" "ID" "CO" "EC" "PK" "DZ"} and not cf.client.bot)
Rule action: Managed Challenge

Rule name: Challenge POST Requests
Rule condition: (http.request.method eq "POST" and not cf.client.bot)
Rule action: Managed Challenge

Rule name: Protect Zen Cart Heavy Pages
Rule condition: (
http.request.uri.query contains "main_page=shopping_cart"
or http.request.uri.query contains "main_page=checkout"
or http.request.uri.query contains "main_page=advanced_search"
or http.request.uri.query contains "main_page=login"
)
Rule action: Managed Challenge

Rule name: Block Scanners
Rule condition: (
http.request.uri.path contains "/zc_install"
or http.request.uri.path contains "/phpmyadmin"
or http.request.uri.path contains "/.env"
)
Rule action: Block

I use them in this exact order. Rules 4 and 5 can be extended to additional pages (example: returns) and specific directories depending on your setup.

DNS
You might need to change DNS status for some of your subdomains. If you're using mail.domain.com (or imap, smtp, pop or autodiscover), these should not be proxied. If you're using an email client such as Outlook or Thunderbird, you should change it to "DNS only" because your email client can't pass the challenge.


I am by no means an expert when it comes to Cloudflare and am just sharing my experience with it. Perhaps I'm doing something wrong - if that's the case, I'd love to hear ideas and suggestions and learn new tricks so feel free to share your experience and your setup.

My site - Pro ZC Help
My portfolio | My plugins

25 Jan 2026, 9:45 PM
#9
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,908
Plugin Contributions:
23

Post #9 by dbltoe

Cloudflare, like many other service providers, will look at what services are the ones really needed, and, surprisingly enough, those services are the first thing listed in the "pro" versions.

Dish and other cable providers purposely put popular channels in different packages so that you wind up needing four different packages to watch your six favorites.

With the advent of free/inexpensive VPN products, IP-based country blocks alone won't stop someone who really wants in to your site.

There are many things a host can do to emulate the common Cloudflare features. With a dedicated server, VPS, or the old Linux box in the corner of the office, you can control your own destiny as well.

Most Zen Cart sites are not going to experience the DDoS attacks that WordPress and others do, so, while touted as a "must-have," it might never be needed for your site's environment.

Things like DNS management (run your own), Reverse Proxies + TLS Termination + Basic Load BallancingNginx, Web Application Firewall (WAF), GeoIP blockers, Nginx Bot Mitigation Tools, and a lot of ways to provide DDos protection allow you to do most of what the free Cloudflare system provides.

You can use BunkerWeb, Nginx Proxy Manager + CrowdSec + Authelia, and other stacks to all-in-one self-host.

Granted, you can't fully replicate all of Cloudflare's features, but you can achieve 80-90% of the features most site owners are after at Cloudflare.

Ask your host what they are doing for DDoS and what you can do personally, if provided in your plan.

Are they providing some form of WAF (ModSecurity is common), bot mitigation, GeoIP, etc.?

Each site owner needs to decide their own personal site's need as question accordingly. If your priority is country-based spam, GeoIP is your first question. If they have it, be sure to ask the second (but more vital) question, "Is it included in my plan".

"We have security" is not a valid answer. GoneDaddy has security but is ranks as one of the lowest in protection and highest in providing "features" at a "small monthly fee" which seems to never be available other than paid at least annually.

I can't speak for the folks at aeiia.com, but I've known barco57 for some time and know that Mike provides excellent service for Zenners. I'm sure they have excellent services and security setups. They utilize cPanel as does myzencarthost.com. That alone, indicates a willingness to invest a little more $ into a good product for the customer.

I became a host (and later a certified host) as i just got sick and tired of all the hosts I tried blaming anyone but themselves and offering me an "add-on" that could take care of my problem. It's like you've signed the contract for the new car, get ready to drive home, and you find out it's going to be extra for gas in the tank and tires on the rims. "Oh, you want the key fob to open the door?".

Ask your host if they include advanced/automated backups, Immunify360 (or some other advanced malware scanner/protection, LiteSpeed servers (or the enhancements). GoneDaddy is the best at nickel-and-diming a customer at every turn.

myZenCartHost.com serves only Zen Cart sites while aeiia.com also hosts other platforms along with Zen Cart. With either, a Zen Cart store owner is going to get a better experience than with any other host.

I sincerely feel both our companies are constantly striving to make the Zen Cart experience easier for the store owner.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

1 Feb 2026, 10:18 AM
#11
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Post #11 by heathenmagic

dbltoe:

Cloudflare, like many other service providers, will look at what services are the ones really needed, and, surprisingly enough, those services are the first thing listed in the "pro" versions.

Dish and other cable providers purposely put popular channels in different packages so that you wind up needing four different packages to watch your six favorites.

With the advent of free/inexpensive VPN products, IP-based country blocks alone won't stop someone who really wants in to your site.

There are many things a host can do to emulate the common Cloudflare features. With a dedicated server, VPS, or the old Linux box in the corner of the office, you can control your own destiny as well.

Most Zen Cart sites are not going to experience the DDoS attacks that WordPress and others do, so, while touted as a "must-have," it might never be needed for your site's environment.

Things like DNS management (run your own), Reverse Proxies + TLS Termination + Basic Load BallancingNginx, Web Application Firewall (WAF), GeoIP blockers, Nginx Bot Mitigation Tools, and a lot of ways to provide DDos protection allow you to do most of what the free Cloudflare system provides.

You can use BunkerWeb, Nginx Proxy Manager + CrowdSec + Authelia, and other stacks to all-in-one self-host.

Granted, you can't fully replicate all of Cloudflare's features, but you can achieve 80-90% of the features most site owners are after at Cloudflare.

Ask your host what they are doing for DDoS and what you can do personally, if provided in your plan.

Are they providing some form of WAF (ModSecurity is common), bot mitigation, GeoIP, etc.?

Each site owner needs to decide their own personal site's need as question accordingly. If your priority is country-based spam, GeoIP is your first question. If they have it, be sure to ask the second (but more vital) question, "Is it included in my plan".

"We have security" is not a valid answer. GoneDaddy has security but is ranks as one of the lowest in protection and highest in providing "features" at a "small monthly fee" which seems to never be available other than paid at least annually.

I can't speak for the folks at aeiia.com, but I've known barco57 for some time and know that Mike provides excellent service for Zenners. I'm sure they have excellent services and security setups. They utilize cPanel as does myzencarthost.com. That alone, indicates a willingness to invest a little more $ into a good product for the customer.

I became a host (and later a certified host) as i just got sick and tired of all the hosts I tried blaming anyone but themselves and offering me an "add-on" that could take care of my problem. It's like you've signed the contract for the new car, get ready to drive home, and you find out it's going to be extra for gas in the tank and tires on the rims. "Oh, you want the key fob to open the door?".

Ask your host if they include advanced/automated backups, Immunify360 (or some other advanced malware scanner/protection, LiteSpeed servers (or the enhancements). GoneDaddy is the best at nickel-and-diming a customer at every turn.

myZenCartHost.com serves only Zen Cart sites while aeiia.com also hosts other platforms along with Zen Cart. With either, a Zen Cart store owner is going to get a better experience than with any other host.

I sincerely feel both our companies are constantly striving to make the Zen Cart experience easier for the store owner.

Thanks so much for your guide and help with this, I have only the past few days added Cloudflare to my site. Never had to implement anything like until zencart 2.0 . I believe perhaps the bots always been there, but something to do with more stress on Laravel aspect in the upgrade. I have added your pointers so far, it seems to be doing a lot so far. I am using ABUSEipdb in conjunction, not sure if anybody else does that? Am on free version so far of each, ABUSEipdb has been using all its quota each day the past week or so. But hoping that goes after next rollover after cloudflare kicks in later. Asking my host about some of the other tools you mentioned, taking the layered approach.

13 Feb 2026, 1:44 AM
#12
djdavedawson avatar

djdavedawson

Zen Follower

Join Date:
Jul 2005
Location:
Orlando, Fl
Posts:
343
Plugin Contributions:
0

Post #12 by djdavedawson

I found when switching dns to cloud flare, it's important to delete the old dns entries, and tell your server only to accept 80/443 requests from cloud flare. Otherwise targeted bots can still get to the site.

iOS issues, with older ZC versions check IPV6 compatibility. You may have to toggle pseudoIPV4 on cloudflare.

Not enough characters in the whosonline/ip_address table to support IPV6.

If you're OK with the Human Check for all, setup a rule Called "Challenge ALL" with the expression "not cf.client.bot" (no quotes) and Managed Challenge.

This will allow google bot, other legit crawlers, & PayPal to get through.

So your (if)paid ads don't fail

~D