From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4f9JNf6PlBz2xyW for ; Tue, 10 Feb 2026 10:54:42 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R12" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4f9JNf61Vxz2xMD for ; Tue, 10 Feb 2026 10:54:42 +0000 (UTC) Received: from people01.haj.ipfire.org (people01.haj.ipfire.org [172.28.1.161]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "people01.haj.ipfire.org", Issuer "E7" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4f9JNd4xhjz6p for ; Tue, 10 Feb 2026 10:54:41 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1770720881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=Y3mkkv/UVTte2bEywAYEjbzH06h7X4QSGStUfVWsvPA=; b=PXaPTVay8VmJCZWF/tLu5WJnxpILgi5vJTBkiSqYVMsQs1J0hXOlvoqG3Yit6xWs4fVCS1 xqYyY4UOb2U4w5Aw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1770720881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=Y3mkkv/UVTte2bEywAYEjbzH06h7X4QSGStUfVWsvPA=; b=KxHwKpTbSWYv+6vCqKlnNiTniNdFtKHIpQl4NpzZZodK9T5cJ1UO8iacyP/Rjm+ZP4wuve kIb81THWW3bM7Ed61lewMyHQtoD9FAcThEPjhK83Ge4qqQL0N/dlM5gqxcbL/IOxWc6Nhc 505bKtalwIXbVOSmvm7LEY7N8zC8LzG1Scl6XGZYgpujYhE60fHNexfMegc6+UxbkJ7Bie NowIREJEky2uCrZKATJitvbBqNwcynQH+2G3Z2MbPjNO+gXf/k+QmKo78w62EMF/OQ6K9q 7cD3wJ1ESgIAn02SCFQTd4s0EEYVlKrfwvHUkdd6nQcsurTI9Emf6WKZAGLdjQ== Received: by people01.haj.ipfire.org (Postfix, from userid 1000) id 4f9JNd1TR8z2xT0; Tue, 10 Feb 2026 10:54:41 +0000 (UTC) To: ipfire-scm@lists.ipfire.org Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. ab03ba10c42fb56d8cd15bda4ca16be887ade6c6 X-Git-Refname: refs/heads/next X-Git-Reftype: branch X-Git-Oldrev: b4d0ec551ecac33487f7ec34240e46520d2941a8 X-Git-Newrev: ab03ba10c42fb56d8cd15bda4ca16be887ade6c6 Message-Id: <4f9JNd1TR8z2xT0@people01.haj.ipfire.org> Date: Tue, 10 Feb 2026 10:54:41 +0000 (UTC) From: Michael Tremer Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree". The branch, next has been updated via ab03ba10c42fb56d8cd15bda4ca16be887ade6c6 (commit) via e433cd0e0c49fd92d588001cd586585bc2e895ea (commit) via 6a5c0ee759e4d07da18ce7ff8f9ac159e5a2dcbd (commit) via 8acd6d1af456cf77cb005bdc190bda41bb8e4576 (commit) via db0a24e123b07226febd0b9889607a7858ca0aa5 (commit) via 72d5a1c52ac770a85dfc10df78d855150c2fc869 (commit) via c92109cb790466f8368bc1b419b6671875897ca5 (commit) via 259ce21a1ade5866f680fe170c5bcb6080b64547 (commit) via 91bb5a9d0979e7c1befdb62ac0ade3699c2be01e (commit) via e79f1a2bf92fb18b041489e02f2c9770ce11af58 (commit) from b4d0ec551ecac33487f7ec34240e46520d2941a8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ab03ba10c42fb56d8cd15bda4ca16be887ade6c6 Author: Michael Tremer Date: Tue Feb 10 10:54:16 2026 +0000 squid: Use iptables --wait Signed-off-by: Michael Tremer commit e433cd0e0c49fd92d588001cd586585bc2e895ea Author: Michael Tremer Date: Tue Feb 10 10:51:00 2026 +0000 core201: Ship more IPS changes Signed-off-by: Michael Tremer commit 6a5c0ee759e4d07da18ce7ff8f9ac159e5a2dcbd Merge: 8acd6d1af 91bb5a9d0 Author: Michael Tremer Date: Tue Feb 10 10:50:24 2026 +0000 Merge remote-tracking branch 'ms/suricata-reports-alternative-addresses' into next commit 8acd6d1af456cf77cb005bdc190bda41bb8e4576 Author: Michael Tremer Date: Tue Feb 10 10:32:49 2026 +0000 core201: Ship IPS stuff Signed-off-by: Michael Tremer commit db0a24e123b07226febd0b9889607a7858ca0aa5 Author: Stefan Schantl Date: Mon Feb 9 15:23:22 2026 +0100 logs.cgi/ids.dat: Use new mechanic to obtain sid info url's Signed-off-by: Stefan Schantl Signed-off-by: Michael Tremer commit 72d5a1c52ac770a85dfc10df78d855150c2fc869 Author: Stefan Schantl Date: Mon Feb 9 15:23:21 2026 +0100 ids-functions.pl: Add function to get the info url for a given rule id Signed-off-by: Stefan Schantl Signed-off-by: Michael Tremer commit c92109cb790466f8368bc1b419b6671875897ca5 Author: Stefan Schantl Date: Mon Feb 9 15:23:20 2026 +0100 ids-functions.pl: Add function to get the provider by a given rule id Signed-off-by: Stefan Schantl Signed-off-by: Michael Tremer commit 259ce21a1ade5866f680fe170c5bcb6080b64547 Author: Stefan Schantl Date: Mon Feb 9 15:23:19 2026 +0100 ruleset-sources: Add details about rule sid and info URL Signed-off-by: Stefan Schantl Signed-off-by: Michael Tremer commit 91bb5a9d0979e7c1befdb62ac0ade3699c2be01e Author: Michael Tremer Date: Tue Feb 3 19:01:10 2026 +0000 suricata-report-cron: Send reports to custom recipients if configured Signed-off-by: Michael Tremer commit e79f1a2bf92fb18b041489e02f2c9770ce11af58 Author: Michael Tremer Date: Tue Feb 3 18:37:24 2026 +0000 ids.cgi: Allow to configure alternative recipients for reports Signed-off-by: Michael Tremer ----------------------------------------------------------------------- Summary of changes: config/cfgroot/ids-functions.pl | 105 +++++++++++++++++++++ config/rootfiles/core/201/filelists/files | 5 + .../131 => core/201}/filelists/ids-ruleset-sources | 0 config/suricata/ruleset-sources | 19 ++++ config/suricata/suricata-report-cron | 31 +++--- doc/language_issues.en | 6 +- doc/language_issues.es | 6 +- doc/language_issues.fr | 6 +- doc/language_issues.it | 6 +- doc/language_issues.nl | 6 +- doc/language_issues.pl | 6 +- doc/language_issues.ru | 6 +- doc/language_issues.tr | 6 +- doc/language_issues.tw | 6 +- doc/language_issues.zh | 6 +- html/cgi-bin/ids.cgi | 100 ++++++++++++++++++-- html/cgi-bin/logs.cgi/ids.dat | 26 +++-- langs/de/cgi-bin/de.pl | 6 +- langs/en/cgi-bin/en.pl | 6 +- src/initscripts/system/squid | 10 +- 20 files changed, 297 insertions(+), 71 deletions(-) copy config/rootfiles/{oldcore/131 => core/201}/filelists/ids-ruleset-sources (100%) Difference in files: diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl index bede5fca0..93d1acdee 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -1829,4 +1829,109 @@ sub generate_report_generator_config() { close(FILE); } +# +## Function to get the provider handle by a given rule sid. +# +sub get_provider_by_sid ($) { + my ($sid) = @_; + + # Get all known ruleset providers. + my @ruleset_providers = &get_ruleset_providers(); + + # Temporary hash to store found ranges. + my %tmphash = (); + my @tmparray; + + # Loop through the array of known providers. + foreach my $provider (@ruleset_providers) { + # Skip provider if no sid range is specified. + next unless ($IDS::Ruleset::Providers{$provider}{"sid_range"}); + + # Grab and the dereference the sid range. + my @sid_range = @{ $IDS::Ruleset::Providers{$provider}{"sid_range"} }; + + # Check if the given sid is in the range of the current processed provider. + next unless (&is_sid_in_range($sid, \@sid_range)); + + # Assign some nice human-readable values. + my $start = $sid_range[0]; + my $end = $sid_range[1]; + + # Calculate the sid range. + my $range = $end - $start; + + # Assign the found provider and it's range to the temporary hash. + $tmphash{$range} = $provider; + } + + # Sort the ranges of the found providers and store them in a temporary + # array - This is neccessary in case more than one range has been found. + @tmparray = sort (keys %tmphash); + + # Return if nothing has been found. + return unless(@tmparray); + + # The first element of the temporary array contains our smalles sid range + # which the given sid has to belong - grab the stored handle. + my $handle = $tmphash{$tmparray[0]}; + + # Return the obtained handle. + return $handle; +} + +# +## Function to check if a given single sid is in a given range. +# +sub is_sid_in_range($\@) { + my ($sid, $range_ref) = @_; + + # Deref the array ref and assig to array. + my @range = @{ $range_ref }; + + # Assign some nice human-readable values. + my $range_start = $range[0]; + my $range_stop = $range[1]; + + # Early exit in case the range has been passed the + # wrong way around. + return undef if ($range_start > $range_stop); + + # Return if the given sid is lower than the start one. + return if ($sid < $range_start); + + # Return if the given sid is higher than the max range. + return if ($sid > $range_stop); + + # Return True if the given sid is lower or equals the max range. + return 1 if ($sid <= $range_stop); + + # If we got here, something strange happend. + return undef; +} + +# +## Function to get the sid info url in case it is defined +# +sub get_sid_info_url($) { + my ($sid) = @_; + + # Call function to get the provider for this rule id. + my $provider = &get_provider_by_sid($sid); + + # Exit if no provder could be determined. + return unless($provider); + + # Exit if no info URL is known for the provider. + return unless($IDS::Ruleset::Providers{$provider}{"sid_info_url"}); + + # Grab the URL for the given provider. + my $info_url = $IDS::Ruleset::Providers{$provider}{"sid_info_url"}; + + # Replace the placeholder with the given sid. + $info_url =~ s/\/$sid/g; + + # Return the URL. + return $info_url; +} + 1; diff --git a/config/rootfiles/core/201/filelists/files b/config/rootfiles/core/201/filelists/files index f7a8b3297..87c0cc20e 100644 --- a/config/rootfiles/core/201/filelists/files +++ b/config/rootfiles/core/201/filelists/files @@ -1 +1,6 @@ +etc/rc.d/init.d/squid +srv/web/ipfire/cgi-bin/ids.cgi +srv/web/ipfire/cgi-bin/logs.cgi/ids.dat srv/web/ipfire/cgi-bin/ovpnmain.cgi +usr/bin/suricata-report-cron +var/ipfire/ids-functions.pl diff --git a/config/rootfiles/core/201/filelists/ids-ruleset-sources b/config/rootfiles/core/201/filelists/ids-ruleset-sources new file mode 120000 index 000000000..a226ada39 --- /dev/null +++ b/config/rootfiles/core/201/filelists/ids-ruleset-sources @@ -0,0 +1 @@ +../../../common/ids-ruleset-sources \ No newline at end of file diff --git a/config/suricata/ruleset-sources b/config/suricata/ruleset-sources index af65648af..5b9073d85 100644 --- a/config/suricata/ruleset-sources +++ b/config/suricata/ruleset-sources @@ -13,6 +13,8 @@ package IDS::Ruleset; # requires_subscription => "True/False" - If some kind of registration code is required in order to download the ruleset. # dl_url => The download URL to grab the ruleset. # dl_type => "archive/plain" - To specify, if the downloaded file is a packed archive or a plain text file. +# sid_range => The sid range which the provider uses for it's rules, specified as an array. "[start sid, stop sid]" +# sid_info_url => An URL which provides additional information about a rule based on it's sid. # }, # Hash which contains the supported ruleset providers. @@ -25,6 +27,8 @@ our %Providers = ( requires_subscription => "True", dl_url => "https://www.snort.org/rules/snortrules-snapshot-29200.tar.gz?oinkcode=", dl_type => "archive", + sid_range => ["1", "1000000"], + sid_info_url => "https://www.snort.org/rule_docs/1-", }, # Ruleset for registered sourcefire users with a valid subscription. @@ -35,6 +39,8 @@ our %Providers = ( requires_subscription => "True", dl_url => "https://www.snort.org/rules/snortrules-snapshot-29200.tar.gz?oinkcode=", dl_type => "archive", + sid_range => ["1", "1000000"], + sid_info_url => "https://www.snort.org/rule_docs/1-", }, # Community rules from sourcefire. @@ -45,6 +51,8 @@ our %Providers = ( requires_subscription => "False", dl_url => "https://www.snort.org/downloads/community/community-rules.tar.gz", dl_type => "archive", + sid_range => ["1", "1000000"], + sid_info_url => "https://www.snort.org/rule_docs/1-", }, # Emerging threats community rules. @@ -55,6 +63,8 @@ our %Providers = ( requires_subscription => "False", dl_url => "https://rules.emergingthreats.net/open/suricata-5.0/emerging.rules.tar.gz", dl_type => "archive", + sid_range => ["2000000", "2999999"], + sid_info_url => "https://threatintel.proofpoint.com/sid/", }, # Emerging threats Pro rules. @@ -65,6 +75,8 @@ our %Providers = ( requires_subscription => "True", dl_url => "https://rules.emergingthreatspro.com//suricata-5.0/etpro.rules.tar.gz", dl_type => "archive", + sid_range => ["2000000", "2999999"], + sid_info_url => "https://threatintel.proofpoint.com/sid/", }, # Abuse.ch SSLBL Blacklist rules. @@ -72,6 +84,7 @@ our %Providers = ( summary => "Abuse.ch SSLBL Blacklist Rules", website => "https://sslbl.abuse.ch/", tr_string => "sslbl blacklist rules", + sid_range => ["902200000", "902299999"], }, # Etnetera Aggressive Blacklist. @@ -82,6 +95,7 @@ our %Providers = ( requires_subscription => "False", dl_url => "https://security.etnetera.cz/feeds/etn_aggressive.rules", dl_type => "plain", + sid_range => ["500000", "599999"], }, # OISF Traffic ID rules. @@ -92,6 +106,7 @@ our %Providers = ( requires_subscription => "False", dl_url => "https://openinfosecfoundation.org/rules/trafficid/trafficid.rules", dl_type => "plain", + sid_range => ["300000000", "301000000"], }, # Positive Technologies Attack Detection Team rules. @@ -99,6 +114,7 @@ our %Providers = ( summary => "PT Attack Detection Team Rules", website => "https://github.com/ptresearch/AttackDetection", tr_string => "attack detection team rules", + sid_range => ["10000000", "11999999"], }, # Secureworks Security rules. @@ -130,6 +146,7 @@ our %Providers = ( requires_subscription => "False", dl_url => "https://threatfox.abuse.ch/downloads/threatfox_suricata.rules", dl_type => "plain", + sid_range => ["91000000", "91999999"], }, # Travis B. Green hunting rules. @@ -140,6 +157,7 @@ our %Providers = ( requires_subscription => "False", dl_url => "https://raw.githubusercontent.com/travisbgreen/hunting-rules/master/hunting.rules", dl_type => "plain", + sid_range => ["2610000", "2619999"], }, ipfire_dbl => { @@ -149,5 +167,6 @@ our %Providers = ( requires_subscription => "False", dl_url => "https://dbl.ipfire.org/lists/suricata.tar.gz", dl_type => "archive", + sid_range => ["406000000", "406999999"], }, ); diff --git a/config/suricata/suricata-report-cron b/config/suricata/suricata-report-cron index 3aa4cc8f8..eb802a8cb 100644 --- a/config/suricata/suricata-report-cron +++ b/config/suricata/suricata-report-cron @@ -27,7 +27,6 @@ readhash CONFIG "/var/ipfire/suricata/settings" send_report() { local args=( "$@" ) - local address # Add the email sender if [ -n "${CONFIG[EMAIL_SENDER]}" ]; then @@ -39,13 +38,6 @@ send_report() { return 2 fi - local IFS=',' - - # Append the email recipients - for address in ${CONFIG[EMAIL_RECIPIENTS]}; do - args+=( "--email-recipient=${address}" ) - done - # Generate the report if ! suricata-report-generator "${args[@]}"; then return 1 @@ -69,7 +61,7 @@ send_monthly_report() { local m="$(date --date="last month" +"%m")" # Send the report - send_report --year="${y}" --month="${m}" + send_report --year="${y}" --month="${m}" $(fetch_recipients monthly) } send_weekly_report() { @@ -87,7 +79,7 @@ send_weekly_report() { local w="$(date --date="last week" +"%V")" # Send the report - send_report --year="${y}" --week="${w}" + send_report --year="${y}" --week="${w}" $(fetch_recipients weekly) } # Sends a daily report for "yesterday" @@ -107,7 +99,24 @@ send_daily_report() { local d="$(date --date="yesterday" +"%d")" # Send the report - send_report --year="${y}" --month="${m}" --day="${d}" + send_report --year="${y}" --month="${m}" --day="${d}" $(fetch_recipients daily) +} + +fetch_recipients() { + local interval="${1}" + + local recipients="${CONFIG[EMAIL_RECIPIENTS_REPORT_${interval^^}]:-${CONFIG[EMAIL_RECIPIENTS]}}" + + # Parse this as an array + read -ra recipients <<< "${recipients//,/ }" + + # Return all recipients + local recipient + for recipient in ${recipients[@]}; do + echo "--email-recipient=${recipient}" + done + + return 0 } main() { diff --git a/doc/language_issues.en b/doc/language_issues.en index c53843b37..0a8931879 100644 --- a/doc/language_issues.en +++ b/doc/language_issues.en @@ -1071,9 +1071,9 @@ WARNING: untranslated string: ids provider = Provider WARNING: untranslated string: ids provider eol = (EOL) WARNING: untranslated string: ids provider settings = Provider settings WARNING: untranslated string: ids remove rule structures = Remove old rule structures... -WARNING: untranslated string: ids reports daily = Send a daily report -WARNING: untranslated string: ids reports monthly = Send a monthly report -WARNING: untranslated string: ids reports weekly = Send a weekly report +WARNING: untranslated string: ids reports daily = Daily Report +WARNING: untranslated string: ids reports monthly = Monthly Report +WARNING: untranslated string: ids reports weekly = Weekly Report WARNING: untranslated string: ids reset provider = Reset provider WARNING: untranslated string: ids ruleset autoupdate in progress = Ruleset update in progress. Please wait until all operations have completed successfully... WARNING: untranslated string: ids ruleset is up to date = No update required - The ruleset is up to date. diff --git a/doc/language_issues.es b/doc/language_issues.es index 980d27874..172f6056f 100644 --- a/doc/language_issues.es +++ b/doc/language_issues.es @@ -1069,9 +1069,9 @@ WARNING: untranslated string: ids invalid mail address = Is or contains an inval WARNING: untranslated string: ids no email recipients = No email recipients given WARNING: untranslated string: ids no email sender = No sender email address specified WARNING: untranslated string: ids provider eol = (EOL) -WARNING: untranslated string: ids reports daily = Send a daily report -WARNING: untranslated string: ids reports monthly = Send a monthly report -WARNING: untranslated string: ids reports weekly = Send a weekly report +WARNING: untranslated string: ids reports daily = Daily Report +WARNING: untranslated string: ids reports monthly = Monthly Report +WARNING: untranslated string: ids reports weekly = Weekly Report WARNING: untranslated string: ids send email on alert = Send email on alert WARNING: untranslated string: indirect target selection = Indirect target selection WARNING: untranslated string: info messages = unknown string diff --git a/doc/language_issues.fr b/doc/language_issues.fr index a7c31beaf..ab6596c76 100644 --- a/doc/language_issues.fr +++ b/doc/language_issues.fr @@ -1057,9 +1057,9 @@ WARNING: untranslated string: ids invalid mail address = Is or contains an inval WARNING: untranslated string: ids no email recipients = No email recipients given WARNING: untranslated string: ids no email sender = No sender email address specified WARNING: untranslated string: ids provider eol = (EOL) -WARNING: untranslated string: ids reports daily = Send a daily report -WARNING: untranslated string: ids reports monthly = Send a monthly report -WARNING: untranslated string: ids reports weekly = Send a weekly report +WARNING: untranslated string: ids reports daily = Daily Report +WARNING: untranslated string: ids reports monthly = Monthly Report +WARNING: untranslated string: ids reports weekly = Weekly Report WARNING: untranslated string: ids rulesets = Rulesets WARNING: untranslated string: ids send email on alert = Send email on alert WARNING: untranslated string: import connection = Import a Connection diff --git a/doc/language_issues.it b/doc/language_issues.it index 2e5110092..488cab63e 100644 --- a/doc/language_issues.it +++ b/doc/language_issues.it @@ -1193,9 +1193,9 @@ WARNING: untranslated string: ids provider = Provider WARNING: untranslated string: ids provider eol = (EOL) WARNING: untranslated string: ids provider settings = Provider settings WARNING: untranslated string: ids remove rule structures = Remove old rule structures... -WARNING: untranslated string: ids reports daily = Send a daily report -WARNING: untranslated string: ids reports monthly = Send a monthly report -WARNING: untranslated string: ids reports weekly = Send a weekly report +WARNING: untranslated string: ids reports daily = Daily Report +WARNING: untranslated string: ids reports monthly = Monthly Report +WARNING: untranslated string: ids reports weekly = Weekly Report WARNING: untranslated string: ids reset provider = Reset provider WARNING: untranslated string: ids ruleset autoupdate in progress = Ruleset update in progress. Please wait until all operations have completed successfully... WARNING: untranslated string: ids ruleset is up to date = No update required - The ruleset is up to date. diff --git a/doc/language_issues.nl b/doc/language_issues.nl index 68dfe7332..54fd4c439 100644 --- a/doc/language_issues.nl +++ b/doc/language_issues.nl @@ -1198,9 +1198,9 @@ WARNING: untranslated string: ids provider = Provider WARNING: untranslated string: ids provider eol = (EOL) WARNING: untranslated string: ids provider settings = Provider settings WARNING: untranslated string: ids remove rule structures = Remove old rule structures... -WARNING: untranslated string: ids reports daily = Send a daily report -WARNING: untranslated string: ids reports monthly = Send a monthly report -WARNING: untranslated string: ids reports weekly = Send a weekly report +WARNING: untranslated string: ids reports daily = Daily Report +WARNING: untranslated string: ids reports monthly = Monthly Report +WARNING: untranslated string: ids reports weekly = Weekly Report WARNING: untranslated string: ids reset provider = Reset provider WARNING: untranslated string: ids ruleset autoupdate in progress = Ruleset update in progress. Please wait until all operations have completed successfully... WARNING: untranslated string: ids ruleset is up to date = No update required - The ruleset is up to date. diff --git a/doc/language_issues.pl b/doc/language_issues.pl index c9816a3a4..03be7d822 100644 --- a/doc/language_issues.pl +++ b/doc/language_issues.pl @@ -1318,9 +1318,9 @@ WARNING: untranslated string: ids provider = Provider WARNING: untranslated string: ids provider eol = (EOL) WARNING: untranslated string: ids provider settings = Provider settings WARNING: untranslated string: ids remove rule structures = Remove old rule structures... -WARNING: untranslated string: ids reports daily = Send a daily report -WARNING: untranslated string: ids reports monthly = Send a monthly report -WARNING: untranslated string: ids reports weekly = Send a weekly report +WARNING: untranslated string: ids reports daily = Daily Report +WARNING: untranslated string: ids reports monthly = Monthly Report +WARNING: untranslated string: ids reports weekly = Weekly Report WARNING: untranslated string: ids reset provider = Reset provider WARNING: untranslated string: ids ruleset autoupdate in progress = Ruleset update in progress. Please wait until all operations have completed successfully... WARNING: untranslated string: ids ruleset is up to date = No update required - The ruleset is up to date. diff --git a/doc/language_issues.ru b/doc/language_issues.ru index 2c372b409..ae6ebe14b 100644 --- a/doc/language_issues.ru +++ b/doc/language_issues.ru @@ -1316,9 +1316,9 @@ WARNING: untranslated string: ids provider = Provider WARNING: untranslated string: ids provider eol = (EOL) WARNING: untranslated string: ids provider settings = Provider settings WARNING: untranslated string: ids remove rule structures = Remove old rule structures... -WARNING: untranslated string: ids reports daily = Send a daily report -WARNING: untranslated string: ids reports monthly = Send a monthly report -WARNING: untranslated string: ids reports weekly = Send a weekly report +WARNING: untranslated string: ids reports daily = Daily Report +WARNING: untranslated string: ids reports monthly = Monthly Report +WARNING: untranslated string: ids reports weekly = Weekly Report WARNING: untranslated string: ids reset provider = Reset provider WARNING: untranslated string: ids ruleset autoupdate in progress = Ruleset update in progress. Please wait until all operations have completed successfully... WARNING: untranslated string: ids ruleset is up to date = No update required - The ruleset is up to date. diff --git a/doc/language_issues.tr b/doc/language_issues.tr index 44ddc016d..cd996bd04 100644 --- a/doc/language_issues.tr +++ b/doc/language_issues.tr @@ -1136,9 +1136,9 @@ WARNING: untranslated string: ids provider = Provider WARNING: untranslated string: ids provider eol = (EOL) WARNING: untranslated string: ids provider settings = Provider settings WARNING: untranslated string: ids remove rule structures = Remove old rule structures... -WARNING: untranslated string: ids reports daily = Send a daily report -WARNING: untranslated string: ids reports monthly = Send a monthly report -WARNING: untranslated string: ids reports weekly = Send a weekly report +WARNING: untranslated string: ids reports daily = Daily Report +WARNING: untranslated string: ids reports monthly = Monthly Report +WARNING: untranslated string: ids reports weekly = Weekly Report WARNING: untranslated string: ids reset provider = Reset provider WARNING: untranslated string: ids ruleset autoupdate in progress = Ruleset update in progress. Please wait until all operations have completed successfully... WARNING: untranslated string: ids ruleset is up to date = No update required - The ruleset is up to date. diff --git a/doc/language_issues.tw b/doc/language_issues.tw index b8e378859..a26c0478f 100644 --- a/doc/language_issues.tw +++ b/doc/language_issues.tw @@ -1077,9 +1077,9 @@ WARNING: untranslated string: ids high, medium and low severity = High, Medium, WARNING: untranslated string: ids invalid mail address = Is or contains an invalid mail address. WARNING: untranslated string: ids no email recipients = No email recipients given WARNING: untranslated string: ids no email sender = No sender email address specified -WARNING: untranslated string: ids reports daily = Send a daily report -WARNING: untranslated string: ids reports monthly = Send a monthly report -WARNING: untranslated string: ids reports weekly = Send a weekly report +WARNING: untranslated string: ids reports daily = Daily Report +WARNING: untranslated string: ids reports monthly = Monthly Report +WARNING: untranslated string: ids reports weekly = Weekly Report WARNING: untranslated string: ids send email on alert = Send email on alert WARNING: untranslated string: indirect target selection = Indirect target selection WARNING: untranslated string: info messages = unknown string diff --git a/doc/language_issues.zh b/doc/language_issues.zh index b8e378859..a26c0478f 100644 --- a/doc/language_issues.zh +++ b/doc/language_issues.zh @@ -1077,9 +1077,9 @@ WARNING: untranslated string: ids high, medium and low severity = High, Medium, WARNING: untranslated string: ids invalid mail address = Is or contains an invalid mail address. WARNING: untranslated string: ids no email recipients = No email recipients given WARNING: untranslated string: ids no email sender = No sender email address specified -WARNING: untranslated string: ids reports daily = Send a daily report -WARNING: untranslated string: ids reports monthly = Send a monthly report -WARNING: untranslated string: ids reports weekly = Send a weekly report +WARNING: untranslated string: ids reports daily = Daily Report +WARNING: untranslated string: ids reports monthly = Monthly Report +WARNING: untranslated string: ids reports weekly = Weekly Report WARNING: untranslated string: ids send email on alert = Send email on alert WARNING: untranslated string: indirect target selection = Indirect target selection WARNING: untranslated string: info messages = unknown string diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index 9685b37d0..d615b8db2 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -596,6 +596,18 @@ if ($cgiparams{'RULESET'} eq $Lang::tr{'ids apply'}) { if (&_validate_mail_address($cgiparams{'EMAIL_RECIPIENTS'})) { $errormessage = "$cgiparams{'EMAIL_RECIPIENTS'} - $Lang::tr{'ids invalid mail address'}"; } + + if (&_validate_mail_address($cgiparams{'EMAIL_RECIPIENTS_REPORT_DAILY'})) { + $errormessage = "$Lang::tr{'ids invalid mail address'}: $cgiparams{'EMAIL_RECIPIENTS_REPORT_DAILY'}"; + } + + if (&_validate_mail_address($cgiparams{'EMAIL_RECIPIENTS_REPORT_WEEKLY'})) { + $errormessage = "$Lang::tr{'ids invalid mail address'}: $cgiparams{'EMAIL_RECIPIENTS_REPORT_WEEKLY'}"; + } + + if (&_validate_mail_address($cgiparams{'EMAIL_RECIPIENTS_REPORT_MONTHLY'})) { + $errormessage = "$Lang::tr{'ids invalid mail address'}: $cgiparams{'EMAIL_RECIPIENTS_REPORT_MONTHLY'}"; + } } # Go on if there are no error messages. @@ -1053,6 +1065,12 @@ sub show_mainpage() { my $email_sender = $idssettings{'EMAIL_SENDER'}; my $email_recipients = $idssettings{'EMAIL_RECIPIENTS'}; + my %email_recipients_reports = ( + "DAILY" => $idssettings{'EMAIL_RECIPIENTS_REPORT_DAILY'}, + "WEEKLY" => $idssettings{'EMAIL_RECIPIENTS_REPORT_WEEKLY'}, + "MONTHLY" => $idssettings{'EMAIL_RECIPIENTS_REPORT_MONTHLY'}, + ); + # Set form values to cgiparams state in error case. if ($errormessage) { $checked{'ENABLE_IDS'}{$cgiparams{'ENABLE_IDS'}} = "checked='checked'"; @@ -1063,6 +1081,12 @@ sub show_mainpage() { $email_sender = $cgiparams{'EMAIL_SENDER'}; $email_recipients = $cgiparams{'EMAIL_RECIPIENTS'}; + + %email_recipients_reports = ( + "DAILY" => $cgiparams{'EMAIL_RECIPIENTS_REPORT_DAILY'}, + "WEEKLY" => $cgiparams{'EMAIL_RECIPIENTS_REPORT_WEEKLY'}, + "MONTHLY" => $cgiparams{'EMAIL_RECIPIENTS_REPORT_MONTHLY'}, + ); } # Draw current state of the IDS @@ -1209,49 +1233,107 @@ print < + +
+ $Lang::tr{'ids reports daily'} +
+ + - + + + +
  + + + +
