NGINX Gateway Fabric WAF 적용 – NGINX One Console 통합 관리
NGINX Gateway Fabric WAF 적용을 통해 Gateway로 전달되는 애플리케이션 트래픽에 F5 WAF for NGINX의 웹 애플리케이션 보안 정책을 적용할 수 있습니다.
NGINX One Console과 연동하면 WAF 정책과 보안 로그 설정을 콘솔에서 중앙 관리하고, 클러스터에 배포된 NGINX Gateway Fabric이 해당 구성을 가져와 Gateway에 적용하도록 구성할 수 있습니다. 또한 WAF에서 탐지하거나 차단한 요청을 NGINX One Console의 대시보드에서 확인할 수 있습니다.
이 글에서는 NGINX Gateway Fabric WAF 적용을 위해 NGINX One Console 연동, WAF 정책과 로그 프로파일 생성, F5 WAF for NGINX 활성화 및 WAFPolicy 적용 과정을 살펴봅니다. 마지막으로 정상 요청과 공격 요청을 전송하여 차단 동작과 대시보드 모니터링 결과를 확인합니다.
목차
1. 환경/버전 정보
2. NGINX Gateway Fabric, NGINX One Console 연동
3. NGINX One Console – WAF 정책 및 로깅 설정 추가
4. NGINX Gateway Fabric WAF 활성화
5. NGINX Gateway Fabric WAF 적용 확인 및 대시보드 모니터링
6. 결론
1. 환경/버전 정보
| 구성 요소 | 버전 |
|---|---|
| Kubernetes | v1.35.3 |
| NGINX Gateway Fabric | 2.6.7 |
| Gateway API | v1.5.1 |
| F5 WAF for NGINX | 5.13.2 |
NGINX Gateway Fabric의 버전 호환성은 공식 문서를 참고하세요.
2. NGINX Gateway Fabric, NGINX One Console 연동
NGINX One 콘솔로 접속하여, 좌측 메뉴의 Manage – Data Plane Keys 메뉴로 이동하여 Data Plane Key를 생성합니다.

이름과 만료 일자를 설정하고 생성합니다.

생성된 key는 최초 생성 시 1회만 표시됩니다.

생성한 key값으로 nginx-gateway 네임스페이스에 secret을 생성합니다.
$ kubectl create secret generic dataplane-key \ --from-literal=dataplane.key=<Dataplane Key> \ -n nginx-gateway
NGINX Gateway Fabric 배포를 위한 value 파일에 NGINX Plus 활성화 및 앞서 생성한 secret을 dataplaneKeySecretName에서 참조하도록 구성합니다.
NGINX Gateway Fabric을 NGINX Plus로 배포하기 위한 사전 구성은 NGINX Gateway Fabric NGINX Plus JWT 구성 가이드를 참고하세요.
nginx: image: repository: private-registry.nginx.com/nginx-gateway-fabric/nginx-plus imagePullSecrets: - nginx-plus-registry-secret plus: true nginxOneConsole: dataplaneKeySecretName: dataplane-key
구성한 value 파일을 사용하여 NGINX Gateway Fabric을 배포/업데이트 합니다.
$ helm upgrade --install ngf oci://ghcr.io/nginx/charts/nginx-gateway-fabric -n nginx-gateway -f ngf_values.yaml
NGINX One 콘솔 연동 확인을 위해 간단한 Gateway를 배포하고, Pod의 생성을 확인합니다.
apiVersion: gateway.networking.k8s.io/v1kind: Gatewaymetadata: name: waf-gatewayspec: gatewayClassName: nginx listeners: - name: http port: 80 protocol: HTTP allowedRoutes: namespaces: from: Same
$ kubectl apply -f gateway.yaml -n devopssong$ kubectl get po -n devopssongNAME READY STATUS RESTARTS AGEwaf-gateway-nginx-594994fc4d-gg565 1/1 Running 0 113s
콘솔의 Manage – Control Planes 메뉴에서 배포된 NGINX Gateway Fabric을 확인할 수 있습니다.

콘솔의 Manage – Instances 메뉴에서 Gateway 배포를 통해 생성된 Pod를 확인할 수 있습니다.

