mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
IDSTools Overhaul
This commit is contained in:
@@ -46,6 +46,12 @@ logCmd() {
|
||||
$cmd >> "$setup_log" 2>&1
|
||||
}
|
||||
|
||||
airgap_rules() {
|
||||
# Copy the rules for suricata if using Airgap
|
||||
mkdir -p /opt/so/rules/nids
|
||||
cp -v /root/SecurityOnion/agrules/emerging-all.rules /opt/so/rules/nids/
|
||||
}
|
||||
|
||||
analyze_system() {
|
||||
title "System Characteristics"
|
||||
logCmd "uptime"
|
||||
@@ -630,6 +636,12 @@ create_local_directories() {
|
||||
|
||||
}
|
||||
|
||||
create_local_nids_rules() {
|
||||
# Create a local.rules file so it doesn't get blasted on updates
|
||||
mkdir -p /opt/so/saltstack/local/salt/idstools
|
||||
echo "# Custom Suricata rules go in this file" > /opt/so/saltstack/local/salt/idstools/local.rules
|
||||
}
|
||||
|
||||
create_repo() {
|
||||
# Create the repo for airgap
|
||||
createrepo /nsm/repo
|
||||
|
||||
@@ -465,6 +465,7 @@ fi
|
||||
if [[ $is_manager && $is_airgap ]]; then
|
||||
info "Creating airgap repo"
|
||||
create_repo >> $setup_log 2>&1
|
||||
airgap_rules >> $setup_log 2>&1
|
||||
fi
|
||||
|
||||
if [[ $is_minion ]]; then
|
||||
@@ -575,6 +576,7 @@ fi
|
||||
salt-call state.apply -l info manager >> $setup_log 2>&1
|
||||
|
||||
set_progress_str 61 "$(print_salt_state_apply 'idstools')"
|
||||
create_local_nids_rules >> $setup_log 2>&1
|
||||
salt-call state.apply -l info idstools >> $setup_log 2>&1
|
||||
|
||||
set_progress_str 61 "$(print_salt_state_apply 'suricata.manager')"
|
||||
|
||||
Reference in New Issue
Block a user