Wie installiere ich mod_security auf Strato Power Server ?

nero

Registered User
Habe ein Strato Power Server mit Suse 9.3 wie installiere ich mod_security gibts da ein Tutorial ?
 

Hab's mal von da herkopiert.
1. ModSecurity 2.x arbeitet mit Apache 2.0.x oder besser.
2. mod_unique_id muss installiert sein. (Debian "a2enmod unique_id"; wenn nicht vorhanden mit apt-get nachinstallieren. Suse: yast)
3. (Optional) Installiere die neuste Version von libxml2, wenn diese noch nicht installiert ist. (Debian: "apt-get install libxml2", Suse: yast)
4. Entpacke das ModSecurity Archiv.
5. Editiere die Datei Makefile. Dort muss der Pfad zum Apchen angegeben werden. In dem angegebenen Verzeichnis muss ein Ordner "built" existieren in diesem Ordner wird (u.Anderem) nach der Datei special.mk gesucht (welche natuerlich auch vorhanden sein muss. (zum Beispiel: top_dir = /usr/local/apache2).
6. (Optional) Editiere Makefile to enable ModSecurity to use libxml2 (Unkommentiere die Zeile mit "DEFS = -DWITH_LIBXML2") und konfiguriere den include Pfad (zum Beispiel: INCLUDES=-I/usr/include/libxml2)
7. Ins Verzeichnis von ModSecurity wechseln (cd /PFAD/MODSECURITY )
8. Kompiliere mit make
9. Stoppe de Apache (z.B. "/usr/sbin/apache2ctl stop" oder "/etc/init.d/apache2 stop" )
10. Installiere mit make install
11. (Optional) Fuege eine Zeile zu deiner Konfiguration hinzu, um libxml2 zu laden: LoadFile /usr/lib/libxml2.so
12 .Fuege eine Zeile in deiner Konfiguration hinzu, um ModSecurity zu laden: LoadModule security2_module modules/mod_security2.so
13 .Konfiguriere ModSecurity
14 .Starte Apache
You now have ModSecurity 2.x up and running.

http://www.modsecurity.org/
Zudem sollte man noch die Regeln (modsecurity-core-rules_2.0-1.1.1.zip) runterladen und einbinden (da ist eine readme dabei).
Testen auf jeden Fall nicht vergessen. :)
 
Hi nero ich habe auch ein Powerserver ich will am Wochenende auch mal versuchen
ModSecurity zu installieren :D mir geht es momentan vor allem um Dos Attacken mal sehen ob ModSecurity das blocken kann wie bindet man dann eigentlich die Regeln
modsecurity-core-rules_2.0-1.1.1.zip ein ? und wo nimmt man dann die Einstellungen vor
in welches Verzeichniss entpacke ich modsecurity ?
wie teste ich ob das Teil dann auch richtig geht Fragen über Fragen :D

Das habe ich gefunden :
/usr/lib/libxml2

/usr/lib/apache2/mod_unique_id.so
/usr/lib/apache2-prefork/mod_unique_id.so


Ordner "built nicht in Apache

5. Editiere die Datei Makefile. Dort muss der Pfad zum Apchen angegeben werden.
Ist der Pfad zum Apache :/usr/lib/apache2 oder /usr/lib/apache2-prefork/ oder /etc/apache2 ?
 
Last edited by a moderator:
Hallo,

wenn es dir um DOS-Attacken geht, dann würde ich dir mod_Evasive empfehlen.
Das ist wesentlich schlanker und gerade für dein Vorhaben gedacht.
 
