kubectl create deployment dvwa --image vulnerables/web-dvwa -o yaml --dry-run
kubectl create service clusterip dvwa --tcp=80:80 -o yaml --dry-run
See here: https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-manifests/
kubectl create service nodeport nginx-ingress --tcp=80:80,443:443
kubectl apply -f 00syslog-setup.yaml
Change 04waf-policy.yaml to point to the clusterIP of the syslog service we created.
kubectl apply -f 01ap-logconf.yaml;
kubectl apply -f 02dvwa-appolicy.yaml;
kubectl apply -f 03app-user-sig.yaml;
kubectl apply -f 04waf-policy.yaml;
apiVersion: k8s.nginx.org/v1
kind: VirtualServer
metadata:
name: dvwa-vs
spec:
host: dvwa.example.com
policies:
- name: waf-policy
upstreams:
- name: dvwa
service: dvwa
port: 80
routes:
- path: /
action:
pass: dvwaThis consists of Elastic Search, Logstash and Kibana.
- Use the ELK yaml attached.
- Change the location of the volume so that it points to the 30-waf-logs-full-logstash.conf, which can be on your host. You can also use a configmap.
- Configure NGINX App Protect (04waf-policy.yaml) to log to the clusterIP of the logstash service.
- Access Kibana on NodePort.