mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
start adding bridge for hyper
This commit is contained in:
@@ -740,6 +740,29 @@ configure_network_sensor() {
|
|||||||
return $err
|
return $err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configure_hyper_bridge() {
|
||||||
|
info "Setting up hypervisor bridge"
|
||||||
|
info "Checking $MNIC is using static or DHCP"
|
||||||
|
sod=$(nmcli -f ipv4.method con show $MNIC)
|
||||||
|
|
||||||
|
# Create the bond interface only if it doesn't already exist
|
||||||
|
nmcli -f name,uuid -p con | grep -q br0
|
||||||
|
local found_int=$?
|
||||||
|
|
||||||
|
if [[ $found_int != 0 ]]; then
|
||||||
|
nmcli con add ifname br0 type bridge con-name br0 >> "$setup_log" 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# as mgmt interface as slave
|
||||||
|
nmcli con add type bridge-slave ifname "$MNIC" master br0
|
||||||
|
|
||||||
|
local err=0
|
||||||
|
nmcli con down "$MNIC"
|
||||||
|
nmcli con up br0
|
||||||
|
|
||||||
|
return $err
|
||||||
|
}
|
||||||
|
|
||||||
copy_salt_master_config() {
|
copy_salt_master_config() {
|
||||||
|
|
||||||
title "Copy the Salt master config template to the proper directory"
|
title "Copy the Salt master config template to the proper directory"
|
||||||
|
|||||||
@@ -628,6 +628,7 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
info "Setting up as node type hypervisor"
|
info "Setting up as node type hypervisor"
|
||||||
check_requirements
|
check_requirements
|
||||||
networking_needful
|
networking_needful
|
||||||
|
configure_hyper_bridge
|
||||||
collect_mngr_hostname
|
collect_mngr_hostname
|
||||||
add_mngr_ip_to_hosts
|
add_mngr_ip_to_hosts
|
||||||
check_manager_connection
|
check_manager_connection
|
||||||
|
|||||||
Reference in New Issue
Block a user