net/snort3: Include default configs and snort2lua
authorMichal Hrusecky <michal.hrusecky@turris.com>
Thu, 22 Jul 2021 11:44:07 +0000 (13:44 +0200)
committerMichal Hrusecky <michal.hrusecky@turris.com>
Thu, 22 Jul 2021 11:55:38 +0000 (13:55 +0200)
Include default configuration files to have something to start from.
Also include snort2lua to help convert snort2 rules to snort3 to also
help with bootstrapping the configuration.

Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
net/snort3/Makefile
net/snort3/files/snort.config

index 8c4025f87564378ecfbd19c57d78e0299a24e5f9..2c675bc2f16026e0726b608a93f5c74d40a1cd3b 100644 (file)
@@ -59,6 +59,7 @@ TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/daq3 -ltirpc
 
 define Package/snort3/conffiles
 /etc/config/snort
+/etc/snort/
 endef
 
 define Package/snort3/install
@@ -67,6 +68,10 @@ define Package/snort3/install
                $(PKG_INSTALL_DIR)/usr/bin/snort  \
                $(1)/usr/bin/
 
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/bin/snort2lua  \
+               $(1)/usr/bin/
+
        $(INSTALL_BIN) \
                $(PKG_INSTALL_DIR)/usr/bin/u2{boat,spewfoo} \
                $(1)/usr/bin/
@@ -86,6 +91,9 @@ define Package/snort3/install
                $(1)/usr/share/lua/
 
        $(INSTALL_DIR) $(1)/etc/snort
+       $(INSTALL_CONF) \
+               $(PKG_INSTALL_DIR)/usr/etc/snort/*.lua \
+               $(1)/etc/snort
 
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) \
index c402ec5a3357c36941bbf34d31af12a1c2bb692c..92e42959d2b803e5b15fb5bef888a9b723e40263 100644 (file)
@@ -1,4 +1,4 @@
 config snort 'snort'
-       option config_dir '/etc/snort/etc/'
+       option config_dir '/etc/snort/'
        option alert_module 'alert_syslog'
        option interface 'eth0'