From patchwork Tue Nov 5 09:32:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 2575 Return-Path: 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 (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 476kvw2V3Lz420M for ; Tue, 5 Nov 2019 09:32:12 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 476kvt64Krz6Cg; Tue, 5 Nov 2019 09:32:10 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 476kvt34lgz2yrM; Tue, 5 Nov 2019 09:32:10 +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 (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 476kvr611vz2yWt for ; Tue, 5 Nov 2019 09:32:08 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 476kvr3sHRz4V9; Tue, 5 Nov 2019 09:32:08 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1572946328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+TC2u13ry+C5oG8lg95EblCvvP/PB6BWjKQcas/9o18=; b=FFOajr+NWNFdd4sFwQpmwQFtve/TkR/PpCNpWGg1cI6z72EK3sMIt0hxiUw+SjtxxL9QLp OCehSe8rc/TGV1Bg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1572946328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+TC2u13ry+C5oG8lg95EblCvvP/PB6BWjKQcas/9o18=; b=ReudGTIk8foREFRpp6WFfDfJ8qLRrTAysMrhhlWc8liq2cY+2FtNCtm0t0detb4DWRJXqg mp7dlOVFUSarhA7NuTvXJR1zxCzu72TU46B6bUGI9Ent0LbjGHGVAKWraArHQ4iPgWzOpa x6kkFFJlmf3RB24DdCZqaEyjZ1nNhrFztzL1kuus7ivzQ4Ht+zByxgz6njjevujxq6XPrJ g5HF9r9eQWuiz42kfsrlTjFZR7CY3ifGvLDTc+2l6GD6DL7D9RmSLJc4h42mFwQBog3KHG U1RxbNDgMeGqxFZ4mfIc7VhjmsuMI4Uqg0og3UXR1CKbm9jZ42sRdYiRFGFdDQ== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 3/5] convert-snort: Generate DNS servers file. Date: Tue, 5 Nov 2019 10:32:00 +0100 Message-Id: <20191105093202.4488-3-stefan.schantl@ipfire.org> In-Reply-To: <20191105093202.4488-1-stefan.schantl@ipfire.org> References: <20191105093202.4488-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=stevee smtp.mailfrom=stefan.schantl@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Stefan Schantl --- config/suricata/convert-snort | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/config/suricata/convert-snort b/config/suricata/convert-snort index 5ed36954f..64b6e8b6a 100644 --- a/config/suricata/convert-snort +++ b/config/suricata/convert-snort @@ -253,7 +253,17 @@ if (-f $IDS::rulestarball) { &IDS::set_ownership("$IDS::homenet_file"); # -## Step 9: Setup automatic ruleset updates. +## Step 9: Generate file for the DNS servers. +# + +# Call subfunction to generate the file. +&IDS::generate_dns_servers_file(); + +# Set correct ownership for the dns_servers_file. +&IDS::set_ownership("$IDS::dns_servers_file"); + +# +## Step 10: Setup automatic ruleset updates. # # Check if a ruleset is configured. @@ -263,7 +273,7 @@ if($rulessettings{"RULES"}) { } # -## Step 10: Grab used ruleset files from snort config file and convert +## Step 11: Grab used ruleset files from snort config file and convert ## them into the new format. # @@ -309,7 +319,7 @@ close(SNORTCONF); &IDS::write_used_rulefiles_file(@enabled_rule_files); # -## Step 11: Start the IDS if enabled. +## Step 12: Start the IDS if enabled. # # Check if the IDS should be started.