Category Archives: CloudFlare

cloudflare – Rate Limiting

Rate Limiting

Rate limit specific traffic from IP addresses based on URI, threshold, and other attributes for added protection from attacks.

Traffic Manager

Configure load balancing and failover across multiple servers, data centers and geographic regions, based on active health checks.

Note: If you’re currently a part of the API-only Early Access program, this card will not update to reflect your status. Please consult the API documentation to configure your Load Balancers.

 

 

Cloudflare – ban country with .htaccess

One of my clients asked me to BAN an specific country to one of his sites.
Since we have Cloudflare, this is how I made it…

On .htaccess I’v simply added the following lines – on the top of .htaccess -.

SetEnvIf CF-IPCountry IN BuzzOff=1
SetEnvIf CF-IPCountry PT BuzzOff=1
Order allow,deny
Allow from all
Deny from env=BuzzOff

But remember!
Domain/subdomain must have Cloudflare active on DNS settings…

discourse & cloudflare – show real users IP address

Discourse has a recent (5month old?) template to handle with this.

Captura de ecrã 2016-07-24, às 14.51.40

Lets add   – “templates/cloudflare.template.yml” to our templates scheme…

nano containers/app.yml

Save it and rebuild the app! 🙂

./launcher rebuild app

Captura de ecrã 2016-07-24, às 15.01.51

Et voilá!, my  ISP (portuguese) IP! 🙂

Captura de ecrã 2016-07-24, às 15.09.51

More readings