- - +
+ +
+ $Lang::tr{'ids reports weekly'} +
+ + + + + + +
- +
+ + + +
+ +
+ $Lang::tr{'ids reports monthly'} +
+ + + + + + + +
- +
+ + + +
+ + - diff --git a/html/cgi-bin/logs.cgi/ids.dat b/html/cgi-bin/logs.cgi/ids.dat index deebced21..ef224e3e6 100644 --- a/html/cgi-bin/logs.cgi/ids.dat +++ b/html/cgi-bin/logs.cgi/ids.dat @@ -22,6 +22,7 @@ use strict; my $report_generator_binary = "/usr/bin/suricata-report-generator"; require '/var/ipfire/general-functions.pl'; +require "${General::swroot}/ids-functions.pl"; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; @@ -389,21 +390,26 @@ print < END ; - if ($sid eq "n/a") { - print $sid; - } elsif ($sid < 1000000) { - # Link to sourcefire if the the rule sid is less than 1000000. - print "$sid\n"; - } elsif ($sid >= 2000000 and $sid < 3000000) { - # Link to emergingthreats if the rule sid is between 2000000 and 3000000. - print "$sid\n"; + + # Check if an valid sid has been found. + if ($sid ne "n/a") { + # Try to get the info url for the sid. + my $info_url = &IDS::get_sid_info_url($sid); + + # Check if an url has been obtained. + if ($info_url) { + print "$sid\n"; + } else { + # No external link available. + print $sid; + } } else { # No external link for user defined rules print $sid; } print <
+

diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index 7d74b0079..6ef4404a1 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -1421,9 +1421,9 @@ 'ids provider' => 'Regelset-Anbieter', 'ids provider settings' => 'Regelset-Anbieter-Einstellungen', 'ids remove rule structures' => 'Entferne alte Regelstrukturen...', -'ids reports daily' => 'Einen täglichen Bericht schicken', -'ids reports monthly' => 'Einen monatlichen Bericht schicken', -'ids reports weekly' => 'Einen wöchentlichen Bericht schicken', +'ids reports daily' => 'Täglicher Bericht', +'ids reports monthly' => 'Monatlicher Bericht', +'ids reports weekly' => 'Wöchentlicher Bericht', 'ids reset provider' => 'Providereinstellungen zurücksetzen', 'ids rules update' => 'Regelsatz', 'ids ruleset autoupdate in progress' => 'Der Regelsatz wird gerade aktualisiert. Bitte warten Sie, bis dieser Vorgang erfolgreich beendet wurde...', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index 890624796..010473af9 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -1482,9 +1482,9 @@ 'ids provider eol' => '(EOL)', 'ids provider settings' => 'Provider settings', 'ids remove rule structures' => 'Remove old rule structures...', -'ids reports daily' => 'Send a daily report', -'ids reports monthly' => 'Send a monthly report', -'ids reports weekly' => 'Send a weekly report', +'ids reports daily' => 'Daily Report', +'ids reports monthly' => 'Monthly Report', +'ids reports weekly' => 'Weekly Report', 'ids reset provider' => 'Reset provider', 'ids rules update' => 'Ruleset', 'ids ruleset autoupdate in progress' => 'Ruleset update in progress. Please wait until all operations have completed successfully...', diff --git a/src/initscripts/system/squid b/src/initscripts/system/squid index 075f160c4..fcc673295 100644 --- a/src/initscripts/system/squid +++ b/src/initscripts/system/squid @@ -52,16 +52,16 @@ transparent() { if [ "$CONN_TYPE" != "net" ]; then continue fi - iptables -t nat -A SQUID -i $1 -p tcp -d `echo "$LINE" | awk -F, '{ print $13 }'` --dport 80 -j RETURN + iptables --wait -t nat -A SQUID -i $1 -p tcp -d `echo "$LINE" | awk -F, '{ print $13 }'` --dport 80 -j RETURN done < $FILE if [ "$RED_TYPE" == "STATIC" ]; then - iptables -t nat -A SQUID -i $1 -p tcp -d $RED_NETADDRESS/$RED_NETMASK --dport 80 -j RETURN + iptables --wait -t nat -A SQUID -i $1 -p tcp -d $RED_NETADDRESS/$RED_NETMASK --dport 80 -j RETURN fi - iptables -t nat -A SQUID -i $1 -p tcp -d $LOCALIP --dport 80 -j RETURN + iptables --wait -t nat -A SQUID -i $1 -p tcp -d $LOCALIP --dport 80 -j RETURN - iptables -t nat -A SQUID -i $1 -p tcp --dport 80 -j REDIRECT --to-port "${TRANSPARENT_PORT}" + iptables --wait -t nat -A SQUID -i $1 -p tcp --dport 80 -j REDIRECT --to-port "${TRANSPARENT_PORT}" } case "$1" in @@ -111,7 +111,7 @@ case "$1" in ;; stop) - iptables -t nat -F SQUID + iptables --wait -t nat -F SQUID if [ -e /var/run/squid.pid ]; then boot_mesg -n "Stopping Squid Proxy Server (this may take up to a few minutes)..." hooks/post-receive -- IPFire 2.x development tree