Ionos and cloudflare ip geolocation setup

My website is hosted on an ionos managed server. I have CDN Railgun setup through Ionos server.

I want to implement geoip and have looked at article https://support.cloudflare.com/hc/en-us/articles/200168236-Configuring-Cloudflare-IP-Geolocation

Ionos support says they do NOT support the geo-ip package on a managed server. Has anyone set this support up through the Cloudflare dashboard for a website hosted on ionos managed server? Before I start myself, if there is someone who has experience/success, I’d be interested in any thing to watch out for.

Thanks in advance for any ideas

Thanks

I’m not sure what you mean by a Geo-IP package. The article you linked to is just a way to include a Country Code header in Cloudflare requests. The last half of that article is just about how to read that header in different programming languages.

Thanks. I’m obviously somewhat confused. My objective is to stop/redirect SPAM to my website by ‘country code’, such as

The blocking countries in .htaccess as described in https://briansnelson.com/How_to_block_or_allow_countries_using_GeoIP_and_.htaccess

uses syntax like the following.

Block Countries using GeoIP and mod_geoip

SetEnvIf GEOIP_COUNTRY_CODE RU BlockCountry
Deny from env=BlockCountry

To get the GEOIP_COUNTRY_CODE variable recognized, needs https://www.devside.net/archives/wamp-server/install-geoip-apache-module-to-get-country-from-ip-address installed, and on my managed server, I don’t have access to the needed directories to set this up.

Since I have CDN Railgun enabled on my ionos server, a friend suggested using Cloudflare and their geo location.

I’m hesitant to do much until I understand how this works, as when I first enabled CDN Railgun on IONOS, I lost access to my website, though it was not obvious what DNS settings I should have changed. IONOS support, quickly fixed the problem. But, I’m gunshy that I might lose access to my website by trying setup on Cloudflare directly.

It’s up to whatever developer you have coding your site to use the Cloudflare country header to block activity within your server. Or just use a Cloudflare Firewall Rule to block unwanted traffic.

Thanks. “I am the developer” on my site. I will look at the Firewall Rules Language doc you referenced.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.