3. NGINX One Console – WAF 정책 및 로깅 설정 추가
NGINX One 콘솔 좌측의 WAF – Log Profiles 메뉴로 이동하면 기본적으로 secops_dashboard Log Profile이 있습니다.
해당 Log Profile은 F5 WAF for NGINX의 WAF 로그를 NGINX One 콘솔로 전송하여 대시보드에서 확인할 때 사용됩니다.

해당 Log Profile이 없는 경우, 아래 값으로 직접 생성합니다.
{ "filter": { "request_type": "illegal" }, "content": { "max_request_size": "2048", "max_message_size": "64k", "escaping_characters": [ { "from": "|", "to": "%7C" } ], "format": "user-defined", "format_string": "%support_id%|%ip_client%|%src_port%|%dest_ip%|%dest_port%|%vs_name%|%policy_name%|%method%|%uri%|%protocol%|%request_status%|%response_code%|%outcome%|%outcome_reason%|%violation_rating%|%blocking_exception_reason%|%is_truncated_bool%|%sig_ids%|%sig_names%|%sig_cves%|%sig_set_names%|%threat_campaign_names%|%sub_violations%|%x_forwarded_for_header_value%|%violations%|%violation_details%|%request%|%geo_location%" }}
NGINX One 콘솔 좌측의 WAF – Policies 메뉴로 이동하여 적용할 정책을 생성합니다.

정책의 이름과 설정을 구성하고, 하단의 Add Policy 버튼을 클릭하여 정책을 생성합니다.
기본 정책 구성에서 요청을 차단하도록 Enforcement Mode의 값을 Blocking으로 변경한 후 생성했습니다.
NGINX One을 활용한 정책 구성 가이드는 NGINX One으로 시작하는 F5 WAF for NGINX Policy 구성 가이드 포스트를 참고하세요.

추가된 정책을 확인할 수 있습니다.

4. NGINX Gateway Fabric WAF 활성화
기존 Gateway에 F5 WAF for NGINX 기능 활성화를 위해 아래 구성과 같은 NginxProxy CR을 Gateway가 배포된 네임스페이스에 배포합니다.
apiVersion: gateway.nginx.org/v1alpha2kind: NginxProxymetadata: name: waf-enabled-proxyspec: waf: enable: true kubernetes: deployment: container: image: repository: private-registry.nginx.com/nginx-gateway-fabric/nginx-plus-f5waf # WAF for NGINX 이미지 별도 repo 사용 시 설정 # wafContainers:# enforcer:# image:# repository: harbor.nginx-apim.com/f5-waf-nginx/waf-enforcer# configManager:# image:# repository: harbor.nginx-apim.com/f5-waf-nginx/waf-config-mgr
$ kubectl apply -f nginx-proxy.yaml -n devopssongnginxproxy.gateway.nginx.org/waf-enabled-proxy created$ kubectl get nginxproxies.gateway.nginx.org -n devopssongNAME AGEwaf-enabled-proxy 5s
배포한 NginxProxy를 참조하도록 기존에 NGINX One 콘솔 연동 확인을 위해 배포했던 Gateway의 구성을 변경합니다.
apiVersion: gateway.networking.k8s.io/v1kind: Gatewaymetadata: name: waf-gatewayspec: gatewayClassName: nginx infrastructure: parametersRef: name: waf-enabled-proxy # 배포한 NginxProxy 이름으로 설정 group: gateway.nginx.org kind: NginxProxy listeners: - name: http port: 80 protocol: HTTP allowedRoutes: namespaces: from: Same
$ kubectl apply -f gateway.yaml -n devopssong gateway.gateway.networking.k8s.io/waf-gateway configured$ kubectl get po -n devopssongNAME READY STATUS RESTARTS AGEwaf-gateway-nginx-6c7846b4d7-kn8xw 3/3 Running 0 27s
기존 NGINX Plus 컨테이너에, WAF 컨테이너 2개가 추가되어 하나의 Pod에 3개의 컨테이너 구성으로 동작하게 됩니다.
Gateway가 NGINX One 콘솔에 구성된 정책/로깅 설정을 가져와 적용하기 위해 API Token 발급이 필요합니다. 콘솔 화면 우측 계정 메뉴에서 Account Settings로 이동합니다.

좌측 메뉴의 Personal Management – Credentials 메뉴로 이동하여 Add Credentials를 선택합니다.

