# Trying to install cloudflare bouncer

**URL:** <https://discourse.crowdsec.net/t/trying-to-install-cloudflare-bouncer/884>\
**Category:** Uncategorized\
**Created:** [July 14, 2022, 2:09am UTC](https://discourse.crowdsec.net/t/trying-to-install-cloudflare-bouncer/884 "2022-07-14T02:09:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![teol](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/teol/32/88_2.png) [@teol](https://discourse.crowdsec.net/u/teol)\
**Post date:** [July 14, 2022, 2:09am UTC](https://discourse.crowdsec.net/t/trying-to-install-cloudflare-bouncer/884/1 "2022-07-14T02:09:22Z")

</div>

Hi,

I’m already using the firewall bouncer and I’d like to add the cloudflare bouncer.

The thing is that I don’t really understand how to configure it.  
The doc here explains a bit: [Cloudflare Bouncer | CrowdSec](https://docs.crowdsec.net/docs/bouncers/cloudflare/#installation)

I installed the apt packet. Now I’m blocked at this step:

```auto
crowdsec-cloudflare-bouncer -g <CLOUDFLARE_TOKEN1>,<CLOUDFLARE_TOKEN2> -o /etc/crowdsec/bouncers/crowdsec-cloudflare-bouncer.yaml # auto-generate cloudflare config for provided space separated tokens 

```

I have a CloudFlare token because I’m using the API to manage my WAF myself.  
But why do I need 2 tokens? What permission must be set to the token?

I tried with my current token (so only one) and then executed the next command:

```auto
crowdsec-cloudflare-bouncer -s

```

From what I understand it’s supposed to create new WAF rules.  
But it does nothing in my CloudFlare WAF and keeps executing, never stops.

Can someone help me understand please ?

Thank you

---

<div class="post-metadata">

**Author:** ![iiAmLoz](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/iiamloz/32/386_2.png) [@iiAmLoz](https://discourse.crowdsec.net/u/iiAmLoz)\
**Post date:** [July 18, 2022, 10:34am UTC](https://discourse.crowdsec.net/t/trying-to-install-cloudflare-bouncer/884/2 "2022-07-18T10:34:22Z")

</div>

Hey,

The example showing 2 tokens is just an example you can use one. The token must have the permissions shown here: [Cloudflare Bouncer | CrowdSec](https://docs.crowdsec.net/docs/next/bouncers/cloudflare#cloudflare-configuration), since you were already using the cloudflare WAF do you have any rules setup already? under the free tier you can only have one list per account.

Regards,  
Laurence

---

<div class="post-metadata">

**Author:** ![teol](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/teol/32/88_2.png) [@teol](https://discourse.crowdsec.net/u/teol)\
**Post date:** [July 18, 2022, 11:40am UTC](https://discourse.crowdsec.net/t/trying-to-install-cloudflare-bouncer/884/3 "2022-07-18T11:40:47Z")

</div>

Hi,

Thank you for your answer.

I’m on a CloudFlare PRO plan and I only use 5 out of 20 WAF rules so I suppose it’s okay.

My problem might be the token’s permission. I’m gonna create a new one with the permissions you gave me and I’ll see if it works.

---

<div class="post-metadata">

**Author:** ![teol](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/teol/32/88_2.png) [@teol](https://discourse.crowdsec.net/u/teol)\
**Post date:** [July 18, 2022, 12:48pm UTC](https://discourse.crowdsec.net/t/trying-to-install-cloudflare-bouncer/884/4 "2022-07-18T12:48:20Z")

</div>

Hello again,

It worked, it was just due to wrong permissions on the token :).  
Maybe it would be good to display an error when the permissions are incorrect.

Thanks !

---

<div class="post-metadata">

**Author:** ![iiAmLoz](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/iiamloz/32/386_2.png) [@iiAmLoz](https://discourse.crowdsec.net/u/iiAmLoz)\
**Post date:** [July 18, 2022, 2:52pm UTC](https://discourse.crowdsec.net/t/trying-to-install-cloudflare-bouncer/884/5 "2022-07-18T14:52:17Z")

</div>

Great! I will feed the information back glad it helped!
