mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Adding docker net setting
This commit is contained in:
@@ -845,6 +845,12 @@ docker_registry() {
|
|||||||
printf '%s\n'\
|
printf '%s\n'\
|
||||||
"{"\
|
"{"\
|
||||||
" \"registry-mirrors\": [ \"$proxy:5000\" ]"\
|
" \"registry-mirrors\": [ \"$proxy:5000\" ]"\
|
||||||
|
" \"default-address-pools\": ["\
|
||||||
|
" {"\
|
||||||
|
" \"base\" : \"$DOCKERNET\","\
|
||||||
|
" \"size\" : 24"\
|
||||||
|
" }"\
|
||||||
|
" ]"\
|
||||||
"}" > /etc/docker/daemon.json
|
"}" > /etc/docker/daemon.json
|
||||||
echo "Docker Registry Setup - Complete" >> "$setup_log" 2>&1
|
echo "Docker Registry Setup - Complete" >> "$setup_log" 2>&1
|
||||||
|
|
||||||
@@ -1139,12 +1145,17 @@ manager_global() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DOCKERNET" ]; then
|
||||||
|
DOCKERNET=172.17.0.0/16
|
||||||
|
fi
|
||||||
|
|
||||||
# Create a global file for global values
|
# Create a global file for global values
|
||||||
printf '%s\n'\
|
printf '%s\n'\
|
||||||
"global:"\
|
"global:"\
|
||||||
" soversion: '$SOVERSION'"\
|
" soversion: '$SOVERSION'"\
|
||||||
" hnmanager: '$HNMANAGER'"\
|
" hnmanager: '$HNMANAGER'"\
|
||||||
" ntpserver: '$NTPSERVER'"\
|
" ntpserver: '$NTPSERVER'"\
|
||||||
|
" dockernet: '$DOCKERNET'"\
|
||||||
" proxy: '$PROXY'"\
|
" proxy: '$PROXY'"\
|
||||||
" mdengine: '$ZEEKVERSION'"\
|
" mdengine: '$ZEEKVERSION'"\
|
||||||
" ids: '$NIDS'"\
|
" ids: '$NIDS'"\
|
||||||
|
|||||||
@@ -312,6 +312,7 @@ fi
|
|||||||
|
|
||||||
if [[ $is_helix || $is_manager || $is_import ]]; then
|
if [[ $is_helix || $is_manager || $is_import ]]; then
|
||||||
whiptail_homenet_manager
|
whiptail_homenet_manager
|
||||||
|
whiptail_dockernet_check
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $is_helix || $is_manager || $is_node || $is_import ]]; then
|
if [[ $is_helix || $is_manager || $is_node || $is_import ]]; then
|
||||||
|
|||||||
@@ -457,6 +457,31 @@ whiptail_dhcp_warn() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
whiptail_dockernet_check(){
|
||||||
|
|
||||||
|
[ -n "$TESTING" ] && return
|
||||||
|
|
||||||
|
whiptail --title "Security Onion Setup" --yesno \
|
||||||
|
"Do you want to change the IP range Docker uses? (Choose no if you don't know what this means)" 8 75
|
||||||
|
|
||||||
|
local exitstatus=$?
|
||||||
|
|
||||||
|
if [[ $exitstatus == 0 ]]; then
|
||||||
|
whiptail_dockernet_net
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
whiptail_dockernet_net() {
|
||||||
|
|
||||||
|
[ -n "$TESTING" ] && return
|
||||||
|
|
||||||
|
DOCKERNET=$(whiptail --title "Security Onion Setup" --inputbox \
|
||||||
|
"\nEnter a network range for docker to use: \n \n(Default value is pre-populated)" 10 75 172.17.0.0/16 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
|
local exitstatus=$?
|
||||||
|
whiptail_check_exitstatus $exitstatus
|
||||||
|
|
||||||
|
}
|
||||||
whiptail_enable_components() {
|
whiptail_enable_components() {
|
||||||
|
|
||||||
[ -n "$TESTING" ] && return
|
[ -n "$TESTING" ] && return
|
||||||
|
|||||||
Reference in New Issue
Block a user