From decf85f4c60b5c97ce86a19925654c779dd321c3 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 12 Nov 2022 19:14:45 +0700 Subject: [PATCH 1/5] nginquic : add ModSecurity --- build.sh | 14 +++++++++++++- configure.sh | 1 + modules.sh | 3 ++- packages.sh | 1 + 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 2bfcd47..15805ed 100644 --- a/build.sh +++ b/build.sh @@ -3,10 +3,22 @@ rm -rf nginquic curl -sSL https://raw.githubusercontent.com/minoplhy/nginquic/main/packages.sh | bash mkdir nginquic && cd nginquic hg clone -b quic https://hg.nginx.org/nginx-quic -git clone https://github.com/google/boringssl +git clone --depth=1 https://github.com/google/boringssl cd boringssl mkdir build && cd build && cmake .. && make cd .. && cd .. + +# ModSecurity Part +git clone --depth=1 https://github.com/SpiderLabs/ModSecurity +cd ModSecurity/ +git submodule init +git submodule update +./build.sh +./configure +make +sudo make install +cd .. + cd nginx-quic mkdir mosc && cd mosc && curl -sSL https://raw.githubusercontent.com/minoplhy/nginquic/main/modules.sh | bash && cd .. curl -sSL https://raw.githubusercontent.com/minoplhy/nginquic/main/configure.sh | bash && make diff --git a/configure.sh b/configure.sh index 1692587..0b769c0 100644 --- a/configure.sh +++ b/configure.sh @@ -47,6 +47,7 @@ --add-dynamic-module=mosc/ngx_cache_purge \ --add-dynamic-module=mosc/nginx-dav-ext-module \ --add-dynamic-module=mosc/echo-nginx-module \ +--add-dynamic-module=mosc/ModSecurity-nginx \ --with-http_v3_module \ --with-stream_quic_module \ --with-http_geoip_module \ diff --git a/modules.sh b/modules.sh index f43d586..0cb4436 100644 --- a/modules.sh +++ b/modules.sh @@ -2,4 +2,5 @@ git clone https://github.com/openresty/headers-more-nginx-module git clone https://github.com/sto/ngx_http_auth_pam_module git clone https://github.com/arut/nginx-dav-ext-module/ git clone https://github.com/openresty/echo-nginx-module -git clone https://github.com/nginx-modules/ngx_cache_purge \ No newline at end of file +git clone https://github.com/nginx-modules/ngx_cache_purge +git clone https://github.com/SpiderLabs/ModSecurity-nginx \ No newline at end of file diff --git a/packages.sh b/packages.sh index c7b389f..4978396 100644 --- a/packages.sh +++ b/packages.sh @@ -1 +1,2 @@ sudo apt-get install mercurial golang libunwind-dev libpcre3 libpcre3-dev zlib1g-dev cmake make libxslt1-dev libgd-dev libssl-dev libperl-dev libpam0g-dev libgeoip-dev git -y +sudo apt-get install g++ apt-utils autoconf automake build-essential libcurl4-openssl-dev liblmdb-dev libpcre++-dev libtool libxml2-dev libyajl-dev pkgconf wget From ed476b7812774def73e60ba7fc8745a2069d6968 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 12 Nov 2022 19:17:57 +0700 Subject: [PATCH 2/5] modules.conf : Import ModSecurity-nginx --- modules.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/modules.conf b/modules.conf index 267cfc5..4dfc872 100644 --- a/modules.conf +++ b/modules.conf @@ -3,3 +3,4 @@ load_module /lib/nginx/modules/ngx_http_cache_purge_module.so; load_module /lib/nginx/modules/ngx_http_dav_ext_module.so; load_module /lib/nginx/modules/ngx_http_echo_module.so; load_module /lib/nginx/modules/ngx_http_headers_more_filter_module.so; +load_module /lib/nginx/modules/ngx_http_modsecurity_module.so; \ No newline at end of file From 4ae4d063d0c8fad7e210648939728fbb6d0fcd8a Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 12 Nov 2022 19:19:44 +0700 Subject: [PATCH 3/5] README : match the branch --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1abab55..fefb24a 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This Script is using to build nginx with quic and some modules i'm currently usi OS : Debian ```shell -curl https://raw.githubusercontent.com/minoplhy/nginquic/main/build.sh | sudo bash +curl https://raw.githubusercontent.com/minoplhy/nginquic/ModSecurity_incl/build.sh | sudo bash ``` systemd Template: From d3affd7f4db51cbe1273c8b76b9615bbf7d23bdc Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 12 Nov 2022 19:36:42 +0700 Subject: [PATCH 4/5] nginquic : Link Correct Branch --- build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index 15805ed..2801d7d 100644 --- a/build.sh +++ b/build.sh @@ -1,6 +1,6 @@ cd ~/ rm -rf nginquic -curl -sSL https://raw.githubusercontent.com/minoplhy/nginquic/main/packages.sh | bash +curl -sSL https://raw.githubusercontent.com/minoplhy/nginquic/ModSecurity_incl/packages.sh | bash mkdir nginquic && cd nginquic hg clone -b quic https://hg.nginx.org/nginx-quic git clone --depth=1 https://github.com/google/boringssl @@ -20,11 +20,11 @@ sudo make install cd .. cd nginx-quic -mkdir mosc && cd mosc && curl -sSL https://raw.githubusercontent.com/minoplhy/nginquic/main/modules.sh | bash && cd .. -curl -sSL https://raw.githubusercontent.com/minoplhy/nginquic/main/configure.sh | bash && make +mkdir mosc && cd mosc && curl -sSL https://raw.githubusercontent.com/minoplhy/nginquic/ModSecurity_incl/modules.sh | bash && cd .. +curl -sSL https://raw.githubusercontent.com/minoplhy/nginquic/ModSecurity_incl/configure.sh | bash && make mkdir /lib/nginx/ && mkdir /lib/nginx/modules cd objs && cp *.so /lib/nginx/modules rm /usr/sbin/nginx cp nginx /usr/sbin/nginx -curl -sSL https://raw.githubusercontent.com/minoplhy/nginquic/main/modules.conf > modules.conf +curl -sSL https://raw.githubusercontent.com/minoplhy/nginquic/ModSecurity_incl/modules.conf > modules.conf cp modules.conf /etc/nginx/modules-enabled \ No newline at end of file From 74f5de07fecee4279342bc8d90f17c82add4028c Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 13 Nov 2022 12:58:57 +0700 Subject: [PATCH 5/5] Status : Passing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fefb24a..53d8217 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## Status : Succeeded `(As of `[9ffd06ec85033ac24187d9e7eb28426a36c9df6c](https://github.com/minoplhy/nginquic/commit/9ffd06ec85033ac24187d9e7eb28426a36c9df6c)` at Sept 20 2022)` +## Status : Succeeded `(As of `[d3affd7f4db51cbe1273c8b76b9615bbf7d23bdc](https://github.com/minoplhy/nginquic/commit/d3affd7f4db51cbe1273c8b76b9615bbf7d23bdc)` at Nov 13 2022)` # Note to Self : This Script is using to build nginx with quic and some modules i'm currently using .