타입을 API Token으로 설정하고 생성합니다.

생성 후 표시되는 값을 복사합니다.

토큰 값을 base64 인코딩하여, Gateway가 배포된 네임스페이스에 Secret으로 배포합니다.
apiVersion: v1kind: Secretmetadata: name: n1c-credentialstype: Opaquedata: token: <base64 인코딩된 토큰>
$ kubectl apply -f console-secret.yaml -n devopssong
Gateway에 구성한 WAF 정책 및 로깅 설정을 적용하기 위해 WAFPolicy 리소스를 클러스터의 Gateway가 배포된 네임스페이스에 배포합니다.
apiVersion: gateway.nginx.org/v1alpha1kind: WAFPolicymetadata: name: gateway-waf-protectionspec: type: N1C # NGINX One 콘솔 연동이므로 N1C 타입 지정 targetRefs: - group: gateway.networking.k8s.io kind: Gateway name: waf-gateway # 설정을 적용할 Gateway 지정 policySource: n1cSource: url: https://<tenant-name>.console.ves.volterra.io # NGINX One 콘솔 테넌트 주소 명시 namespace: itian # NGINX One 콘솔 네임스페이스 지정 policyName: "ngf-policy" # NGINX One 콘솔에서 구성한 정책 이름 지정 auth: secretRef: name: n1c-credentials # API Token secret 이름 명시 securityLogs: - destination: type: syslog syslog: server: localhost:1514 # NGINX Agent로 WAF 로그를 syslog로 전송 후, Agent에서 콘솔로 전송 logSource: n1cSource: url: https://<tenant-name>.console.ves.volterra.io # NGINX One 콘솔 테넌트 주소 명시 namespace: itian # NGINX One 콘솔 네임스페이스 지정 profileName: "secops_dashboard" # NGINX One 콘솔에서 구성한 Log Profile 이름 지정 auth: secretRef: name: n1c-credentials
$ kubectl apply -f waf-policy.yaml -n devopssong
배포가 완료된 후, Gateway가 정상적으로 NGINX One 콘솔로부터 정책과 로깅 설정을 가져와 적용하면 WAFPolicy 리소스의 status에서 다음과 같이 Status: true를 확인할 수 있습니다.
NGINX Gateway Fabric 2.6.7 릴리즈 기준으로, NGINX One 콘솔에서 Gateway의 정책 배포 상태를 조회하는 기능이 지원되지 않으며, kubectl describe wafpolicy 명령어를 통해서만 배포 상태를 조회할 수 있습니다.
$ kubectl get wafpolicies.gateway.nginx.org -n devopssongNAME AGEgateway-waf-protection 96s$ kubectl describe wafpolicies.gateway.nginx.org gateway-waf-protection -n devopssong...Status: Ancestors: Ancestor Ref: Group: gateway.networking.k8s.io Kind: Gateway Name: waf-gateway Namespace: devopssong Conditions: Last Transition Time: 2026-08-05T08:17:05Z Message: The Policy is accepted Observed Generation: 1 Reason: Accepted Status: True Type: Accepted Last Transition Time: 2026-08-05T08:17:05Z Message: All references are resolved Observed Generation: 1 Reason: ResolvedRefs Status: True Type: ResolvedRefs Last Transition Time: 2026-08-05T08:17:05Z Message: Policy is programmed in the data plane Observed Generation: 1 Reason: Programmed Status: True Type: Programmed Controller Name: gateway.nginx.org/nginx-gateway-controllerEvents: <none>
5. NGINX Gateway Fabric WAF 적용 확인 및 대시보드 모니터링
NGINX Gateway Fabric WAF 적용 확인을 위해 백엔드 애플리케이션 Pod를 NGINX로 배포했습니다.
$ kubectl get po,svc -l app=nginxNAME READY STATUS RESTARTS AGEpod/nginx-7c9f5c7649-ncgg6 1/1 Running 0 2d7hNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEservice/nginx ClusterIP 10.97.55.197 <none> 80/TCP 3h38m
배포한 Gateway를 통해 애플리케이션 Pod로 라우팅할 수 있도록 HTTPRoute 리소스를 배포합니다.
apiVersion: gateway.networking.k8s.io/v1kind: HTTPRoutemetadata: name: app-route namespace: devopssongspec: parentRefs: - name: waf-gateway # Gateway 이름 지정 kind: Gateway hostnames: - ngf-waf.devopssong.site rules: - matches: - path: type: PathPrefix value: / backendRefs: - name: nginx # 애플리케이션 service 이름 지정 port: 80
$ kubectl apply -f route.yaml -n devopssonghttproute.gateway.networking.k8s.io/app-route created$ kubectl get httproutes.gateway.networking.k8s.io -n devopssongNAME HOSTNAMES AGEapp-route ["ngf-waf.devopssong.site"] 19s
테스트 환경에서는 MetalLB를 통해 Gateway Service에 외부 IP가 할당되도록 구성습니다.
또한 HTTPRoute의 hostnames에 설정한 ngf-waf.devopssong.site가 해당 외부 IP로 해석되도록 테스트 클라이언트의 hosts 파일을 수정했습니다.
$ kubectl get svc -n devopssong NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEnginx ClusterIP 10.97.55.197 <none> 80/TCP 3h53mwaf-gateway-nginx LoadBalancer 10.98.242.136 172.16.61.79 80:31595/TCP 24h
curl 명령어로 정상 요청을 전송하여 정상 응답을 확인합니다.
$ curl 'http://ngf-waf.devopssong.site/'<!DOCTYPE html><html><head><title>Welcome to nginx!</title><style>...
curl 명령어로 공격 요청을 전송하여 차단을 확인합니다. 응답에 support ID가 나타납니다.
$ curl 'http://ngf-waf.devopssong.site/<script>'<html><head><title>Request Rejected</title></head><body>The requested URL was rejected. Please consult with your administrator.<br><br>Your support ID is: 8820645512258872797<br><br><a href='javascript:history.back();'>[Go Back]</a></body></html>
NGINX One Console 좌측의 Security Dashboard 메뉴를 통해 WAF 대시보드를 확인할 수 있습니다.

