networkapp:waf:mod-security
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| networkapp:waf:mod-security [2018/11/01 18:05] – [MonitorModeWAF] seirios | networkapp:waf:mod-security [2018/11/14 17:00] (現在) – [MonitorModeWAF] seirios | ||
|---|---|---|---|
| 行 88: | 行 88: | ||
| ### ARP cache timeout | ### ARP cache timeout | ||
| net.link.ether.inet.max_age=97 | net.link.ether.inet.max_age=97 | ||
| + | </ | ||
| + | |||
| + | セマフォの拡張はboot時に行う必要があるので、/ | ||
| + | <code - / | ||
| + | ### for WAF | ||
| + | kern.ipc.semmsl=340 # | ||
| + | kern.ipc.semmns=128000 # | ||
| + | kern.ipc.semopm=100 # | ||
| + | kern.ipc.semmni=512 # | ||
| + | |||
| + | kern.ipc.semaem=16384 # | ||
| + | kern.ipc.semvmx=32767 # | ||
| + | kern.ipc.semusz=632 # | ||
| + | kern.ipc.semume=50 # | ||
| + | kern.ipc.semmnu=150 # | ||
| </ | </ | ||
| 行 98: | 行 113: | ||
| </ | </ | ||
| * '' | * '' | ||
| - | |||
| ==== WAFのInstall ==== | ==== WAFのInstall ==== | ||
| 行 609: | 行 623: | ||
| * <code diff MonitorModeBase.conf.diff> | * <code diff MonitorModeBase.conf.diff> | ||
| # diff -u ../ | # diff -u ../ | ||
| - | --- ../ | + | --- ../ |
| - | +++ MM-Base.conf | + | +++ MM-Base.conf |
| @@ -35,7 +35,8 @@ | @@ -35,7 +35,8 @@ | ||
| # to the size of data, with files excluded. You want to keep that value as | # to the size of data, with files excluded. You want to keep that value as | ||
| 行 677: | 行 691: | ||
| # | # | ||
| - | # ModSecurity configuration for DropMode. | + | # ModSecurity configuration for DetectMode. |
| Include / | Include / | ||
| - | # OWASP CRS configuration. | + | # Load signature |
| Include / | Include / | ||
| Include / | Include / | ||
| 行 687: | 行 701: | ||
| Include / | Include / | ||
| - | # Include OWASP CRS Configurations and Signature Rules. | + | # Load Signature Rules. |
| Include / | Include / | ||
| Include / | Include / | ||
| 行 694: | 行 708: | ||
| Include / | Include / | ||
| </ | </ | ||
| - | - 以下、MM-(pre|post)(CRS|Local).confを作成する | + | - 以下、MM-(pre|post)Load.confを作成する |
| - | - <code - MM-preCRS.conf> | + | - <code - MM-preLoad.conf> |
| # | # | ||
| # ModSecurity preload configuration. | # ModSecurity preload configuration. | ||
| # | # | ||
| + | # id: 1000 - 1999 : for OWASP CRS | ||
| + | # id: 2000 - 2999 : Reserve | ||
| + | # id: 3000 - 4999 : for local Sigs | ||
| #SecAction " | #SecAction " | ||
| </ | </ | ||
| - | - <code - MM-postCRS.conf> | + | - <code - MM-postLoad.conf> |
| # | # | ||
| # ModSecurity postload configuration. | # ModSecurity postload configuration. | ||
| # | # | ||
| + | # id: 5000 - 5999 : for OWASP CRS | ||
| + | # id: 6000 - 6999 : Reserve | ||
| + | # id: 7000 - 8999 : for local Sigs | ||
| - | #SecAction " | + | #SecRuleRemoveById |
| </ | </ | ||
| これで、MonitorMode WAFの設定ファイルが完成。 | これで、MonitorMode WAFの設定ファイルが完成。 | ||
| - | |||
| === DropModeWAF === | === DropModeWAF === | ||
| - 次にDropMode WAFを構築する。 | - 次にDropMode WAFを構築する。 | ||
| 行 736: | 行 755: | ||
| なお、実際には、MonitorModeは検出のみだから全Signatureを利用していても性能が劣化する程度で済むことが多いが、DropModeの場合は、preLoadやPostloadの設定で、不要なSignatureをOffにする、もしくは重みつけを0にする必要があることに注意。 | なお、実際には、MonitorModeは検出のみだから全Signatureを利用していても性能が劣化する程度で済むことが多いが、DropModeの場合は、preLoadやPostloadの設定で、不要なSignatureをOffにする、もしくは重みつけを0にする必要があることに注意。 | ||
| - | preCRSやPostCRSを作成してあるのはそのため。 | + | preLoadやPostLoadを作成してあるのはそのため。 |
| </ | </ | ||
networkapp/waf/mod-security.1541063122.txt.gz · 最終更新: by seirios
