This diff updates the nginx naxsi module to its latest version. The current version we have is from february 2017.
A small patch is required to compile, I'll upstream it. Following the official setup guide https://github.com/nbs-system/naxsi/wiki/naxsi-setup I've been able to triggers naxsi to output in the error log as expected from the how to. Index: Makefile =================================================================== RCS file: /home/reposync/ports/www/nginx/Makefile,v retrieving revision 1.150 diff -u -p -r1.150 Makefile --- Makefile 1 Jan 2021 12:46:51 -0000 1.150 +++ Makefile 22 Jan 2021 22:01:50 -0000 @@ -25,6 +25,7 @@ REVISION-main= 4 REVISION-xslt= 0 REVISION-passenger= 0 REVISION-stream= 0 +REVISION-naxsi= 0 VERSION-rtmp= 1.2.1 @@ -54,7 +55,7 @@ DISTFILES= ${DISTNAME}${EXTRACT_SUFX} _GH_MODS= \ openresty headers-more-nginx-module v0.33 \ openresty lua-nginx-module v0.10.11 \ - nbs-system naxsi 0.55.3 \ + nbs-system naxsi 1.3 \ kvspb nginx-auth-ldap 83c059b73566c2ee9cbda920d91b66657cf120b7 \ arut nginx-rtmp-module v${VERSION-rtmp} \ simpl ngx_devel_kit v0.3.0 \ Index: distinfo =================================================================== RCS file: /home/reposync/ports/www/nginx/distinfo,v retrieving revision 1.75 diff -u -p -r1.75 distinfo --- distinfo 27 Jul 2020 14:33:15 -0000 1.75 +++ distinfo 22 Jan 2021 18:04:12 -0000 @@ -1,6 +1,6 @@ SHA256 (headers-more-nginx-module-v0.33.tar.gz) = o9y6sRepwQO8HqUgD8AKe30q+X/3/VJfFvisJjLjD78= SHA256 (lua-nginx-module-v0.10.11.tar.gz) = wPuR/P0cbn3sNMpkgm74H/66/e9hdNJURnY284BWZiY= -SHA256 (naxsi-0.55.3.tar.gz) = CzyV0lB3Lcia2LSeR8HgJMWuLHbAz/pEXp/gXE3RNJU= +SHA256 (naxsi-1.3.tar.gz) = Q5yGdzctJZe0Ngu8wQvIZJDeH8dWlbGTrV3xVKIU1ig= SHA256 (nginx-1.16.1-chroot.patch) = ohNkspocgL7QnBX7q8Kgv2lgrN0ndgLKd0v5nSCLQRU= SHA256 (nginx-1.18.0.tar.gz) = TDc+erW/kdNKTxGgyUllYQYbpe7mAg2ycqF6cijTX5k= SHA256 (nginx-auth-ldap-83c059b73566c2ee9cbda920d91b66657cf120b7.tar.gz) = aQxOW9sq4ZsP7nXNNW0YATRo20cmFrYJeloLvjRshGQ= @@ -10,7 +10,7 @@ SHA256 (ngx_http_geoip2_module-3.3.tar.g SHA256 (ngx_http_hmac_secure_link_module-48c4625fbbf51ed5a95bfec23fa444f6c3702e50.tar.gz) = ZXpA2rODS1enIREzlD1OqWwpWcv3NOUXH4eUOgOAmqg= SIZE (headers-more-nginx-module-v0.33.tar.gz) = 28130 SIZE (lua-nginx-module-v0.10.11.tar.gz) = 616653 -SIZE (naxsi-0.55.3.tar.gz) = 187416 +SIZE (naxsi-1.3.tar.gz) = 235626 SIZE (nginx-1.16.1-chroot.patch) = 8220 SIZE (nginx-1.18.0.tar.gz) = 1039530 SIZE (nginx-auth-ldap-83c059b73566c2ee9cbda920d91b66657cf120b7.tar.gz) = 18542 Index: patches/patch-naxsi_naxsi_src_naxsi_net_h =================================================================== RCS file: patches/patch-naxsi_naxsi_src_naxsi_net_h diff -N patches/patch-naxsi_naxsi_src_naxsi_net_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-naxsi_naxsi_src_naxsi_net_h 22 Jan 2021 20:40:42 -0000 @@ -0,0 +1,14 @@ +$OpenBSD$ + +Index: naxsi/naxsi_src/naxsi_net.h +--- naxsi/naxsi_src/naxsi_net.h.orig ++++ naxsi/naxsi_src/naxsi_net.h +@@ -7,7 +7,7 @@ + #ifndef __NAXSI_NET_H__ + #define __NAXSI_NET_H__ + +-#if defined(__FreeBSD__) ++#if defined(__FreeBSD__) || defined(__OpenBSD__) + #include <netinet/in.h> + #include <sys/socket.h> + #include <sys/types.h>