From cc01730d26a970cbabf4087ac54fb5c7843a89ea Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 30 May 2022 18:14:24 +0200 Subject: [PATCH] EXAMPLES: remove completely outdated acl-content-sw.cfg This config probably last worked on 1.3, maybe 1.4, but it uses too many obsolete statements and it silently errors because of the "quiet" directive, which adds to the confusion. Let's remove it. --- examples/acl-content-sw.cfg | 130 ------------------------------------ 1 file changed, 130 deletions(-) delete mode 100644 examples/acl-content-sw.cfg diff --git a/examples/acl-content-sw.cfg b/examples/acl-content-sw.cfg deleted file mode 100644 index 1872789ac..000000000 --- a/examples/acl-content-sw.cfg +++ /dev/null @@ -1,130 +0,0 @@ -# This sample configuration makes extensive use of the ACLs. It requires -# HAProxy version 1.3.12 minimum. - -global - log loghost local0 - log localhost local0 err - maxconn 250 - uid 71 - gid 71 - chroot /var/empty - pidfile /var/run/haproxy.pid - daemon - quiet - -frontend http-in - bind :80 - mode http - log global - clitimeout 30000 - option httplog - option dontlognull - #option logasap - option httpclose - maxconn 100 - - capture request header Host len 20 - capture request header User-Agent len 16 - capture request header Content-Length len 10 - capture request header Referer len 20 - capture response header Content-Length len 10 - - # block any unwanted source IP addresses or networks - acl forbidden_src src 0.0.0.0/7 224.0.0.0/3 - acl forbidden_src src_port 0:1023 - block if forbidden_src - - # block requests beginning with http:// on wrong domains - acl dangerous_pfx url_beg -i http:// - acl valid_pfx url_reg -i ^http://[^/]*1wt\.eu/ - block if dangerous_pfx !valid_pfx - - # block apache chunk exploit, ... - acl forbidden_hdrs hdr_sub(transfer-encoding) -i chunked - acl forbidden_hdrs hdr_beg(host) -i apache- localhost - - # ... some HTTP content smugling and other various things - acl forbidden_hdrs hdr_cnt(host) gt 1 - acl forbidden_hdrs hdr_cnt(content-length) gt 1 - acl forbidden_hdrs hdr_val(content-length) lt 0 - acl forbidden_hdrs hdr_cnt(proxy-authorization) gt 0 - block if forbidden_hdrs - - # block annoying worms that fill the logs... - acl forbidden_uris url_reg -i .*(\.|%2e)(\.|%2e)(%2f|%5c|/|\\\\) - acl forbidden_uris url_sub -i %00