diff options
author | Ermal <eri@pfsense.org> | 2014-04-29 08:50:38 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2014-04-29 08:50:38 +0000 |
commit | 1641fd6dd0133119529be2b1ac57fcc605a0a976 (patch) | |
tree | 84be8e92aca33e4d909384f2d04262379ba27fb8 /config/suricata/suricata_generate_yaml.php | |
parent | d298aee67a45d08a93831a2b6f272165ff2f89e6 (diff) | |
parent | 06cf384a6603bc771dd91773b0d1f4347b47904b (diff) | |
download | pfsense-packages-1641fd6dd0133119529be2b1ac57fcc605a0a976.tar.gz pfsense-packages-1641fd6dd0133119529be2b1ac57fcc605a0a976.tar.bz2 pfsense-packages-1641fd6dd0133119529be2b1ac57fcc605a0a976.zip |
Merge pull request #652 from bmeeks8/suricata-1.0
Diffstat (limited to 'config/suricata/suricata_generate_yaml.php')
-rw-r--r-- | config/suricata/suricata_generate_yaml.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/config/suricata/suricata_generate_yaml.php b/config/suricata/suricata_generate_yaml.php index 0e348631..e4d2c153 100644 --- a/config/suricata/suricata_generate_yaml.php +++ b/config/suricata/suricata_generate_yaml.php @@ -64,6 +64,11 @@ if (!empty($suricatacfg['externallistname']) && $suricatacfg['externallistname'] $external_net = trim($external_net); } +// Set the PASS LIST and write its contents to disk +$plist = suricata_build_list($suricatacfg, $suricatacfg['passlistname'], true); +@file_put_contents("{$suricatacfgdir}/passlist", implode("\n", $plist)); +$suri_passlist = "{$suricatacfgdir}/passlist"; + // Set default and user-defined variables for SERVER_VARS and PORT_VARS $suricata_servers = array ( "dns_servers" => "\$HOME_NET", "smtp_servers" => "\$HOME_NET", "http_servers" => "\$HOME_NET", @@ -137,6 +142,26 @@ if (!empty($suricatacfg['inspect_recursion_limit']) || $suricatacfg['inspect_rec else $inspection_recursion_limit = ""; +// Add interface-specific blocking settings +if ($suricatacfg['blockoffenders'] == 'on') + $suri_blockoffenders = "yes"; +else + $suri_blockoffenders = "no"; + +if ($suricatacfg['blockoffenderskill'] == 'on') + $suri_killstates = "yes"; +else + $suri_killstates = "no"; + +if ($suricatacfg['blockoffendersip'] == 'src') + $suri_blockip = 'SRC'; +elseif ($suricatacfg['blockoffendersip'] == 'dst') + $suri_blockip = 'DST'; +else + $suri_blockip = 'BOTH'; + +$suri_pf_table = SURICATA_PF_TABLE; + // Add interface-specific logging settings if ($suricatacfg['alertsystemlog'] == 'on') $alert_syslog = "yes"; |