Skip to content

Commit 2c90228

Browse files
committed
up
1 parent 33173a4 commit 2c90228

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

crowdsec-docs/unversioned/user_guides/waf_rp_howto.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Accept it in the console:
165165

166166
## Detecting is cool, blocking is better.
167167

168-
To complete our setup, we need the ability to block bad IPs and requests before they reach Apache, our little bro. We will install the Nginx bouncer (or remediation component) for this. The bouncer can block IPs when instructed by CrowdSec. As simple as this:
168+
To complete our setup, we need the ability to block bad IPs and requests before they reach Apache, our backend server. We will install the Nginx bouncer (or remediation component) for this. The bouncer can block IPs when instructed by CrowdSec. As simple as this:
169169

170170
```bash
171171
sudo apt install crowdsec-nginx-bouncer
@@ -201,20 +201,20 @@ time="2025-08-06T13:06:44Z" level=info msg="(3ef52352a7e54c92b4394646a32bc095auA
201201

202202
## Going further - Web Application Firewall
203203

204-
However, this approach has a limit: CrowdSec reads logs and acts based on their content, which means that you somehow react to an attack that has already happened. We want to intercept malevolent requests “on the fly” so that they never reach our little bro, Apache. This is the job of the [WAF](https://doc.crowdsec.net/docs/next/appsec/intro):
204+
However, this approach has a limit: CrowdSec reads logs and acts based on their content, which means that you somehow react to an attack that has already happened. We want to intercept malevolent requests “on the fly” so that they never reach our backend server, Apache. This is the job of the [WAF](https://doc.crowdsec.net/docs/next/appsec/intro):
205205

206-
We follow [https://doc.crowdsec.net/docs/next/appsec/quickstart/nginxopenresty](https://doc.crowdsec.net/docs/next/appsec/quickstart/nginxopenresty) :
206+
We follow [this quickstart guide](https://doc.crowdsec.net/docs/next/appsec/quickstart/nginxopenresty) :
207207

208208
1) We install the appsec collection. They contain the WAF rules
209209

210210
```bash
211-
$ sudo cscli collections install crowdsecurity/appsec-virtual-patching crowdsecurity/appsec-generic-rules
211+
sudo cscli collections install crowdsecurity/appsec-virtual-patching crowdsecurity/appsec-generic-rules
212212
```
213213

214214
2) We enable the AppSec/WAF acquisition, which allows CrowdSec to expose a service to which Nginx can post validation requests.
215215

216216
```bash
217-
# cat > /etc/crowdsec/acquis.d/appsec.yaml << EOF
217+
cat > /etc/crowdsec/acquis.d/appsec.yaml << EOF
218218
appsec_config: crowdsecurity/appsec-default
219219
labels:
220220
type: appsec
@@ -226,21 +226,21 @@ EOF
226226
3) We restart CrowdSec
227227

228228
```bash
229-
# systemctl restart crowdsec
229+
sudo systemctl restart crowdsec
230230
```
231231

232232
4) We instruct our nginx bouncer to rely on CrowdSec for the WAF feature:
233233

234234
```bash
235-
# cat >> /etc/crowdsec/bouncers/crowdsec-nginx-bouncer.conf << EOF
235+
cat >> /etc/crowdsec/bouncers/crowdsec-nginx-bouncer.conf << EOF
236236
APPSEC_URL=http://127.0.0.1:7422
237237
EOF
238238
```
239239

240240
5) Finally, we restart nginx
241241

242242
```bash
243-
# systemctl restart nginx
243+
sudo systemctl restart nginx
244244
```
245245

246246
## Testing the WAF

0 commit comments

Comments
 (0)