Skip to content

Commit f79dff6

Browse files
committed
feat: Add NGINX configuration page, change weights
1 parent c39db9f commit f79dff6

File tree

8 files changed

+201
-6
lines changed

8 files changed

+201
-6
lines changed

content/waf/configure/apreload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# We use sentence case and present imperative tone
33
title: "Use apreload to update configuration files"
44
# Weights are assigned in increments of 100: determines sorting order
5-
weight: 300
5+
weight: 200
66
# Creates a table of contents and sidebar, useful for large documents
77
toc: true
88
# Types have a 1:1 relationship with Hugo archetypes, so you shouldn't need to change this

content/waf/configure/compiler.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# We use sentence case and present imperative tone
33
title: "Build and use the compiler tool"
44
# Weights are assigned in increments of 100: determines sorting order
5-
weight: 400
5+
weight: 300
66
# Creates a table of contents and sidebar, useful for large documents
77
toc: true
88
# Types have a 1:1 relationship with Hugo archetypes, so you shouldn't need to change this

content/waf/configure/converters.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# We use sentence case and present imperative tone
33
title: "Build and use the converter tools"
44
# Weights are assigned in increments of 100: determines sorting order
5-
weight: 500
5+
weight: 400
66
# Creates a table of contents and sidebar, useful for large documents
77
toc: true
88
# Types have a 1:1 relationship with Hugo archetypes, so you shouldn't need to change this
@@ -316,7 +316,7 @@ docker run -v `pwd`:`pwd` -w `pwd` --entrypoint /opt/app_protect/bin/convert-sig
316316

317317
The Attack Signature Report tool scans the system for attack signatures, then generates a JSON report file with information about these signatures.
318318

319-
This tool can be deployed and used independently from a F5 WAF for NGINX deployment using the [compiler image]({{< ref "/waf/configure/compiler.md" >}}) to generate a report about the default signatures included with F5 WAF, or the signatures included in [an update package]({{< ref "/waf/signatures/">}}).
319+
This tool can be deployed and used independently from a F5 WAF for NGINX deployment using the [compiler image]({{< ref "/waf/configure/compiler.md" >}}) to generate a report about the default signatures included with F5 WAF, or the signatures included in [an update package]().
320320

