Compare commits

...

4 Commits

Author SHA1 Message Date
Josh Patterson
5f832083f6 remove bridge when doing reinstall 2026-03-23 12:23:07 -04:00
Jason Ertel
8ea97e4af3 Merge pull request #15658 from Security-Onion-Solutions/jertel/wip
do not attempt to redirect to a source map after login
2026-03-23 09:55:31 -04:00
Jason Ertel
2f9a2e15b3 do not attempt to redirect to a source map after login 2026-03-23 09:48:06 -04:00
Josh Brower
a4fcf4ddf2 Merge pull request #15656 from Security-Onion-Solutions/zeek-websocket
Add support for websockets
2026-03-23 08:21:08 -04:00
2 changed files with 64 additions and 1 deletions

View File

@@ -387,7 +387,7 @@ http {
error_page 429 = @error429;
location @error401 {
if ($request_uri ~* (^/api/.*|^/connect/.*|^/oauth2/.*)) {
if ($request_uri ~* (^/api/.*|^/connect/.*|^/oauth2/.*|^/.*\.map$)) {
return 401;
}

View File

@@ -745,6 +745,66 @@ configure_network_sensor() {
return $err
}
remove_hyper_bridge() {
# Check if br0 exists
if ! nmcli -f name -t con show | grep -q '^br0$'; then
info "No br0 bridge found, skipping bridge removal"
return
fi
info "Removing hypervisor bridge br0"
# Get the bridge slave interface name
local slave_iface
slave_iface=$(nmcli -f connection.slave-type,connection.interface-name -t con show --active | grep bridge | grep -v br0 | head -1 | cut -d: -f2)
if [[ -z "$slave_iface" ]]; then
# Try finding it from inactive bridge-slave connections
slave_iface=$(nmcli -f connection.type,connection.interface-name -t con show | grep bridge-slave | head -1 | cut -d: -f2)
fi
# Get IP settings from br0 before removing it
local ipmethod addresses gateway dns dnssearch
ipmethod=$(nmcli -f ipv4.method -t con show br0 | cut -d: -f2)
addresses=$(nmcli -f ipv4.addresses -t con show br0 | cut -d: -f2)
gateway=$(nmcli -f ipv4.gateway -t con show br0 | cut -d: -f2)
dns=$(nmcli -f ipv4.dns -t con show br0 | cut -d: -f2)
dnssearch=$(nmcli -f ipv4.dns-search -t con show br0 | cut -d: -f2)
# Remove bridge-slave connections
for con in $(nmcli -f name -t con show | grep '^bridge-slave-'); do
logCmd "nmcli con delete $con"
done
# Remove br0
logCmd "nmcli con delete br0"
if [[ -n "$slave_iface" ]]; then
# Ensure the original connection profile exists for the slave interface
if ! nmcli -f name -t con show | grep -q "^${slave_iface}$"; then
info "Recreating connection profile for $slave_iface"
logCmd "nmcli con add type ethernet ifname $slave_iface con-name $slave_iface"
fi
# Transfer IP settings back to the original interface
if [[ "$ipmethod" == "manual" && -n "$addresses" ]]; then
info "Restoring static IP configuration to $slave_iface"
logCmd "nmcli con mod $slave_iface ipv4.addresses $addresses"
logCmd "nmcli con mod $slave_iface ipv4.gateway $gateway"
[[ -n "$dns" ]] && logCmd "nmcli con mod $slave_iface ipv4.dns $dns"
[[ -n "$dnssearch" ]] && logCmd "nmcli con mod $slave_iface ipv4.dns-search $dnssearch"
logCmd "nmcli con mod $slave_iface ipv4.method manual"
else
logCmd "nmcli con mod $slave_iface ipv4.method auto"
fi
logCmd "nmcli con up $slave_iface"
info "Bridge br0 removed, network restored on $slave_iface"
else
info "Warning: Could not determine original interface from bridge slave. Bridge removed but network may need manual configuration."
fi
}
configure_hyper_bridge() {
info "Setting up hypervisor bridge"
info "Checking $MNIC ipv4.method is auto or manual"
@@ -1541,6 +1601,9 @@ clear_previous_setup_results() {
reinstall_init() {
info "Putting system in state to run setup again"
# Remove hypervisor bridge if present so network works without it
remove_hyper_bridge
if [[ $install_type =~ ^(MANAGER|EVAL|MANAGERSEARCH|MANAGERHYPE|STANDALONE|FLEET|IMPORT)$ ]]; then
local salt_services=( "salt-master" "salt-minion" )
else