대시보드 메인 화면의 스크롤을 내려 하단에서 탐지/차단에 사용된 정책 및 공격자 IP 등 다양한 정보를 확인할 수 있습니다.

상단의 Event Logs 탭으로 이동하면 Alerted 처리되어 차단되지 않고 정상 응답한 요청과 차단된 요청을 확인할 수 있습니다.

좌측 메뉴의 Support ID Details 메뉴로 이동하여, 차단 응답의 Support ID를 통한 정보 확인도 가능합니다.


6. 결론
이번 구성에서는 NGINX Gateway Fabric을 NGINX One Console과 연동하고, Gateway 데이터 플레인에 F5 WAF for NGINX를 활성화했습니다. 또한 NGINX One Console에서 생성한 WAF 정책과 로그 프로파일을 WAFPolicy 리소스를 통해 Gateway에 적용했습니다.
NginxProxy 리소스를 적용하면 기존 NGINX Plus 컨테이너와 함께 WAF Enforcer 및 Config Manager 컨테이너가 배포되며, WAFPolicy는 NGINX One Console에 구성된 정책과 로깅 설정을 참조하여 Gateway 트래픽에 적용합니다. 정책 적용 상태는 WAFPolicy의 상태를 통해 확인할 수 있습니다.
테스트 결과 정상 요청은 백엔드 애플리케이션으로 전달되었으며, 공격 패턴이 포함된 요청은 WAF 정책에 의해 차단되고 응답에서 Support ID가 반환되는 것을 확인했습니다. 차단 이벤트는 NGINX One Console의 Security Dashboard와 Event Logs에서 조회할 수 있으며, Support ID Details 메뉴를 통해 해당 요청의 탐지 정보도 확인할 수 있습니다.
이를 통해 NGINX Gateway Fabric에 대한 WAF 정책 적용부터 공격 요청 차단, 보안 로그 수집 및 대시보드 모니터링까지 NGINX One Console을 중심으로 통합 관리할 수 있음을 확인했습니다.
NGINX Gateway Fabric을 통해 유입되는 애플리케이션 트래픽에 F5 WAF for NGINX의 보안 기능을 적용하고, NGINX One Console 기반의 정책 및 보안 로그 통합 관리 구성을 검토하고 계시다면 NGINX STORE를 통해 문의하세요.
댓글을 달려면 로그인해야 합니다.