321321
The latter case is possible on a standalone compiler deployment by comparing a report from before a signature update and a report from after the signature update.
322322

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
---
2+
# We use sentence case and present imperative tone
3+
title: "Configure NGINX features with F5 WAF"
4+
# Weights are assigned in increments of 100: determines sorting order
5+
weight: 100
6+
# Creates a table of contents and sidebar, useful for large documents
7+
toc: false
8+
# Types have a 1:1 relationship with Hugo archetypes, so you shouldn't need to change this
9+
nd-content-type: reference
10+
# Intended for internal catalogue and search, case sensitive:
11+
# Agent, N4Azure, NIC, NIM, NGF, NAP-DOS, NAP-WAF, NGINX One, NGINX+, Solutions, Unit
12+
nd-product: NAP-WAF
13+
---
14+
15+
This document shows example of how to modify your NGINX configuration to enable F5 WAF for NGINX features.
16+
17+
It is intended as a reference for, small self-contained examples of how F5 WAF for NGINX is configured.
18+
19+
Certain features do not work well with F5 NGINX, such as modules requiring _subrequest_ when calling or being called from a scope that contains `app_protect_enable on`.
20+
21+
Modules requiring the _Range_ header (Such as _Slice_) are also unsupported in a scope which enables F5 WAF for NGINX.
22+
23+
The examples below show work arounds for the limitations of these features.
24+
25+
For information on configuring NGINX, you should view the [NGINX documentation]({{< ref "/nginx/" >}}).
26+
27+
## Static location
28+
29+
```nginx
30+
load_module modules/ngx_http_app_protect_module.so;
31+
32+
http {
33+
server {
34+
listen 127.0.0.1:8080;
35+
server_name localhost;
36+
37+
location / {
38+
app_protect_enable on;
39+
proxy_pass http://127.0.0.1:8080/proxy/$request_uri;
40+
}
41+
42+
location /proxy {
43+
default_type text/html;
44+
return 200 "Hello! I got your URI request - $request_uri\n";
45+
}
46+
}
47+
}
48+
```
49+
50+
## Ranges
51+
52+
```nginx
53+
load_module modules/ngx_http_app_protect_module.so;
54+
55+
http {
56+
57+
server {
58+
listen 127.0.0.1:8080;
59+
server_name localhost;
60+
61+
location / {
62+
app_protect_enable on;
63+
proxy_pass http://127.0.0.1:8081$request_uri;
64+
}
65+
}
66+
67+
server {
68+
listen 127.0.0.1:8081;
69+
server_name localhost;
70+
71+
location / {
72+
proxy_pass http://1.2.3.4$request_uri;
73+
proxy_force_ranges on;
74+
}
75+
}
76+
}
77+
```
78+
79+
## Slice
80+
81+
```nginx
82+
load_module modules/ngx_http_app_protect_module.so;
83+
84+
http {
85+
server {
86+
listen 127.0.0.1:8080;
87+
server_name localhost;
88+
89+
location / {
90+
app_protect_enable on;
91+
proxy_pass http://127.0.0.1:8081$request_uri;
92+
}
93+
}
94+
95+
server {
96+
listen 127.0.0.1:8081;
97+
server_name localhost;
98+
99+
location / {
100+
proxy_pass http://1.2.3.4$request_uri;
101+
slice 2;
102+
proxy_set_header Range $slice_range;
103+
}
104+
}
105+
}
106+
```
107+
108+
## Mirror
109+
110+
```nginx
111+
load_module modules/ngx_http_app_protect_module.so;
112+
113+
http {
114+
log_format test $uri;
115+
116+
server {
117+
listen 127.0.0.1:8080;
118+
server_name localhost;
119+
120+
location / {
121+
app_protect_enable on;
122+
mirror /mirror;
123+
}
124+
125+
location /mirror {
126+
log_subrequest on;
127+
access_log test$args.log test;
128+
}
129+
}
130+
}
131+
```
132+
133+
## njs
134+
135+
```nginx
136+
load_module modules/ngx_http_app_protect_module.so;
137+
load_module modules/ngx_http_js_module.so;
138+
139+
http {
140+
js_include service.js
141+
142+
server {
143+
listen 127.0.0.1:8080;
144+
server_name localhost;
145+
146+
location / {
147+
app_protect_enable on;
148+
proxy_pass http://127.0.0.1:8081$request_uri;
149+
}
150+
}
151+
152+
server {
153+
listen 127.0.0.1:8081;
154+
server_name localhost;
155+
156+
location / {
157+
js_content foo;
158+
}
159+
}
160+
}
161+
```
162+
163+
## Client authorization
164+
165+
```nginx
166+
load_module modules/ngx_http_app_protect_module.so;
167+
168+
http {
169+
server {
170+
listen 127.0.0.1:8080;
171+
server_name localhost;
172+
173+
location / {
174+
auth_request /scan;
175+
proxy_pass http://localhost:8888;
176+
}
177+
location /scan {
178+
proxy_pass http://localhost:8081$request_uri;
179+
}
180+
}
181+
182+
server {
183+
listen 127.0.0.1:8081;
184+
server_name localhost;
185+
186+
location /scan {
187+
app_protect_enable on;
188+
proxy_pass http://localhost:8888;
189+
}
190+
}
191+
}
192+
```

content/waf/configure/secure-mtls.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# We use sentence case and present imperative tone
33
title: "Secure traffic using mTLS"
44
# Weights are assigned in increments of 100: determines sorting order
5-
weight: 200
5+
weight: 500
66
# Creates a table of contents and sidebar, useful for large documents
77
toc: true
88
# Types have a 1:1 relationship with Hugo archetypes, so you shouldn't need to change this
@@ -12,7 +12,7 @@ nd-content-type: how-to
1212
nd-product: NAP-WAF
1313
---
1414

15-
This topic describes how to secure traffic between NGINX and the F5 WAF enforcer using mTLS.
15+
This document describes how to secure traffic between NGINX and the F5 WAF enforcer using mTLS.
1616

1717
It explains how to generate the necessary certificates, then update configuration files to use them.
1818

content/waf/install/attacks.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ title: "Update F5 WAF for NGINX attack signatures"
55
weight: 100
66
# Creates a table of contents and sidebar, useful for large documents
77
toc: false
8+
draft: true
89
# Types have a 1:1 relationship with Hugo archetypes, so you shouldn't need to change this
910
nd-content-type: how-to
1011
# Intended for internal catalogue and search, case sensitive:

content/waf/install/bots.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ title: "Update F5 WAF for NGINX bot signatures"
55
weight: 300
66
# Creates a table of contents and sidebar, useful for large documents
77
toc: false
8+
draft: true
89
# Types have a 1:1 relationship with Hugo archetypes, so you shouldn't need to change this
910
nd-content-type: how-to
1011
# Intended for internal catalogue and search, case sensitive:

content/waf/install/threat-campaigns.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ title: "Update F5 WAF for NGINX threat campaign signatures"
55
weight: 200
66
# Creates a table of contents and sidebar, useful for large documents
77
toc: false
8+
draft: true
89
# Types have a 1:1 relationship with Hugo archetypes, so you shouldn't need to change this
910
nd-content-type: how-to
1011
# Intended for internal catalogue and search, case sensitive:

0 commit comments

Comments
 (0)