Hallo oli,
qiller wrote: ↑November 12th, 2017, 12:01 pm
ist 32bit.
OK, dauert aber noch einwenig bis er durchgebaut hat. Hab auch mal die ersten Tests gemacht allerdings hatte ich da Core 113 laufen und eine ältere Version von APR weswegen es eine Fehlermeldung auf der produktiven Core 116er Maschine gab
Code: Select all
-> service nginx restart
Stopping nginx Server... [ OK ]
Starting nginx Server...
nginx: [warn] ModSecurity: Loaded APR do not match with compiled! [ OK ]
hab mal alle Änderungen gepullt und bau gerade neu. Ein aktuelles Core würdest du dann brauchen...
Mal schnell zur Vorgehensweise:
- Habe das derzeit aktuelle nginx-1.13.6 und ModSecurity-2.9.2 genommen.
- libyajl ist eine Abhängigkeit und kann mit einem
nachinstalliert werden.
- modsecurity.conf und unicode.mapping sind unter
/etc/nginx zu finden.
- Ein nginx unter logrotate.d wird mitinstalliert, ist ein wenig anders als deine, wenn nicht gewünscht dann bitte vorher sichern und wieder nachinstallieren.
- Kurzer Test mit einer Änderung (Aktivierung von ModSec) in der nginx.conf
Code: Select all
--- /etc/nginx/conf.bck/nginx.conf 2017-11-12 13:40:44.004686371 +0100
+++ /etc/nginx/nginx.conf 2017-11-12 13:41:55.924686693 +0100
@@ -41,6 +41,8 @@
#access_log logs/host.access.log main;
location / {
+ ModSecurityEnabled on;
+ ModSecurityConfig modsecurity.conf;
root html;
index index.html index.htm;
}
sieht erstmal ganz gut aus:
Code: Select all
-> nginx -V
nginx version: nginx/1.13.6
built with OpenSSL 1.0.2l 25 May 2017 (running with OpenSSL 1.0.2m 2 Nov 2017)
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/sbin/nginx --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-client-body-temp-path=/var/spool/nginx/client_body_temp --http-proxy-temp-path=/var/spool/nginx/proxy_temp --http-fastcgi-temp-path=/var/spool/nginx/fastcgi_temp --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --user=nobody --group=nobody --with-imap --with-imap_ssl_module --with-http_ssl_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --with-http_dav_module --with-http_sub_module --with-pcre --add-module=../ModSecurity-2.9.2/nginx/modsecurity
bzw.
Code: Select all
-> nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
bzw.
Code: Select all
-> cat /var/log/nginx/error.log
2017/11/12 13:37:31 [notice] 6459#0: ModSecurity for nginx (STABLE)/2.9.2 (http://www.modsecurity.org/) configured.
2017/11/12 13:37:31 [notice] 6459#0: ModSecurity: APR compiled version="1.6.2"; loaded version="1.6.2"
2017/11/12 13:37:31 [notice] 6459#0: ModSecurity: PCRE compiled version="8.41 "; loaded version="8.41 2017-07-05"
2017/11/12 13:37:31 [notice] 6459#0: ModSecurity: LUA compiled version="Lua 5.3"
2017/11/12 13:37:31 [notice] 6459#0: ModSecurity: YAJL compiled version="2.1.0"
2017/11/12 13:37:31 [notice] 6459#0: ModSecurity: LIBXML compiled version="2.9.4"
2017/11/12 13:37:31 [notice] 6459#0: ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.
2017/11/12 13:42:11 [notice] 6665#0: ModSecurity for nginx (STABLE)/2.9.2 (http://www.modsecurity.org/) configured.
2017/11/12 13:42:11 [notice] 6665#0: ModSecurity: APR compiled version="1.6.2"; loaded version="1.6.2"
2017/11/12 13:42:11 [notice] 6665#0: ModSecurity: PCRE compiled version="8.41 "; loaded version="8.41 2017-07-05"
2017/11/12 13:42:11 [notice] 6665#0: ModSecurity: LUA compiled version="Lua 5.3"
2017/11/12 13:42:11 [notice] 6665#0: ModSecurity: YAJL compiled version="2.1.0"
2017/11/12 13:42:11 [notice] 6665#0: ModSecurity: LIBXML compiled version="2.9.4"
2017/11/12 13:42:11 [notice] 6665#0: ModSecurity: StatusEngine call: "2.9.2,nginx,1.6.2/1.6.2,8.41/8.41 2017-07-05,Lua 5.3,2.9.4,c0"
2017/11/12 13:42:11 [notice] 6665#0: ModSecurity: StatusEngine call successfully sent. For more information visit: http://status.modsecurity.org/
- Die OWASP Core Rule Sets sind nun nicht dabei und müssten von dir integriert werden, geht ja hier -->
https://github.com/SpiderLabs/owasp-modsecurity-crs zur Aktualisierung z.b. mit einem cronjob...
- Habe die un- install.sh vom Package auch angepasst da sie nicht über Pakfire integriert wird (deinstallieren geht dann z.b. trotzdem).
Wenn du die buildfiles haben möchtest, sag bescheid.
qiller wrote: ↑November 12th, 2017, 12:01 pm
Gleich noch ne Frage hinterher: Ihr bietet ja jetzt standardmäßig die 64bit-Version zum Download an (was ich gut finde). Sind die ganzen Addons denn auch für 64bit lauffähig? Ich denke da so an wio, htop, apcupsd, guardian, tor aber auch der nginx natürlich. Habe in der Übersicht keine Information dazu gefunden.
Ja klar, alle offiziell angebotenen Addons sind auf 32 Bit, 64 Bit und auch auf ARM lauffähig -->
https://mirror.lightningwirelabs.com/pu ... /pakfire2/ . Hab hier aber nur eine 32 und 64 Bit Maschine zum bauen, ARM kann ich leider nicht anbieten.
Ich sag dir hier bescheid wenn fertig und hochgeladen.
Grüsse,
UE