mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 17:52:46 +01:00
Ensure IP is available to child process executing so-allow
This commit is contained in:
@@ -21,6 +21,8 @@ address_type=DHCP
|
|||||||
ADMINUSER=onionuser
|
ADMINUSER=onionuser
|
||||||
ADMINPASS1=onionuser
|
ADMINPASS1=onionuser
|
||||||
ADMINPASS2=onionuser
|
ADMINPASS2=onionuser
|
||||||
|
ALLOW_CIDR=192.168.0.0/16
|
||||||
|
ALLOW_ROLE=a
|
||||||
BASICBRO=7
|
BASICBRO=7
|
||||||
BASICSURI=7
|
BASICSURI=7
|
||||||
# BLOGS=
|
# BLOGS=
|
||||||
@@ -34,7 +36,6 @@ HNMASTER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
|||||||
HNSENSOR=inherit
|
HNSENSOR=inherit
|
||||||
HOSTNAME=standalone
|
HOSTNAME=standalone
|
||||||
install_type=STANDALONE
|
install_type=STANDALONE
|
||||||
IP=192.168.0.0/16
|
|
||||||
# LSINPUTBATCHCOUNT=
|
# LSINPUTBATCHCOUNT=
|
||||||
# LSINPUTTHREADS=
|
# LSINPUTTHREADS=
|
||||||
# LSPIPELINEBATCH=
|
# LSPIPELINEBATCH=
|
||||||
|
|||||||
@@ -33,8 +33,10 @@ while [[ $# -gt 0 ]]; do
|
|||||||
export TURBO="http://${arg#*=}";;
|
export TURBO="http://${arg#*=}";;
|
||||||
"--proxy="* )
|
"--proxy="* )
|
||||||
export {http,https,ftp,rsync,all}_proxy="${arg#*=}";;
|
export {http,https,ftp,rsync,all}_proxy="${arg#*=}";;
|
||||||
"--allow="* )
|
"--allow-role="* )
|
||||||
export allow="${arg#*=}";;
|
export ALLOW_ROLE="${arg#*=}";;
|
||||||
|
"--allow-cidr="* )
|
||||||
|
export ALLOW_CIDR="${arg#*=}";;
|
||||||
* )
|
* )
|
||||||
if [[ "$arg" == "--"* ]]; then
|
if [[ "$arg" == "--"* ]]; then
|
||||||
echo "Invalid option"
|
echo "Invalid option"
|
||||||
@@ -556,8 +558,9 @@ fi
|
|||||||
success=$(tail -10 $setup_log | grep Failed | awk '{ print $2}')
|
success=$(tail -10 $setup_log | grep Failed | awk '{ print $2}')
|
||||||
if [[ "$success" = 0 ]]; then
|
if [[ "$success" = 0 ]]; then
|
||||||
whiptail_setup_complete
|
whiptail_setup_complete
|
||||||
if [[ -n $allow ]]; then
|
if [[ -n $ALLOW_ROLE && -n $ALLOW_CIDR ]]; then
|
||||||
so-allow -$allow >> $setup_log 2>&1
|
export IP=$ALLOW_CIDR
|
||||||
|
so-allow -$ALLOW_ROLE >> $setup_log 2>&1
|
||||||
fi
|
fi
|
||||||
if [[ $THEHIVE == 1 ]]; then
|
if [[ $THEHIVE == 1 ]]; then
|
||||||
check_hive_init_then_reboot
|
check_hive_init_then_reboot
|
||||||
|
|||||||
Reference in New Issue
Block a user