mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
IDH - Final setup fixes
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
idh:
|
idh:
|
||||||
opencanary:
|
opencanary:
|
||||||
config:
|
config:
|
||||||
httpproxy.enabled: false
|
httpproxy.enabled: true
|
||||||
httpproxy.port: 8080
|
httpproxy.port: 8080
|
||||||
httpproxy.skin: squid
|
httpproxy.skin: squid
|
||||||
httproxy.skin.list:
|
httproxy.skin.list:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
idh:
|
idh:
|
||||||
opencanary:
|
opencanary:
|
||||||
config:
|
config:
|
||||||
mysql.enabled: false
|
mysql.enabled: true
|
||||||
mysql.port: 3306
|
mysql.port: 3306
|
||||||
mysql.banner: 5.5.43-0ubuntu0.14.04.1
|
mysql.banner: 5.5.43-0ubuntu0.14.04.1
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
idh:
|
idh:
|
||||||
opencanary:
|
opencanary:
|
||||||
config:
|
config:
|
||||||
ntp.enabled: false
|
ntp.enabled: true
|
||||||
ntp.port: '123'
|
ntp.port: '123'
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
idh:
|
|
||||||
opencanary:
|
|
||||||
config:
|
|
||||||
rdp.enabled: false
|
|
||||||
rdp.port: 3389
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
idh:
|
idh:
|
||||||
opencanary:
|
opencanary:
|
||||||
config:
|
config:
|
||||||
redis.enabled: false
|
redis.enabled: true
|
||||||
redis.port: 6379
|
redis.port: 6379
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
idh:
|
idh:
|
||||||
opencanary:
|
opencanary:
|
||||||
config:
|
config:
|
||||||
sip.enabled: false
|
sip.enabled: true
|
||||||
sip.port: 5060
|
sip.port: 5060
|
||||||
@@ -2,4 +2,4 @@ idh:
|
|||||||
opencanary:
|
opencanary:
|
||||||
config:
|
config:
|
||||||
smb.auditfile: /var/log/samba-audit.log
|
smb.auditfile: /var/log/samba-audit.log
|
||||||
smb.enabled: false
|
smb.enabled: true
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
idh:
|
idh:
|
||||||
opencanary:
|
opencanary:
|
||||||
config:
|
config:
|
||||||
snmp.enabled: false
|
snmp.enabled: true
|
||||||
snmp.port: 161
|
snmp.port: 161
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
idh:
|
idh:
|
||||||
opencanary:
|
opencanary:
|
||||||
config:
|
config:
|
||||||
ssh.enabled: false
|
ssh.enabled: true
|
||||||
ssh.port: 22
|
ssh.port: 22
|
||||||
ssh.version: SSH-2.0-OpenSSH_5.1p1 Debian-4
|
ssh.version: SSH-2.0-OpenSSH_5.1p1 Debian-4
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
idh:
|
idh:
|
||||||
opencanary:
|
opencanary:
|
||||||
config:
|
config:
|
||||||
tftp.enabled: false
|
tftp.enabled: true
|
||||||
tftp.port: 69
|
tftp.port: 69
|
||||||
@@ -462,7 +462,6 @@ collect_idh_services() {
|
|||||||
;;
|
;;
|
||||||
'Custom')
|
'Custom')
|
||||||
whiptail_idh_services_custom
|
whiptail_idh_services_custom
|
||||||
echo $idh_services
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@@ -884,6 +883,7 @@ check_requirements() {
|
|||||||
req_cores=4
|
req_cores=4
|
||||||
if [[ "$node_type" == 'sensor' ]]; then req_nics=2; else req_nics=1; fi
|
if [[ "$node_type" == 'sensor' ]]; then req_nics=2; else req_nics=1; fi
|
||||||
if [[ "$node_type" == 'fleet' ]]; then req_mem=4; fi
|
if [[ "$node_type" == 'fleet' ]]; then req_mem=4; fi
|
||||||
|
if [[ "$node_type" == 'idh' ]]; then req_mem=1 req_cores=2; fi
|
||||||
elif [[ "$standalone_or_dist" == 'import' ]]; then
|
elif [[ "$standalone_or_dist" == 'import' ]]; then
|
||||||
req_mem=4
|
req_mem=4
|
||||||
req_cores=2
|
req_cores=2
|
||||||
@@ -2850,12 +2850,13 @@ wait_for_salt_minion() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
write_out_idh_services() {
|
write_out_idh_services() {
|
||||||
|
local pillar_file="$temp_install_dir"/pillar/minions/"$MINION_ID".sls
|
||||||
|
|
||||||
printf '%s\n'\
|
printf '%s\n'\
|
||||||
"idh:"\
|
"idh:"\
|
||||||
" opencanary:"\
|
" services:" >> "$pillar_file"
|
||||||
" config:" >> "$minion_config"
|
|
||||||
for service in ${idh_services[@]}; do
|
for service in ${idh_services[@]}; do
|
||||||
echo " - $service" >> "$minion_config"
|
echo " - $service" | tr '[:upper:]' '[:lower:]' >> "$pillar_file"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -280,6 +280,8 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
check_requirements "standalone"
|
check_requirements "standalone"
|
||||||
elif [[ $is_fleet_standalone ]]; then
|
elif [[ $is_fleet_standalone ]]; then
|
||||||
check_requirements "dist" "fleet"
|
check_requirements "dist" "fleet"
|
||||||
|
elif [[ $is_idh ]]; then
|
||||||
|
check_requirements "dist" "idh"
|
||||||
elif [[ $is_sensor && ! $is_eval ]]; then
|
elif [[ $is_sensor && ! $is_eval ]]; then
|
||||||
check_requirements "dist" "sensor"
|
check_requirements "dist" "sensor"
|
||||||
elif [[ $is_distmanager || $is_minion ]] && [[ ! $is_import ]]; then
|
elif [[ $is_distmanager || $is_minion ]] && [[ ! $is_import ]]; then
|
||||||
@@ -750,6 +752,12 @@ echo "1" > /root/accept_changes
|
|||||||
logstash_pillar >> $setup_log 2>&1
|
logstash_pillar >> $setup_log 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $is_idh ]]; then
|
||||||
|
# Write out services to minion pillar file
|
||||||
|
set_progress_str 19 'Generating IDH services pillar'
|
||||||
|
write_out_idh_services
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ $is_minion ]]; then
|
if [[ $is_minion ]]; then
|
||||||
set_progress_str 20 'Accepting Salt key on manager'
|
set_progress_str 20 'Accepting Salt key on manager'
|
||||||
@@ -919,9 +927,6 @@ echo "1" > /root/accept_changes
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $is_idh ]]; then
|
if [[ $is_idh ]]; then
|
||||||
# Write out services to minion pillar file
|
|
||||||
write_out_idh_services
|
|
||||||
|
|
||||||
set_progress_str 79 "$(print_salt_state_apply 'idh')"
|
set_progress_str 79 "$(print_salt_state_apply 'idh')"
|
||||||
salt-call state.apply -l info idh >> $setup_log 2>&1
|
salt-call state.apply -l info idh >> $setup_log 2>&1
|
||||||
|
|
||||||
|
|||||||
@@ -432,6 +432,14 @@ whiptail_end_settings() {
|
|||||||
Hostname: $HOSTNAME
|
Hostname: $HOSTNAME
|
||||||
EOM
|
EOM
|
||||||
|
|
||||||
|
if [[ $is_idh ]]; then
|
||||||
|
__append_end_msg "IDH Services Enabled:"
|
||||||
|
for service in ${idh_services[@]}; do
|
||||||
|
__append_end_msg "- $service"
|
||||||
|
done
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
[[ -n $NODE_DESCRIPTION ]] && __append_end_msg "Description: $NODE_DESCRIPTION"
|
[[ -n $NODE_DESCRIPTION ]] && __append_end_msg "Description: $NODE_DESCRIPTION"
|
||||||
|
|
||||||
[[ $is_airgap ]] && __append_end_msg "Airgap: True"
|
[[ $is_airgap ]] && __append_end_msg "Airgap: True"
|
||||||
@@ -832,14 +840,12 @@ whiptail_install_type_dist_existing() {
|
|||||||
|
|
||||||
local node_msg
|
local node_msg
|
||||||
read -r -d '' node_msg <<- EOM
|
read -r -d '' node_msg <<- EOM
|
||||||
Choose a distributed node type to join to an existing grid.
|
Choose a distributed node type to join to an existing grid. See https://docs.securityonion.net/architecture for details.
|
||||||
|
|
||||||
See https://docs.securityonion.net/architecture for details.
|
|
||||||
|
|
||||||
Note: Heavy nodes (HEAVYNODE) are NOT recommended for most users.
|
Note: Heavy nodes (HEAVYNODE) are NOT recommended for most users.
|
||||||
EOM
|
EOM
|
||||||
|
|
||||||
install_type=$(whiptail --title "$whiptail_title" --radiolist "$node_msg" 19 58 5 \
|
install_type=$(whiptail --title "$whiptail_title" --radiolist "$node_msg" 19 58 6 \
|
||||||
"SENSOR" "Create a forward only sensor " ON \
|
"SENSOR" "Create a forward only sensor " ON \
|
||||||
"SEARCHNODE" "Add a search node with parsing " OFF \
|
"SEARCHNODE" "Add a search node with parsing " OFF \
|
||||||
"FLEET" "Dedicated Fleet Osquery Node " OFF \
|
"FLEET" "Dedicated Fleet Osquery Node " OFF \
|
||||||
|
|||||||
Reference in New Issue
Block a user