Skip to content

NGINX App Protect WAF refactor #949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 30 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
39a5cc0
feat: Add NAP-WAF Refactor POC
ADubhlaoich Jul 10, 2025
19a5cb3
Merge branch 'main' into waf/refactor
ADubhlaoich Jul 10, 2025
41c09d7
Merge branch 'main' into waf/refactor
ADubhlaoich Aug 11, 2025
55821ff
feat: Add overview and compiler pages
ADubhlaoich Aug 13, 2025
a4e6447
Merge branch 'main' into waf/refactor
ADubhlaoich Aug 13, 2025
98ca347
Merge branch 'main' into waf/refactor
ADubhlaoich Aug 13, 2025
75c1c1d
Merge branch 'main' into waf/refactor
ADubhlaoich Aug 14, 2025
e5a8eb5
Merge branch 'main' into waf/refactor
ADubhlaoich Aug 14, 2025
a5a03f3
Merge branch 'main' into waf/refactor
ADubhlaoich Aug 14, 2025
901c42c
feat: Add Support page content
ADubhlaoich Aug 15, 2025
94550d2
feat: Add tech specs details, terminology
ADubhlaoich Aug 15, 2025
4956a0c
Merge branch 'main' into waf/refactor
ADubhlaoich Aug 15, 2025
345c135
Merge branch 'main' into waf/refactor
ADubhlaoich Aug 18, 2025
fca830b
feat: Minor updates to terminology
ADubhlaoich Aug 18, 2025
76fd259
feat: Update landing page links
ADubhlaoich Aug 18, 2025
cae32bf
feat: Add initial policy configuration
ADubhlaoich Aug 18, 2025
702afa9
Merge branch 'main' into waf/refactor
ADubhlaoich Aug 18, 2025
29dd413
feat: Minor noun issues
ADubhlaoich Aug 18, 2025
05fb558
Merge branch 'main' into waf/refactor
ADubhlaoich Aug 19, 2025
f0e8cf3
Merge branch 'main' into waf/refactor
ADubhlaoich Aug 19, 2025
e284e53
feat: Start of virtual environment instructions
ADubhlaoich Aug 20, 2025
8d3216b
Merge branch 'main' into waf/refactor
ADubhlaoich Aug 20, 2025
15289a7
feat: Commit working changes for VE deployment
ADubhlaoich Aug 20, 2025
4be6d8f
Merge branch 'main' into waf/refactor
ADubhlaoich Aug 21, 2025
a7fdc21
feat: Rename mentions of NGINX App Protect DoS
ADubhlaoich Aug 21, 2025
8aaa5e4
feat: Finish OS-specific set-up instructions
ADubhlaoich Aug 21, 2025
70c7690
feat: Add NGINX configuration step for VE
ADubhlaoich Aug 21, 2025
1ffb6fc
feat: Save working state
ADubhlaoich Aug 21, 2025
a3965d8
feat: Finish initial draft of Plus VE install
ADubhlaoich Aug 21, 2025
9696c6e
Merge branch 'main' into waf/refactor
ADubhlaoich Aug 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# NGINX Agent
content/nginx/nms/agent/* @nginx/nginx-agent

# NGINX App Protect DoS
# F5 DoS for NGINX
content/nap-dos/* @nginx/dos-docs-approvers

# NGINX App Protect WAF
Expand Down
7 changes: 7 additions & 0 deletions _banners/waf-oss-usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{< banner "warning" "NGINX Open Source availability" >}}

The guidance in this section is **only** applicable to F5 WAF for NGINX v5.

For NGINX v4, you must use an [NGINX Plus]({{< ref "/waf/install/plus" >}}) deployment.

{{< /banner >}}
4 changes: 2 additions & 2 deletions cloudcannon.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ collections_config:
nap_dos:
path: content/nap-dos
output: true
name: NGINX App Protect DoS
description: Documentation for NGINX App Protect DoS
name: F5 DoS for NGINX
description: Documentation for F5 DoS for NGINX
parse_branch_index: false
icon: notes
preview:
Expand Down
2 changes: 1 addition & 1 deletion content/includes/nic/configuration/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ By default, the ServiceAccount has access to all Secret resources in the cluster
### Configure root filesystem as read-only

{{< call-out "caution" >}}
This feature is compatible with [NGINX App Protect WAFv5](https://docs.nginx.com/nginx-app-protect-waf/v5/). It is not compatible with [NGINX App Protect WAFv4](https://docs.nginx.com/nginx-app-protect-waf/v4/) or [NGINX App Protect DoS](https://docs.nginx.com/nginx-app-protect-dos/).
This feature is compatible with [NGINX App Protect WAFv5](https://docs.nginx.com/nginx-app-protect-waf/v5/). It is not compatible with [NGINX App Protect WAFv4](https://docs.nginx.com/nginx-app-protect-waf/v4/) or [F5 DoS for NGINX](https://docs.nginx.com/nginx-app-protect-dos/).
{{< /call-out >}}

NGINX Ingress Controller is designed to be resilient against attacks in various ways, such as running the service as non-root to avoid changes to files. We recommend setting filesystems on all containers to read-only, this includes `nginx-ingress-controller`, though also includes `waf-enforcer` and `waf-config-mgr` when NGINX App Protect WAFv5 is in use. This is so that the attack surface is further reduced by limiting changes to binaries and libraries.
Expand Down
4 changes: 2 additions & 2 deletions content/includes/nic/rbac/set-up-rbac.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ nd-docs: DOCS-1468

<br>

If you're planning to use NGINX App Protect or NGINX App Protect DoS, additional roles and bindings are needed.
If you're planning to use NGINX App Protect or F5 DoS for NGINX, additional roles and bindings are needed.

1. (NGINX App Protect only) Create the *App Protect* role and binding:

```shell
kubectl apply -f deployments/rbac/ap-rbac.yaml
```

2. (NGINX App Protect DoS only) Create the *App Protect DoS* role and binding:
2. (F5 DoS for NGINX only) Create the *App Protect DoS* role and binding:

```shell
kubectl apply -f deployments/rbac/apdos-rbac.yaml
Expand Down
39 changes: 39 additions & 0 deletions content/includes/waf/default-conf-localhost.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
nd-docs:
---

```nginx
server {
listen 80;
server_name domain.com;

proxy_http_version 1.1;

location / {

# NGINX App Protect WAF
app_protect_enable on;

client_max_body_size 0;
default_type text/html;
proxy_pass http://127.0.0.1:8080/;
}
}

server {
listen 8080;
server_name localhost;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
}

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
```
41 changes: 41 additions & 0 deletions content/includes/waf/nginx-conf-localhost.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
nd-docs:
---

```nginx
user nginx;
worker_processes auto;

# NGINX App Protect WAF
load_module modules/ngx_http_app_protect_module.so;

error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

keepalive_timeout 65;

#gzip on;

# NGINX App Protect WAF
app_protect_enforcer_address 127.0.0.1:50000;

include /etc/nginx/conf.d/*.conf;
}
```
3 changes: 3 additions & 0 deletions content/includes/waf/supported-policy-features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
| Feature | Description |
| ----------------- | ----------- |
| [Attack signatures]({{< ref "/waf/policies/configuration.md#attack-signatures" >}}) | The default policy covers the OWASP top 10 attack patterns. Specific signature sets can be added or disabled. |
10 changes: 5 additions & 5 deletions content/nap-dos/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# The title is the product name
title: F5 NGINX App Protect DoS
title: F5 DoS for NGINX
# The URL is the base of the deployed path, becoming "docs.nginx.com/<url>/<other-pages>"
url: /nginx-app-protect-dos/
# The cascade directive applies its nested parameters down the page tree until overwritten
Expand All @@ -21,7 +21,7 @@ nd-product: NAP-DOS
## About
Achieve comprehensive protection against DoS and DDoS attacks for your apps and APIs with a multi-layered, adaptive, automated mitigation strategy for DevOps environments.

Running natively on NGINX Plus and NGINX Ingress Controller, NGINX App Protect DoS is platform-agnostic and supports deployment options ranging from edge load balancers to individual pods in Kubernetes clusters.
Running natively on NGINX Plus and NGINX Ingress Controller, F5 DoS for NGINX is platform-agnostic and supports deployment options ranging from edge load balancers to individual pods in Kubernetes clusters.

## Featured content
[//]: # "You can add a maximum of three cards: any extra will not display."
Expand All @@ -31,15 +31,15 @@ Running natively on NGINX Plus and NGINX Ingress Controller, NGINX App Protect D
{{<card-layout>}}
{{<card-section showAsCards="true" isFeaturedSection="true">}}
{{<card title="Deployment" titleUrl="/nginx-app-protect-dos/deployment-guide/learn-about-deployment/">}}
Read how to install and upgrade NGINX App Protect DoS
Read how to install and upgrade F5 DoS for NGINX
{{</card>}}
<!-- The titleURL and icon are both optional -->
<!-- Lucide icon names can be found at https://lucide.dev/icons/ -->
{{<card title="Troubleshooting" titleUrl="/nginx-app-protect-dos/troubleshooting-guide/how-to-troubleshoot/">}}
Learn how to debug NGINX App Protect DoS
Learn how to debug F5 DoS for NGINX
{{</card>}}
{{<card title="Releases" titleUrl="/nginx-app-protect-dos/releases/" icon="clock-alert">}}
Review changelogs for NGINX App Protect DoS
Review changelogs for F5 DoS for NGINX
{{</card>}}
{{</card-section>}}
{{</card-layout>}}
2 changes: 1 addition & 1 deletion content/nap-dos/deployment-guide/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Learn how to deploy NGINX App Protect DoS.
description: Learn how to deploy F5 DoS for NGINX.
title: Deployment Guide
weight: 100
url: /nginx-app-protect-dos/deployment-guide/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,28 @@ The AMIs contain combination of the following components:

- Latest version of [F5 NGINX Plus](https://www.f5.com/products/nginx/nginx-plus), optimized for use on Amazon EC2

- Latest version of [NGINX App Protect DoS](https://docs.nginx.com/nginx-app-protect-dos/), optimized for use on Amazon EC2
- Latest version of [F5 DoS for NGINX](https://docs.nginx.com/nginx-app-protect-dos/), optimized for use on Amazon EC2
- Latest version of [NGINX App Protect WAF](https://docs.nginx.com/nginx-app-protect-waf/), optimized for use on Amazon EC2
- Pre-packaged software for building highly available (HA) NGINX Plus configurations

## Install NGINX Plus NGINX App Protect WAF + DoS

To quickly set up an environment with NGINX Plus, NGINX App Protect WAF and NGINX App Protect DoS on AWS:
To quickly set up an environment with NGINX Plus, NGINX App Protect WAF and F5 DoS for NGINX on AWS:

1. Follow the instructions in [Getting Started with Amazon EC2 Linux Instances](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html) to sign up on AWS and get more information about EC2 itself.
2. Proceed to the product page for the appropriate AMI at the AWS Marketplace, and launch the AMI.

- [NGINX Plus with NGINX App Protect DoS – RHEL 7 Linux AMI HVM](https://aws.amazon.com/marketplace/pp/prodview-bjdboufufnb7g?sr=0-4&ref_=beagle&applicationId=AWSMPContessa)
- [NGINX Plus with F5 DoS for NGINX – RHEL 7 Linux AMI HVM](https://aws.amazon.com/marketplace/pp/prodview-bjdboufufnb7g?sr=0-4&ref_=beagle&applicationId=AWSMPContessa)

- [NGINX Plus with NGINX App Protect DoS – RHEL8 Linux AMI HVM](https://aws.amazon.com/marketplace/pp/prodview-e6bifer7o6uzm?sr=0-13&ref_=beagle&applicationId=AWSMPContessa)
- [NGINX Plus with F5 DoS for NGINX – RHEL8 Linux AMI HVM](https://aws.amazon.com/marketplace/pp/prodview-e6bifer7o6uzm?sr=0-13&ref_=beagle&applicationId=AWSMPContessa)

- [NGINX Plus with NGINX App Protect DoS – CentOS 7 Linux AMI HVM](https://aws.amazon.com/marketplace/pp/prodview-deeny2oe7izti?sr=0-12&ref_=beagle&applicationId=AWSMPContessa)
- [NGINX Plus with F5 DoS for NGINX – CentOS 7 Linux AMI HVM](https://aws.amazon.com/marketplace/pp/prodview-deeny2oe7izti?sr=0-12&ref_=beagle&applicationId=AWSMPContessa)

- [NGINX Plus with NGINX App Protect DoS – Debian 11 Linux AMI HVM](https://aws.amazon.com/marketplace/pp/prodview-56oveh2rsxsbq?sr=0-2&ref_=beagle&applicationId=AWSMPContessa)
- [NGINX Plus with F5 DoS for NGINX – Debian 11 Linux AMI HVM](https://aws.amazon.com/marketplace/pp/prodview-56oveh2rsxsbq?sr=0-2&ref_=beagle&applicationId=AWSMPContessa)

- [NGINX Plus with NGINX App Protect DoS – Ubuntu 20.04 Linux AMI HVM](https://aws.amazon.com/marketplace/pp/prodview-gsoln2vnsgpr4?sr=0-5&ref_=beagle&applicationId=AWSMPContessa)
- [NGINX Plus with F5 DoS for NGINX – Ubuntu 20.04 Linux AMI HVM](https://aws.amazon.com/marketplace/pp/prodview-gsoln2vnsgpr4?sr=0-5&ref_=beagle&applicationId=AWSMPContessa)

- [NGINX Plus with NGINX App Protect DoS – Ubuntu 22.04 Linux AMI HVM](https://aws.amazon.com/marketplace/pp/prodview-l6f2q2ykrjufy?sr=0-13&ref_=beagle&applicationId=AWSMPContessa)
- [NGINX Plus with F5 DoS for NGINX – Ubuntu 22.04 Linux AMI HVM](https://aws.amazon.com/marketplace/pp/prodview-l6f2q2ykrjufy?sr=0-13&ref_=beagle&applicationId=AWSMPContessa)

- [NGINX Plus with NGINX App Protect WAF + DoS – RHEL 7 Linux AMI HVM](https://aws.amazon.com/marketplace/pp/prodview-jedbygo6xbvto?sr=0-1&ref_=beagle&applicationId=AWSMPContessa)

Expand All @@ -62,7 +62,7 @@ To quickly set up an environment with NGINX Plus, NGINX App Protect WAF and NGIN

See [NGINX Plus on the AWS Cloud](https://www.nginx.com/resources/datasheets/nginx-quick-start-guide-for-aws/) deployment guide for details.

6. Verify latest NGINX PLUS / NGINX App Protect DoS / NGINX App Protect WAF packages are installed on EC2 after its first start:
6. Verify latest NGINX PLUS / F5 DoS for NGINX / NGINX App Protect WAF packages are installed on EC2 after its first start:


Verify NGINX App Protect WAF latest release from <https://docs.nginx.com/nginx-app-protect-waf/releases/> is
Expand All @@ -88,7 +88,7 @@ To quickly set up an environment with NGINX Plus, NGINX App Protect WAF and NGIN
nginx -v
```

In case NGINX PLUS / NGINX App Protect DoS / NGINX App Protect WAF packages are not latest release then upgrade the following with these commands:
In case NGINX PLUS / F5 DoS for NGINX / NGINX App Protect WAF packages are not latest release then upgrade the following with these commands:


For App Protect DoS solution based on RedHat / CentOS
Expand Down Expand Up @@ -151,17 +151,17 @@ To quickly set up an environment with NGINX Plus, NGINX App Protect WAF and NGIN



8. If AMI includes [NGINX App Protect DoS](https://docs.nginx.com/nginx-app-protect-dos/)
8. If AMI includes [F5 DoS for NGINX](https://docs.nginx.com/nginx-app-protect-dos/)

To enable NGINX App Protect DoS use the following steps:
To enable F5 DoS for NGINX use the following steps:

a. Load the NGINX App Protect DoS module on the main context in the `nginx.conf` file:
a. Load the F5 DoS for NGINX module on the main context in the `nginx.conf` file:

```shell
load_module modules/ngx_http_app_protect_dos_module.so;
```

b. Enable NGINX App Protect DoS on an `http/server/location` context in the `nginx.conf` file:
b. Enable F5 DoS for NGINX on an `http/server/location` context in the `nginx.conf` file:

```shell
app_protect_dos_enable on;
Expand All @@ -182,15 +182,15 @@ To quickly set up an environment with NGINX Plus, NGINX App Protect WAF and NGIN
sudo systemctl restart nginx
```

For more configuration information follow [NGINX App Protect DoS Directives and Policy](https://docs.nginx.com/nginx-app-protect-dos/directives-and-policy/learn-about-directives-and-policy/).
For more configuration information follow [F5 DoS for NGINX Directives and Policy](https://docs.nginx.com/nginx-app-protect-dos/directives-and-policy/learn-about-directives-and-policy/).



## What If I Need Help?

If you encounter any problems with NGINX Plus configuration, documentation is available at [nginx.org](https://nginx.org/en/docs/) and in the [NGINX Plus Admin Guide](https://docs.nginx.com/nginx/admin-guide/installing-nginx/).

If you encounter any problems with NGINX App Protect DoS configuration, documentation is available at the [NGINX App Protect DoS Troubleshooting Guide](https://docs.nginx.com/nginx-app-protect-dos/troubleshooting-guide/how-to-troubleshoot/).
If you encounter any problems with F5 DoS for NGINX configuration, documentation is available at the [F5 DoS for NGINX Troubleshooting Guide](https://docs.nginx.com/nginx-app-protect-dos/troubleshooting-guide/how-to-troubleshoot/).

If you encounter any problems with NGINX App Protect WAF configuration, documentation is available at the [NGINX App Protect WAF Troubleshooting Guide](https://docs.nginx.com/nginx-app-protect-waf/v4/troubleshooting-guide/troubleshooting/).

Expand Down
Loading
Loading