Von der Idee bin ich wieder weg das Teil läuft bei mir nicht :(

Für große Eingriffe habe ich leider nur am Wochenende Zeit mal sehen ob ich eins von beiden zu laufen bringe
 
5. Editiere die Datei Makefile. Dort muss der Pfad zum Apchen angegeben werden. In dem angegebenen Verzeichnis muss ein Ordner "built" existieren in

Welcher Pfad ist das :
/usr/lib/apache2
/usr/lib/apache2-prefork
/etc/apache2

(Optional) Editiere Makefile to enable ModSecurity to use libxml2 (Unkommentiere die Zeile mit "DEFS = -DWITH_LIBXML2") und konfiguriere den include Pfad (zum Beispiel: INCLUDES=-I/usr/include/libxml2)

habe in /usr/lib libxml2.so.2 ist das die richige

mod_unique_id ist in /usr/lib/apache2-prefork vorhanden
ein Ordner "built" und Datei special.mk find ich da nicht

muß ich das Verzeichniss modsecurity dann in den Apache ordner entpacken ?
 
Last edited by a moderator:
Ich habe jetzt modsecurity in usr/local/src/modsecurity/ entpackt dann makefile so angepasst

builddir = .

#top_dir = /usr/share/apache2
top_dir = /usr/share/apache2

dann make eingegeben danach kamen eine Menge Fehlermeldungen :confused:
 
Ohne die Fehlermeldungen zu kennen, wird es schwer werden, dir zu helfen...

Die Glaskugeln sind leider durch die Magnetfeldverschiebungen der Erde nicht mehr einsatzfähig.
 
Ist sehr lange alles ging nicht sin über 500 Zeichen

Code:
msc_multipart.h:25:24: apr_tables.h: No such file or directory
In file included from modsecurity.h:36,
                 from mod_security2.c:18:
msc_multipart.h:42: error: syntax error before "apr_array_header_t"
msc_multipart.h:42: warning: no semicolon at end of struct or union
msc_multipart.h:55: error: syntax error before '*' token
msc_multipart.h:55: warning: type defaults to `int' in declaration of `headers'
msc_multipart.h:55: warning: data definition has no type or storage class
msc_multipart.h:59: error: syntax error before '}' token
msc_multipart.h:63: error: syntax error before "apr_array_header_t"
msc_multipart.h:63: warning: no semicolon at end of struct or union
msc_multipart.h:102: error: syntax error before '}' token
msc_multipart.h:111: warning: declaration of `buf' shadows a global declaration
msc_multipart.h:73: warning: shadowed declaration is here
msc_multipart.h:114: warning: type defaults to `int' in declaration of `apr_status_t'
msc_multipart.h:114: error: syntax error before "multipart_cleanup"
msc_multipart.h:116: error: syntax error before "apr_table_t"
msc_multipart.h:116: warning: function declaration isn't a prototype
In file included from modsecurity.h:37,
                 from mod_security2.c:18:
msc_pcre.h:18:18: pcre.h: No such file or directory
msc_pcre.h:19:25: apr_general.h: No such file or directory
In file included from modsecurity.h:37,
                 from mod_security2.c:18:
msc_pcre.h:28: warning: type defaults to `int' in declaration of `apr_status_t'
msc_pcre.h:28: error: syntax error before "msc_pcre_cleanup"
msc_pcre.h:30: error: syntax error before '*' token
msc_pcre.h:31: warning: function declaration isn't a prototype
msc_pcre.h:33: error: syntax error before '*' token
msc_pcre.h:34: warning: function declaration isn't a prototype
msc_pcre.h:36: error: syntax error before '*' token
msc_pcre.h:37: warning: function declaration isn't a prototype
In file included from modsecurity.h:38,
                 from mod_security2.c:18:
msc_util.h:22: error: syntax error before '*' token
msc_util.h:22: warning: function declaration isn't a prototype
msc_util.h:24: error: syntax error before '*' token
msc_util.h:24: warning: function declaration isn't a prototype
msc_util.h:28: error: syntax error before '*' token
msc_util.h:28: warning: function declaration isn't a prototype
msc_util.h:30: error: syntax error before '*' token
msc_util.h:30: warning: function declaration isn't a prototype
msc_util.h:34: error: syntax error before '*' token
msc_util.h:34: warning: function declaration isn't a prototype
msc_util.h:42: error: syntax error before '*' token
msc_util.h:42: warning: function declaration isn't a prototype
msc_util.h:44: error: syntax error before '*' token
msc_util.h:44: warning: function declaration isn't a prototype
msc_util.h:46: error: syntax error before '*' token
msc_util.h:46: warning: function declaration isn't a prototype
msc_util.h:54: error: syntax error before '*' token
msc_util.h:54: warning: function declaration isn't a prototype
msc_util.h:56: error: syntax error before '*' token
msc_util.h:56: warning: function declaration isn't a prototype
msc_util.h:58: error: syntax error before '*' token
msc_util.h:58: warning: function declaration isn't a prototype
msc_util.h:60: error: syntax error before '*' token
msc_util.h:60: warning: function declaration isn't a prototype
msc_util.h:62: error: syntax error before '*' token
msc_util.h:62: warning: function declaration isn't a prototype
msc_util.h:64: error: syntax error before '*' token
msc_util.h:65: warning: function declaration isn't a prototype
msc_util.h:71: error: syntax error before '*' token
msc_util.h:71: warning: function declaration isn't a prototype
In file included from modsecurity.h:40,
                 from mod_security2.c:18:
msc_xml.h:19:31: libxml/xmlschemas.h: No such file or directory
msc_xml.h:20:26: libxml/xpath.h: No such file or directory
In file included from modsecurity.h:40,
                 from mod_security2.c:18:
msc_xml.h:25: error: syntax error before "xmlSAXHandler"
msc_xml.h:25: warning: no semicolon at end of struct or union
msc_xml.h:26: warning: type defaults to `int' in declaration of `parsing_ctx'
msc_xml.h:26: warning: data definition has no type or storage class
msc_xml.h:27: error: syntax error before "doc"
msc_xml.h:27: warning: type defaults to `int' in declaration of `doc'
msc_xml.h:27: warning: data definition has no type or storage class
msc_xml.h:30: error: syntax error before '}' token
msc_xml.h:36: warning: declaration of `buf' shadows a global declaration
msc_multipart.h:73: warning: shadowed declaration is here
msc_xml.h:41: warning: type defaults to `int' in declaration of `apr_status_t'
msc_xml.h:41: error: syntax error before "xml_cleanup"
In file included from modsecurity.h:42,
                 from mod_security2.c:18:
re.h:32:25: apr_general.h: No such file or directory
re.h:33:24: apr_tables.h: No such file or directory
In file included from re.h:36,
                 from modsecurity.h:42,
                 from mod_security2.c:18:
persist_dbm.h:16:25: apr_general.h: No such file or directory
In file included from re.h:36,
                 from modsecurity.h:42,
                 from mod_security2.c:18:
persist_dbm.h:19: warning: type defaults to `int' in declaration of `apr_table_t'
persist_dbm.h:19: error: syntax error before '*' token
persist_dbm.h:22: error: syntax error before "apr_table_t"
persist_dbm.h:22: warning: function declaration isn't a prototype
In file included from re.h:37,
                 from modsecurity.h:42,
                 from mod_security2.c:18:
apache2.h:16:23: http_core.h: No such file or directory
apache2.h:17:26: http_request.h: No such file or directory
apache2.h:19:25: apr_general.h: No such file or directory
apache2.h:20:26: apr_optional.h: No such file or directory
In file included from re.h:37,
                 from modsecurity.h:42,
                 from mod_security2.c:18:
apache2.h:25: error: syntax error before "modsec_register_tfn"
apache2.h:26: error: syntax error before "modsec_register_operator"
apache2.h:31: error: syntax error before '*' token
apache2.h:31: warning: function declaration isn't a prototype
apache2.h:33: error: syntax error before '*' token
apache2.h:33: warning: function declaration isn't a prototype
apache2.h:40: warning: type defaults to `int' in declaration of `apr_status_t'
apache2.h:40: error: syntax error before "input_filter"
apache2.h:43: warning: type defaults to `int' in declaration of `apr_status_t'
apache2.h:43: error: syntax error before "output_filter"
apache2.h:45: warning: type defaults to `int' in declaration of `apr_status_t'
apache2.h:45: error: syntax error before "read_request_body"
apache2.h:56: error: syntax error before '*' token
apache2.h:56: warning: function declaration isn't a prototype
apache2.h:58: error: syntax error before '*' token
apache2.h:58: warning: function declaration isn't a prototype
apache2.h:60: error: syntax error before '*' token
apache2.h:61: warning: function declaration isn't a prototype
apache2.h:65: error: syntax error before '*' token
apache2.h:65: warning: function declaration isn't a prototype
apache2.h:67: error: syntax error before '*' token
apache2.h:67: warning: function declaration isn't a prototype
In file included from modsecurity.h:42,
                 from mod_security2.c:18:
re.h:42: error: syntax error before "msre_parse_targets"
re.h:43: error: syntax error before "apr_array_header_t"
re.h:43: warning: type defaults to `int' in declaration of `msre_parse_targets'
re.h:43: warning: function declaration isn't a prototype
re.h:43: warning: data definition has no type or storage class
re.h:45: error: syntax error before "msre_parse_actions"
re.h:46: warning: type defaults to `int' in declaration of `msre_parse_actions'
re.h:46: warning: data definition has no type or storage class
re.h:61: error: syntax error before '*' token
re.h:62: warning: function declaration isn't a prototype
re.h:68: error: syntax error before "apr_pool_t"
re.h:68: warning: no semicolon at end of struct or union
re.h:69: warning: type defaults to `int' in declaration of `variables'
re.h:69: warning: data definition has no type or storage class
re.h:70: error: syntax error before '*' token
re.h:70: warning: type defaults to `int' in declaration of `operators'
re.h:70: warning: data definition has no type or storage class
re.h:71: error: syntax error before '*' token
re.h:71: warning: type defaults to `int' in declaration of `actions'
re.h:71: warning: data definition has no type or storage class
re.h:72: error: syntax error before '*' token
re.h:72: warning: type defaults to `int' in declaration of `tfns'
re.h:72: warning: data definition has no type or storage class
re.h:73: error: syntax error before '}' token
re.h:75: error: syntax error before '*' token
re.h:75: warning: function declaration isn't a prototype
re.h:82: error: syntax error before "apr_pool_t"
re.h:82: warning: no semicolon at end of struct or union
re.h:85: error: syntax error before '*' token
re.h:85: warning: type defaults to `int' in declaration of `phase_request_headers'
re.h:85: warning: data definition has no type or storage class
re.h:86: error: syntax error before '*' token
re.h:86: warning: type defaults to `int' in declaration of `phase_request_body'
re.h:86: warning: data definition has no type or storage class
re.h:87: error: syntax error before '*' token
re.h:87: warning: type defaults to `int' in declaration of `phase_response_headers'
re.h:87: warning: data definition has no type or storage class
re.h:88: error: syntax error before '*' token
re.h:88: warning: type defaults to `int' in declaration of `phase_response_body'
re.h:88: warning: data definition has no type or storage class
re.h:89: error: syntax error before '*' token
re.h:89: warning: type defaults to `int' in declaration of `phase_logging'
re.h:89: warning: data definition has no type or storage class
re.h:90: error: syntax error before '}' token
re.h:92: error: syntax error before "msre_ruleset_process_phase"
re.h:92: warning: type defaults to `int' in declaration of `msre_ruleset_process_phase'
re.h:92: warning: data definition has no type or storage class
re.h:94: error: syntax error before "msre_ruleset_process_phase_internal"
re.h:94: warning: type defaults to `int' in declaration of `msre_ruleset_process_phase_internal'
re.h:94: warning: data definition has no type or storage class
re.h:96: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:96: error: syntax error before "apr_pool_t"
re.h:96: warning: function declaration isn't a prototype
re.h:104: error: syntax error before "apr_array_header_t"
re.h:104: warning: no semicolon at end of struct or union
re.h:114: error: syntax error before '}' token
re.h:116: warning: declaration of `ruleset' shadows a global declaration
re.h:112: warning: shadowed declaration is here
re.h:117: warning: declaration of `actions' shadows a global declaration
re.h:71: warning: shadowed declaration is here
re.h:121: error: syntax error before "msre_rule_process"
re.h:121: warning: type defaults to `int' in declaration of `msre_rule_process'
re.h:121: warning: data definition has no type or storage class
re.h:158: error: syntax error before '*' token
re.h:158: warning: function declaration isn't a prototype
re.h:161: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:162: error: syntax error before '*' token
re.h:162: warning: function declaration isn't a prototype
re.h:164: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:167: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:169: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:171: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:173: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:175: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:188: warning: declaration of `ruleset' shadows a global declaration
re.h:112: warning: shadowed declaration is here
re.h:189: error: syntax error before "apr_table_t"
re.h:189: warning: function declaration isn't a prototype
re.h:208: error: syntax error before "apr_table_t"
re.h:208: warning: no semicolon at end of struct or union
re.h:228: warning: built-in function `log' declared as non-function
re.h:230: error: syntax error before '}' token
re.h:232: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:235: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:238: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:240: warning: declaration of `actionset' shadows a global declaration
re.h:110: warning: shadowed declaration is here
re.h:264: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:265: error: syntax error before "apr_status_t"
re.h:265: warning: no semicolon at end of struct or union
re.h:266: error: syntax error before '*' token
re.h:266: error: syntax error before "apr_pool_t"
re.h:266: warning: type defaults to `int' in declaration of `apr_status_t'
re.h:266: warning: function declaration isn't a prototype
re.h:266: error: `apr_status_t' declared as function returning a function
re.h:266: warning: function declaration isn't a prototype
re.h:266: error: `apr_status_t' redeclared as different kind of symbol
apache2.h:45: error: previous declaration of `apr_status_t'
re.h:266: warning: data definition has no type or storage class
re.h:278: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:280: error: syntax error before '*' token
re.h:281: warning: function declaration isn't a prototype
re.h:283: error: syntax error before "msre_parse_vars"
re.h:283: warning: declaration of `ruleset' shadows a global declaration
re.h:112: warning: shadowed declaration is here
re.h:284: error: syntax error before "apr_array_header_t"
re.h:284: warning: type defaults to `int' in declaration of `msre_parse_vars'
re.h:284: warning: function declaration isn't a prototype
re.h:284: warning: data definition has no type or storage class
re.h:286: warning: declaration of `actionset' shadows a global declaration
re.h:110: warning: shadowed declaration is here
In file included from mod_security2.c:18:
modsecurity.h:44:23: ap_config.h: No such file or directory
modsecurity.h:45:21: apr_md5.h: No such file or directory
modsecurity.h:46:25: apr_strings.h: No such file or directory
modsecurity.h:47:19: httpd.h: No such file or directory
modsecurity.h:48:25: http_config.h: No such file or directory
modsecurity.h:49:22: http_log.h: No such file or directory
modsecurity.h:50:27: http_protocol.h: No such file or directory
modsecurity.h:91:19: unixd.h: No such file or directory
In file included from mod_security2.c:18:
modsecurity.h:113: error: syntax error before "AP_MODULE_DECLARE_DATA"
modsecurity.h:113: warning: type defaults to `int' in declaration of `security2_module'
modsecurity.h:113: warning: data definition has no type or storage class
modsecurity.h:115: error: syntax error before "module_directives"
modsecurity.h:115: warning: type defaults to `int' in declaration of `module_directives'
modsecurity.h:115: warning: data definition has no type or storage class
modsecurity.h:169: error: syntax error before "apr_pool_t"
modsecurity.h:169: warning: no semicolon at end of struct or union
modsecurity.h:172: error: syntax error before '*' token
modsecurity.h:172: warning: type defaults to `int' in declaration of `r_early'
modsecurity.h:172: warning: data definition has no type or storage class
modsecurity.h:173: error: syntax error before '*' token
modsecurity.h:173: warning: type defaults to `int' in declaration of `r'
modsecurity.h:173: warning: data definition has no type or storage class
modsecurity.h:182: error: conflicting types for `phase'
re.h:215: error: previous declaration of `phase'
modsecurity.h:186: error: syntax error before '*' token
modsecurity.h:186: warning: type defaults to `int' in declaration of `if_brigade'
modsecurity.h:186: warning: data definition has no type or storage class
modsecurity.h:190: error: syntax error before "reqbody_length"
modsecurity.h:190: warning: type defaults to `int' in declaration of `reqbody_length'
modsecurity.h:190: warning: data definition has no type or storage class
modsecurity.h:193: error: syntax error before '*' token
modsecurity.h:193: warning: type defaults to `int' in declaration of `of_brigade'
modsecurity.h:193: warning: data definition has no type or storage class
modsecurity.h:199: error: syntax error before "resbody_length"
modsecurity.h:199: warning: type defaults to `int' in declaration of `resbody_length'
modsecurity.h:199: warning: data definition has no type or storage class
modsecurity.h:203: error: syntax error before '*' token
modsecurity.h:203: warning: type defaults to `int' in declaration of `error_messages'
modsecurity.h:203: warning: data definition has no type or storage class
modsecurity.h:204: error: syntax error before '*' token
modsecurity.h:204: warning: type defaults to `int' in declaration of `alerts'
modsecurity.h:204: warning: data definition has no type or storage class
modsecurity.h:231: error: syntax error before '*' token
modsecurity.h:231: warning: type defaults to `int' in declaration of `request_headers'
modsecurity.h:231: warning: data definition has no type or storage class
modsecurity.h:233: error: syntax error before "request_content_length"
modsecurity.h:233: warning: type defaults to `int' in declaration of `request_content_length'
modsecurity.h:233: warning: data definition has no type or storage class
modsecurity.h:236: error: syntax error before '*' token
modsecurity.h:236: warning: type defaults to `int' in declaration of `arguments'
modsecurity.h:236: warning: data definition has no type or storage class
modsecurity.h:237: error: syntax error before '*' token
modsecurity.h:237: warning: type defaults to `int' in declaration of `arguments_to_sanitise'
modsecurity.h:237: warning: data definition has no type or storage class
modsecurity.h:238: error: syntax error before '*' token
modsecurity.h:238: warning: type defaults to `int' in declaration of `request_headers_to_sanitise'
modsecurity.h:238: warning: data definition has no type or storage class
modsecurity.h:239: error: syntax error before '*' token
modsecurity.h:239: warning: type defaults to `int' in declaration of `response_headers_to_sanitise'
modsecurity.h:239: warning: data definition has no type or storage class
modsecurity.h:240: error: syntax error before '*' token
modsecurity.h:240: warning: type defaults to `int' in declaration of `request_cookies'
modsecurity.h:240: warning: data definition has no type or storage class
modsecurity.h:244: error: syntax error before '*' token
modsecurity.h:244: warning: type defaults to `int' in declaration of `tx_vars'
modsecurity.h:244: warning: data definition has no type or storage class
modsecurity.h:250: error: syntax error before '*' token
modsecurity.h:250: warning: type defaults to `int' in declaration of `response_headers'
modsecurity.h:250: warning: data definition has no type or storage class
modsecurity.h:252: error: syntax error before "bytes_sent"
modsecurity.h:252: warning: type defaults to `int' in declaration of `bytes_sent'
modsecurity.h:252: warning: data definition has no type or storage class
modsecurity.h:260: error: syntax error before '*' token
modsecurity.h:260: warning: type defaults to `int' in declaration of `msc_reqbody_mp'
modsecurity.h:260: warning: data definition has no type or storage class
modsecurity.h:261: error: syntax error before '*' token
modsecurity.h:261: warning: type defaults to `int' in declaration of `msc_reqbody_chunks'
modsecurity.h:261: warning: data definition has no type or storage class
modsecurity.h:285: error: syntax error before '*' token
modsecurity.h:285: warning: type defaults to `int' in declaration of `new_auditlog_fd'
modsecurity.h:285: warning: data definition has no type or storage class
modsecurity.h:287: error: syntax error before "new_auditlog_md5ctx"
modsecurity.h:287: warning: type defaults to `int' in declaration of `new_auditlog_md5ctx'
modsecurity.h:287: warning: data definition has no type or storage class
modsecurity.h:295: error: syntax error before "request_time"
modsecurity.h:295: warning: type defaults to `int' in declaration of `request_time'
modsecurity.h:295: warning: data definition has no type or storage class
modsecurity.h:296: error: syntax error before "time_checkpoint_1"
modsecurity.h:296: warning: type defaults to `int' in declaration of `time_checkpoint_1'
modsecurity.h:296: warning: data definition has no type or storage class
modsecurity.h:297: error: syntax error before "time_checkpoint_2"
modsecurity.h:297: warning: type defaults to `int' in declaration of `time_checkpoint_2'
modsecurity.h:297: warning: data definition has no type or storage class
modsecurity.h:298: error: syntax error before "time_checkpoint_3"
modsecurity.h:298: warning: type defaults to `int' in declaration of `time_checkpoint_3'
modsecurity.h:298: warning: data definition has no type or storage class
modsecurity.h:307: error: syntax error before '*' token
modsecurity.h:307: warning: type defaults to `int' in declaration of `collections'
modsecurity.h:307: warning: data definition has no type or storage class
modsecurity.h:308: error: syntax error before '*' token
modsecurity.h:308: warning: type defaults to `int' in declaration of `collections_dirty'
modsecurity.h:308: warning: data definition has no type or storage class
modsecurity.h:309: error: syntax error before '}' token
modsecurity.h:312: error: syntax error before "apr_pool_t"
modsecurity.h:312: warning: no semicolon at end of struct or union
modsecurity.h:323: error: syntax error before '*' token
modsecurity.h:323: warning: type defaults to `int' in declaration of `of_mime_types'
modsecurity.h:323: warning: data definition has no type or storage class
modsecurity.h:328: error: syntax error before '*' token
modsecurity.h:328: warning: type defaults to `int' in declaration of `debuglog_fd'
modsecurity.h:328: warning: data definition has no type or storage class
modsecurity.h:334: error: syntax error before '*' token
modsecurity.h:334: warning: type defaults to `int' in declaration of `rule_exceptions'
modsecurity.h:334: warning: data definition has no type or storage class
modsecurity.h:351: error: syntax error before '*' token
modsecurity.h:351: warning: type defaults to `int' in declaration of `auditlog_fd'
modsecurity.h:351: warning: data definition has no type or storage class
modsecurity.h:383: error: syntax error before '}' token
modsecurity.h:389: error: syntax error before "apr_status_t"
modsecurity.h:389: warning: no semicolon at end of struct or union
modsecurity.h:391: error: syntax error before '}' token
modsecurity.h:394: error: syntax error before "apr_pool_t"
modsecurity.h:394: warning: no semicolon at end of struct or union
modsecurity.h:395: warning: type defaults to `int' in declaration of `auditlog_lock'
modsecurity.h:395: warning: data definition has no type or storage class
modsecurity.h:398: error: syntax error before '}' token
modsecurity.h:402: error: syntax error before "apr_size_t"
modsecurity.h:402: warning: no semicolon at end of struct or union
modsecurity.h:404: error: syntax error before '}' token
modsecurity.h:428: error: syntax error before '*' token
modsecurity.h:428: warning: function declaration isn't a prototype
modsecurity.h:430: error: syntax error before "apr_pool_t"
modsecurity.h:430: warning: function declaration isn't a prototype
modsecurity.h:436: warning: type defaults to `int' in declaration of `apr_status_t'
modsecurity.h:436: error: `apr_status_t' redeclared as different kind of symbol
re.h:266: error: previous declaration of `apr_status_t'
modsecurity.h:436: error: syntax error before "modsecurity_tx_init"
modsecurity.h:438: warning: type defaults to `int' in declaration of `apr_status_t'
modsecurity.h:438: error: syntax error before "modsecurity_process_phase"
modsecurity.h:443: warning: type defaults to `int' in declaration of `apr_status_t'
modsecurity.h:443: error: syntax error before "modsecurity_request_body_start"
modsecurity.h:445: warning: type defaults to `int' in declaration of `apr_status_t'

make: *** [mod_security2.slo] Fehler 1
 
Last edited by a moderator:
Weiss jemand wie der richtige Pfad ist in Makefile ?
builddir ist im Unterverzeichniss von /usr/share/apache2

ist das richtig das ich Modsecurity in usr/local/src/modsecurity/ entpackt habe oder muß ich in Apache entpacken

Wenn ich das Makefile so mache bekomme ich eine Fehlermedung was mache ich da falsch ?

builddir = .

#top_dir = /usr/share/apache2
top_dir = /usr/share/apache2

top_srcdir = ${top_dir}
top_builddir = ${top_dir}

include ${top_builddir}/build/special.mk
 
Last edited by a moderator:
ist das richtig das ich Modsecurity in usr/local/src/modsecurity/ entpackt habe oder muß ich in Apache entpacken
Ist egal wohin.

Weiss jemand wie der richtige Pfad ist in Makefile ?
builddir ist im Unterverzeichniss von /usr/share/apache2
Hast du richtig gemacht.


Wenn ich das Makefile so mache bekomme ich eine Fehlermedung was mache ich da falsch ?
Bei soetwas nehmen wir uns zuerst den ersten Fehler vor. Der Rest kann aus Folgefehlern bestehen und es macht wenig Sinn, mit dem letzten Fehelr zu beginnen.

Das ist der erste Fehler:
Code:
msc_multipart.h:25:24: apr_tables.h: No such file or directory
In file included from modsecurity.h:36,
                 from mod_security2.c:18:
In der Datei msc_multipart.h, welche von den Dateien modsecurity.h und mod_security2.c includet wurde, wird in der Zeile 24 versucht, apr_tables.h zu includen, was aber fehltschlaegt.

Ich wuerde mal behaupten, dass das Paket libapr0 fehlt (oder libapr0-dev).
apr : apache portable runtime
 
ich habe hier das gleiche Problem auf einem Strato Rootie mit suse 9.3 und visas

ich hab modsecurity-apache_2.0.4 ins / verzeichnis entpackt, das makefile mit

top_dir =/usr/share/apache2 angegeben ,

die optionale Geschichte

INCLUDES = -I /usr/include/libxml2
#DEFS = -DWITH_LIBXML2

einkommentiert und ausgeschaltet

bin ins Verzeichnis cd /modsecurity-apache_2.0.4/apache2

gewechselt und hab #make ausgeführt

und dann kamen folgende Hyroglyphen :

Code:
> cd /modsecurity-apache_2.0.4/apache2
> make
/bin/sh /usr/share/apache2/build/libtool --silent --mode=compile gcc  -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -pthread  -O2 -g -Wuninitialized -Wall -Wmissing-prototypes -Wshadow -Wunused-variable -Wunused-value -Wchar-subscripts -Wsign-compare -DWITH_LIBXML2 -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DAP_DEBUG -DAP_HAVE_DESIGNATED_INITIALIZER -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DDYNAMIC_MODULE_LIMIT=80 -I /usr/include/libxml2 -I. -I/usr/share/apache2/os/unix -I/usr/share/apache2/server/mpm/prefork -I/usr/share/apache2/modules/http -I/usr/share/apache2/modules/filters -I/usr/share/apache2/modules/proxy -I/usr/share/apache2/include -I/usr/share/apache2/modules/generators -I/usr/share/apache2/server -I/usr/include/openssl -I/usr/share/apache2/modules/dav/main -prefer-pic -c mod_security2.c && touch mod_security2.slo
mod_security2.c:15:23: http_core.h: No such file or directory
mod_security2.c:16:26: http_request.h: No such file or directory
In file included from modsecurity.h:36,
                 from mod_security2.c:18:
msc_multipart.h:24:25: apr_general.h: No such file or directory
msc_multipart.h:25:24: apr_tables.h: No such file or directory
In file included from modsecurity.h:36,
                 from mod_security2.c:18:
msc_multipart.h:42: error: syntax error before "apr_array_header_t"
msc_multipart.h:42: warning: no semicolon at end of struct or union
msc_multipart.h:55: error: syntax error before '*' token
msc_multipart.h:55: warning: type defaults to `int' in declaration of `headers'
msc_multipart.h:55: warning: data definition has no type or storage class
msc_multipart.h:59: error: syntax error before '}' token
msc_multipart.h:63: error: syntax error before "apr_array_header_t"
msc_multipart.h:63: warning: no semicolon at end of struct or union
msc_multipart.h:102: error: syntax error before '}' token
msc_multipart.h:111: warning: declaration of `buf' shadows a global declaration
msc_multipart.h:73: warning: shadowed declaration is here
msc_multipart.h:114: warning: type defaults to `int' in declaration of `apr_status_t'
msc_multipart.h:114: error: syntax error before "multipart_cleanup"
msc_multipart.h:116: error: syntax error before "apr_table_t"
msc_multipart.h:116: warning: function declaration isn't a prototype
In file included from modsecurity.h:37,
                 from mod_security2.c:18:
msc_pcre.h:18:18: pcre.h: No such file or directory
msc_pcre.h:19:25: apr_general.h: No such file or directory
In file included from modsecurity.h:37,
                 from mod_security2.c:18:
msc_pcre.h:28: warning: type defaults to `int' in declaration of `apr_status_t'
msc_pcre.h:28: error: syntax error before "msc_pcre_cleanup"
msc_pcre.h:30: error: syntax error before '*' token
msc_pcre.h:31: warning: function declaration isn't a prototype
msc_pcre.h:33: error: syntax error before '*' token
msc_pcre.h:34: warning: function declaration isn't a prototype
msc_pcre.h:36: error: syntax error before '*' token
msc_pcre.h:37: warning: function declaration isn't a prototype
In file included from modsecurity.h:38,
                 from mod_security2.c:18:
msc_util.h:22: error: syntax error before '*' token
msc_util.h:22: warning: function declaration isn't a prototype
msc_util.h:24: error: syntax error before '*' token
msc_util.h:24: warning: function declaration isn't a prototype
msc_util.h:28: error: syntax error before '*' token
msc_util.h:28: warning: function declaration isn't a prototype
msc_util.h:30: error: syntax error before '*' token
msc_util.h:30: warning: function declaration isn't a prototype
msc_util.h:34: error: syntax error before '*' token
msc_util.h:34: warning: function declaration isn't a prototype
msc_util.h:42: error: syntax error before '*' token
msc_util.h:42: warning: function declaration isn't a prototype
msc_util.h:44: error: syntax error before '*' token
msc_util.h:44: warning: function declaration isn't a prototype
msc_util.h:46: error: syntax error before '*' token
msc_util.h:46: warning: function declaration isn't a prototype
msc_util.h:54: error: syntax error before '*' token
msc_util.h:54: warning: function declaration isn't a prototype
msc_util.h:56: error: syntax error before '*' token
msc_util.h:56: warning: function declaration isn't a prototype
msc_util.h:58: error: syntax error before '*' token
msc_util.h:58: warning: function declaration isn't a prototype
msc_util.h:60: error: syntax error before '*' token
msc_util.h:60: warning: function declaration isn't a prototype
msc_util.h:62: error: syntax error before '*' token
msc_util.h:62: warning: function declaration isn't a prototype
msc_util.h:64: error: syntax error before '*' token
msc_util.h:65: warning: function declaration isn't a prototype
msc_util.h:71: error: syntax error before '*' token
msc_util.h:71: warning: function declaration isn't a prototype
In file included from modsecurity.h:40,
                 from mod_security2.c:18:
msc_xml.h:19:31: libxml/xmlschemas.h: No such file or directory
msc_xml.h:20:26: libxml/xpath.h: No such file or directory
In file included from modsecurity.h:40,
                 from mod_security2.c:18:
msc_xml.h:25: error: syntax error before "xmlSAXHandler"
msc_xml.h:25: warning: no semicolon at end of struct or union
msc_xml.h:26: warning: type defaults to `int' in declaration of `parsing_ctx'
msc_xml.h:26: warning: data definition has no type or storage class
msc_xml.h:27: error: syntax error before "doc"
msc_xml.h:27: warning: type defaults to `int' in declaration of `doc'
msc_xml.h:27: warning: data definition has no type or storage class
msc_xml.h:30: error: syntax error before '}' token
msc_xml.h:36: warning: declaration of `buf' shadows a global declaration
msc_multipart.h:73: warning: shadowed declaration is here
msc_xml.h:41: warning: type defaults to `int' in declaration of `apr_status_t'
msc_xml.h:41: error: syntax error before "xml_cleanup"
In file included from modsecurity.h:42,
                 from mod_security2.c:18:
re.h:32:25: apr_general.h: No such file or directory
re.h:33:24: apr_tables.h: No such file or directory
In file included from re.h:36,
                 from modsecurity.h:42,
                 from mod_security2.c:18:
persist_dbm.h:16:25: apr_general.h: No such file or directory
In file included from re.h:36,
                 from modsecurity.h:42,
                 from mod_security2.c:18:
persist_dbm.h:19: warning: type defaults to `int' in declaration of `apr_table_t'
persist_dbm.h:19: error: syntax error before '*' token
persist_dbm.h:22: error: syntax error before "apr_table_t"
persist_dbm.h:22: warning: function declaration isn't a prototype
In file included from re.h:37,
                 from modsecurity.h:42,
                 from mod_security2.c:18:
apache2.h:16:23: http_core.h: No such file or directory
apache2.h:17:26: http_request.h: No such file or directory
apache2.h:19:25: apr_general.h: No such file or directory
apache2.h:20:26: apr_optional.h: No such file or directory
In file included from re.h:37,
                 from modsecurity.h:42,
                 from mod_security2.c:18:
apache2.h:25: error: syntax error before "modsec_register_tfn"
apache2.h:26: error: syntax error before "modsec_register_operator"
apache2.h:31: error: syntax error before '*' token
apache2.h:31: warning: function declaration isn't a prototype
apache2.h:33: error: syntax error before '*' token
apache2.h:33: warning: function declaration isn't a prototype
apache2.h:40: warning: type defaults to `int' in declaration of `apr_status_t'
apache2.h:40: error: syntax error before "input_filter"
apache2.h:43: warning: type defaults to `int' in declaration of `apr_status_t'
apache2.h:43: error: syntax error before "output_filter"
apache2.h:45: warning: type defaults to `int' in declaration of `apr_status_t'
apache2.h:45: error: syntax error before "read_request_body"
apache2.h:56: error: syntax error before '*' token
apache2.h:56: warning: function declaration isn't a prototype
apache2.h:58: error: syntax error before '*' token
apache2.h:58: warning: function declaration isn't a prototype
apache2.h:60: error: syntax error before '*' token
apache2.h:61: warning: function declaration isn't a prototype
apache2.h:65: error: syntax error before '*' token
apache2.h:65: warning: function declaration isn't a prototype
apache2.h:67: error: syntax error before '*' token
apache2.h:67: warning: function declaration isn't a prototype
In file included from modsecurity.h:42,
                 from mod_security2.c:18:
re.h:42: error: syntax error before "msre_parse_targets"
re.h:43: error: syntax error before "apr_array_header_t"
re.h:43: warning: type defaults to `int' in declaration of `msre_parse_targets'
re.h:43: warning: function declaration isn't a prototype
re.h:43: warning: data definition has no type or storage class
re.h:45: error: syntax error before "msre_parse_actions"
re.h:46: warning: type defaults to `int' in declaration of `msre_parse_actions'
re.h:46: warning: data definition has no type or storage class
re.h:61: error: syntax error before '*' token
re.h:62: warning: function declaration isn't a prototype
re.h:68: error: syntax error before "apr_pool_t"
re.h:68: warning: no semicolon at end of struct or union
re.h:69: warning: type defaults to `int' in declaration of `variables'
re.h:69: warning: data definition has no type or storage class
re.h:70: error: syntax error before '*' token
re.h:70: warning: type defaults to `int' in declaration of `operators'
re.h:70: warning: data definition has no type or storage class
re.h:71: error: syntax error before '*' token
re.h:71: warning: type defaults to `int' in declaration of `actions'
re.h:71: warning: data definition has no type or storage class
re.h:72: error: syntax error before '*' token
re.h:72: warning: type defaults to `int' in declaration of `tfns'
re.h:72: warning: data definition has no type or storage class
re.h:73: error: syntax error before '}' token
re.h:75: error: syntax error before '*' token
re.h:75: warning: function declaration isn't a prototype
re.h:82: error: syntax error before "apr_pool_t"
re.h:82: warning: no semicolon at end of struct or union
re.h:85: error: syntax error before '*' token
re.h:85: warning: type defaults to `int' in declaration of `phase_request_headers'
re.h:85: warning: data definition has no type or storage class
re.h:86: error: syntax error before '*' token
re.h:86: warning: type defaults to `int' in declaration of `phase_request_body'
re.h:86: warning: data definition has no type or storage class
re.h:87: error: syntax error before '*' token
re.h:87: warning: type defaults to `int' in declaration of `phase_response_headers'
re.h:87: warning: data definition has no type or storage class
re.h:88: error: syntax error before '*' token
re.h:88: warning: type defaults to `int' in declaration of `phase_response_body'
re.h:88: warning: data definition has no type or storage class
re.h:89: error: syntax error before '*' token
re.h:89: warning: type defaults to `int' in declaration of `phase_logging'
re.h:89: warning: data definition has no type or storage class
re.h:90: error: syntax error before '}' token
re.h:92: error: syntax error before "msre_ruleset_process_phase"
re.h:92: warning: type defaults to `int' in declaration of `msre_ruleset_process_phase'
re.h:92: warning: data definition has no type or storage class
re.h:94: error: syntax error before "msre_ruleset_process_phase_internal"
re.h:94: warning: type defaults to `int' in declaration of `msre_ruleset_process_phase_internal'
re.h:94: warning: data definition has no type or storage class
re.h:96: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:96: error: syntax error before "apr_pool_t"
re.h:96: warning: function declaration isn't a prototype
re.h:104: error: syntax error before "apr_array_header_t"
re.h:104: warning: no semicolon at end of struct or union
re.h:114: error: syntax error before '}' token
re.h:116: warning: declaration of `ruleset' shadows a global declaration
re.h:112: warning: shadowed declaration is here
re.h:117: warning: declaration of `actions' shadows a global declaration
re.h:71: warning: shadowed declaration is here
re.h:121: error: syntax error before "msre_rule_process"
re.h:121: warning: type defaults to `int' in declaration of `msre_rule_process'
re.h:121: warning: data definition has no type or storage class
re.h:158: error: syntax error before '*' token
re.h:158: warning: function declaration isn't a prototype
re.h:161: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:162: error: syntax error before '*' token
re.h:162: warning: function declaration isn't a prototype
re.h:164: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:167: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:169: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:171: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:173: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:175: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:188: warning: declaration of `ruleset' shadows a global declaration
re.h:112: warning: shadowed declaration is here
re.h:189: error: syntax error before "apr_table_t"
re.h:189: warning: function declaration isn't a prototype
re.h:208: error: syntax error before "apr_table_t"
re.h:208: warning: no semicolon at end of struct or union
re.h:228: warning: built-in function `log' declared as non-function
re.h:230: error: syntax error before '}' token
re.h:232: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:235: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:238: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:240: warning: declaration of `actionset' shadows a global declaration
re.h:110: warning: shadowed declaration is here
re.h:264: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:265: error: syntax error before "apr_status_t"
re.h:265: warning: no semicolon at end of struct or union
re.h:266: error: syntax error before '*' token
re.h:266: error: syntax error before "apr_pool_t"
re.h:266: warning: type defaults to `int' in declaration of `apr_status_t'
re.h:266: warning: function declaration isn't a prototype
re.h:266: error: `apr_status_t' declared as function returning a function
re.h:266: warning: function declaration isn't a prototype
re.h:266: error: `apr_status_t' redeclared as different kind of symbol
apache2.h:45: error: previous declaration of `apr_status_t'
re.h:266: warning: data definition has no type or storage class
re.h:278: warning: declaration of `engine' shadows a global declaration
re.h:83: warning: shadowed declaration is here
re.h:280: error: syntax error before '*' token
re.h:281: warning: function declaration isn't a prototype
re.h:283: error: syntax error before "msre_parse_vars"
re.h:283: warning: declaration of `ruleset' shadows a global declaration
re.h:112: warning: shadowed declaration is here
re.h:284: error: syntax error before "apr_array_header_t"
re.h:284: warning: type defaults to `int' in declaration of `msre_parse_vars'
re.h:284: warning: function declaration isn't a prototype
re.h:284: warning: data definition has no type or storage class
re.h:286: warning: declaration of `actionset' shadows a global declaration
re.h:110: warning: shadowed declaration is here
In file included from mod_security2.c:18:
modsecurity.h:44:23: ap_config.h: No such file or directory
modsecurity.h:45:21: apr_md5.h: No such file or directory
modsecurity.h:46:25: apr_strings.h: No such file or directory
modsecurity.h:47:19: httpd.h: No such file or directory
modsecurity.h:48:25: http_config.h: No such file or directory
modsecurity.h:49:22: http_log.h: No such file or directory
modsecurity.h:50:27: http_protocol.h: No such file or directory
modsecurity.h:91:19: unixd.h: No such file or directory
In file included from mod_security2.c:18:
modsecurity.h:113: error: syntax error before "AP_MODULE_DECLARE_DATA"
modsecurity.h:113: warning: type defaults to `int' in declaration of `security2_module'
modsecurity.h:113: warning: data definition has no type or storage class
modsecurity.h:115: error: syntax error before "module_directives"
modsecurity.h:115: warning: type defaults to `int' in declaration of `module_directives'
modsecurity.h:115: warning: data definition has no type or storage class
modsecurity.h:169: error: syntax error before "apr_pool_t"
modsecurity.h:169: warning: no semicolon at end of struct or union
modsecurity.h:172: error: syntax error before '*' token
modsecurity.h:172: warning: type defaults to `int' in declaration of `r_early'
modsecurity.h:172: warning: data definition has no type or storage class
modsecurity.h:173: error: syntax error before '*' token
modsecurity.h:173: warning: type defaults to `int' in declaration of `r'
modsecurity.h:173: warning: data definition has no type or storage class
modsecurity.h:182: error: conflicting types for `phase'
re.h:215: error: previous declaration of `phase'
modsecurity.h:186: error: syntax error before '*' token
modsecurity.h:186: warning: type defaults to `int' in declaration of `if_brigade'
modsecurity.h:186: warning: data definition has no type or storage class
modsecurity.h:190: error: syntax error before "reqbody_length"
modsecurity.h:190: warning: type defaults to `int' in declaration of `reqbody_length'
modsecurity.h:190: warning: data definition has no type or storage class
modsecurity.h:193: error: syntax error before '*' token
modsecurity.h:193: warning: type defaults to `int' in declaration of `of_brigade'
modsecurity.h:193: warning: data definition has no type or storage class
modsecurity.h:199: error: syntax error before "resbody_length"
modsecurity.h:199: warning: type defaults to `int' in declaration of `resbody_length'
modsecurity.h:199: warning: data definition has no type or storage class
modsecurity.h:203: error: syntax error before '*' token
modsecurity.h:203: warning: type defaults to `int' in declaration of `error_messages'
modsecurity.h:203: warning: data definition has no type or storage class
modsecurity.h:204: error: syntax error before '*' token
modsecurity.h:204: warning: type defaults to `int' in declaration of `alerts'
modsecurity.h:204: warning: data definition has no type or storage class
modsecurity.h:231: error: syntax error before '*' token
modsecurity.h:231: warning: type defaults to `int' in declaration of `request_headers'
modsecurity.h:231: warning: data definition has no type or storage class
modsecurity.h:233: error: syntax error before "request_content_length"
modsecurity.h:233: warning: type defaults to `int' in declaration of `request_content_length'
modsecurity.h:233: warning: data definition has no type or storage class
modsecurity.h:236: error: syntax error before '*' token
modsecurity.h:236: warning: type defaults to `int' in declaration of `arguments'
modsecurity.h:236: warning: data definition has no type or storage class
modsecurity.h:237: error: syntax error before '*' token
modsecurity.h:237: warning: type defaults to `int' in declaration of `arguments_to_sanitise'
modsecurity.h:237: warning: data definition has no type or storage class
modsecurity.h:238: error: syntax error before '*' token
modsecurity.h:238: warning: type defaults to `int' in declaration of `request_headers_to_sanitise'
modsecurity.h:238: warning: data definition has no type or storage class
modsecurity.h:239: error: syntax error before '*' token
modsecurity.h:239: warning: type defaults to `int' in declaration of `response_headers_to_sanitise'
modsecurity.h:239: warning: data definition has no type or storage class
modsecurity.h:240: error: syntax error before '*' token
modsecurity.h:240: warning: type defaults to `int' in declaration of `request_cookies'
modsecurity.h:240: warning: data definition has no type or storage class
modsecurity.h:244: error: syntax error before '*' token
modsecurity.h:244: warning: type defaults to `int' in declaration of `tx_vars'
modsecurity.h:244: warning: data definition has no type or storage class
modsecurity.h:250: error: syntax error before '*' token
modsecurity.h:250: warning: type defaults to `int' in declaration of `response_headers'
modsecurity.h:250: warning: data definition has no type or storage class
modsecurity.h:252: error: syntax error before "bytes_sent"
modsecurity.h:252: warning: type defaults to `int' in declaration of `bytes_sent'
modsecurity.h:252: warning: data definition has no type or storage class
modsecurity.h:260: error: syntax error before '*' token
modsecurity.h:260: warning: type defaults to `int' in declaration of `msc_reqbody_mp'
modsecurity.h:260: warning: data definition has no type or storage class
modsecurity.h:261: error: syntax error before '*' token
modsecurity.h:261: warning: type defaults to `int' in declaration of `msc_reqbody_chunks'
modsecurity.h:261: warning: data definition has no type or storage class
modsecurity.h:285: error: syntax error before '*' token
modsecurity.h:285: warning: type defaults to `int' in declaration of `new_auditlog_fd'
modsecurity.h:285: warning: data definition has no type or storage class
modsecurity.h:287: error: syntax error before "new_auditlog_md5ctx"
modsecurity.h:287: warning: type defaults to `int' in declaration of `new_auditlog_md5ctx'
modsecurity.h:287: warning: data definition has no type or storage class
modsecurity.h:295: error: syntax error before "request_time"
modsecurity.h:295: warning: type defaults to `int' in declaration of `request_time'
modsecurity.h:295: warning: data definition has no type or storage class
modsecurity.h:296: error: syntax error before "time_checkpoint_1"
modsecurity.h:296: warning: type defaults to `int' in declaration of `time_checkpoint_1'
modsecurity.h:296: warning: data definition has no type or storage class
modsecurity.h:297: error: syntax error before "time_checkpoint_2"
modsecurity.h:297: warning: type defaults to `int' in declaration of `time_checkpoint_2'
modsecurity.h:297: warning: data definition has no type or storage class
modsecurity.h:298: error: syntax error before "time_checkpoint_3"
modsecurity.h:298: warning: type defaults to `int' in declaration of `time_checkpoint_3'
modsecurity.h:298: warning: data definition has no type or storage class
modsecurity.h:307: error: syntax error before '*' token
modsecurity.h:307: warning: type defaults to `int' in declaration of `collections'
modsecurity.h:307: warning: data definition has no type or storage class
modsecurity.h:308: error: syntax error before '*' token
modsecurity.h:308: warning: type defaults to `int' in declaration of `collections_dirty'
modsecurity.h:308: warning: data definition has no type or storage class
modsecurity.h:309: error: syntax error before '}' token
modsecurity.h:312: error: syntax error before "apr_pool_t"
modsecurity.h:312: warning: no semicolon at end of struct or union
modsecurity.h:323: error: syntax error before '*' token
modsecurity.h:323: warning: type defaults to `int' in declaration of `of_mime_types'
modsecurity.h:323: warning: data definition has no type or storage class
modsecurity.h:328: error: syntax error before '*' token
modsecurity.h:328: warning: type defaults to `int' in declaration of `debuglog_fd'
modsecurity.h:328: warning: data definition has no type or storage class
modsecurity.h:334: error: syntax error before '*' token
modsecurity.h:334: warning: type defaults to `int' in declaration of `rule_exceptions'
modsecurity.h:334: warning: data definition has no type or storage class
modsecurity.h:351: error: syntax error before '*' token
modsecurity.h:351: warning: type defaults to `int' in declaration of `auditlog_fd'
modsecurity.h:351: warning: data definition has no type or storage class
modsecurity.h:383: error: syntax error before '}' token
modsecurity.h:389: error: syntax error before "apr_status_t"
modsecurity.h:389: warning: no semicolon at end of struct or union
modsecurity.h:391: error: syntax error before '}' token
modsecurity.h:394: error: syntax error before "apr_pool_t"
modsecurity.h:394: warning: no semicolon at end of struct or union
modsecurity.h:395: warning: type defaults to `int' in declaration of `auditlog_lock'
modsecurity.h:395: warning: data definition has no type or storage class
modsecurity.h:398: error: syntax error before '}' token
modsecurity.h:402: error: syntax error before "apr_size_t"
modsecurity.h:402: warning: no semicolon at end of struct or union
modsecurity.h:404: error: syntax error before '}' token
modsecurity.h:428: error: syntax error before '*' token
modsecurity.h:428: warning: function declaration isn't a prototype
modsecurity.h:430: error: syntax error before "apr_pool_t"
modsecurity.h:430: warning: function declaration isn't a prototype
modsecurity.h:436: warning: type defaults to `int' in declaration of `apr_status_t'
modsecurity.h:436: error: `apr_status_t' redeclared as different kind of symbol
re.h:266: error: previous declaration of `apr_status_t'
modsecurity.h:436: error: syntax error before "modsecurity_tx_init"
modsecurity.h:438: warning: type defaults to `int' in declaration of `apr_status_t'
modsecurity.h:438: error: syntax error before "modsecurity_process_phase"
modsecurity.h:443: warning: type defaults to `int' in declaration of `apr_status_t'
modsecurity.h:443: error: syntax error before "modsecurity_request_body_start"
modsecurity.h:445: warning: type defaults to `int' in declaration of `apr_status_t'
modsecurity.h:445: error: syntax error before "modsecurity_request_body_store"
modsecurity.h:448: warning: type defaults to `int' in declaration of `apr_status_t'
modsecurity.h:448: error: syntax error before "modsecurity_request_body_end"
modsecurity.h:450: warning: type defaults to `int' in declaration of `apr_status_t'
modsecurity.h:450: error: syntax error before "modsecurity_request_body_retrieve_start"
modsecurity.h:452: warning: type defaults to `int' in declaration of `apr_status_t'
modsecurity.h:452: error: syntax error before "modsecurity_request_body_retrieve_end"
modsecurity.h:458: warning: type defaults to `int' in declaration of `apr_status_t'
modsecurity.h:458: error: syntax error before "modsecurity_request_body_retrieve"
modsecurity.h:461: warning: declaration of `actionset' shadows a global declaration
re.h:110: warning: shadowed declaration is here
modsecurity.h:464: warning: declaration of `actionset' shadows a global declaration
re.h:110: warning: shadowed declaration is here
modsecurity.h:467: warning: type defaults to `int' in declaration of `apr_status_t'
modsecurity.h:467: error: syntax error before "modsecurity_request_body_clear"
mod_security2.c:41: warning: type defaults to `int' in declaration of `apr_file_t'
mod_security2.c:41: error: syntax error before '*' token
mod_security2.c: In function `perform_interception':
mod_security2.c:54: warning: declaration of `actionset' shadows a global declaration
re.h:110: warning: shadowed declaration is here
mod_security2.c:55: warning: declaration of `message' shadows a global declaration

mod_security2.c:953: warning: array `module_directives' assumed to have one element
make: *** [mod_security2.slo] Error 1

Daraufhin hab ich dann mal

DEFS = -DWITH_LIBXML2 einkommentiert und schwups wieder der gleiche Senf


Wäre nett wenn mir mal jemand unter die Arme greift. Habe schon alle Möglichkeiten probiert , auch das Paket libapr0 ist vorhanden und installiert
 
so hats geklappt ;

cd /modsecurity-apache_2.0.4/apache2

command####

apxs2 -cia mod_security2.c

command####
 
Einige Kleinigkeiten sind da aber unverständlich (liegt an der Doku im Ausgangsmateri

Folgende Punkte sind nicht hinreichend erklärt

5. Editiere die Datei Makefile. Dort muss der Pfad zum Apchen angegeben werden. In dem angegebenen Verzeichnis muss ein Ordner "built" existieren in diesem Ordner wird (u.Anderem) nach der Datei special.mk gesucht (welche natuerlich auch vorhanden sein muss. (zum Beispiel: top_dir = /usr/local/apache2).

Fehler: Es existiert weder eine special.mk noch ein Verz. build (auch nicht nach dem man es kompiliert hat) weiteres Problem: Die englische Doku ist fehlerbehaftet es gibt weder ein Paramter top_dir noch --install-path Option folglich ist Punkt 5 nicht nachvollziehbar bzw. falsch dokumentiert/unverständlich für die meisten.

Man müsste prinzipiell das Modul durch eine Zeile einfügen (nach dem man es erfolgreich kompiliert hat) und dann Apache restarten, wenn's ned geklappt hat (d.h. der HTTP-Server verweigert jede Seite) kann man das Modul einfach wieder rauswerfen. Ich beanstande hier nur den Punkt 5 Ursache ist aber der ursprüngliche Herausgeber d.h. dort in der englischen Doku ist es bereits vollkommen falsch und mega schlecht dokumentiert.

Gruss rufus2010
 
Hab's mal von da herkopiert.


http://www.modsecurity.org/
Zudem sollte man noch die Regeln (modsecurity-core-rules_2.0-1.1.1.zip) runterladen und einbinden (da ist eine readme dabei).
Testen auf jeden Fall nicht vergessen. :)

der fünfte punkt ist nicht korrekt doukumentiert, die englische beschreibung ist bereits falsch darin ist von serveroot die rede und hier ist die rede von einem ordner, in dem eben keine web-dokumente liegen. es muss also korrekterweise lauten top_dir=/usr/local/apache2 darin gibt's build und special.mk mehr darf in makefile nicht sein, sonst wird es nicht kompiliert. insgesamt ist die beschreibung sehr schwammig, da ettliche ausnahmen die auf jeden auftreten können in keinerweise berücksichtigt werden. gut dran ist der, der debian hat dort ist es ein kinderspiel. bei opensuse ist es ein problem, denn suse hält sich nicht immer an standards folglich gibt es dort kein mod_security und man muss selber basteln da dürfte wohl öfters der hase im pfeffer stecken ;-)
gruss rufus2010
 
Back
Top