mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-11 19:52:51 +01:00
Set MAINIP to MNIC_IP when using a VPN
This commit is contained in:
@@ -751,9 +751,7 @@ check_sos_appliance() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compare_main_nic_ip() {
|
compare_main_nic_ip() {
|
||||||
if [[ "$MNIC" == "tun"* ]] || [[ "$MNIC" == "wg"* ]] || [[ "$MNIC" == "vpn"* ]]; then
|
if ! [[ $MNIC =~ ^(tun|wg|vpn).*$ ]]; then
|
||||||
echo "This is a VPN"
|
|
||||||
else
|
|
||||||
if [[ "$MAINIP" != "$MNIC_IP" ]]; then
|
if [[ "$MAINIP" != "$MNIC_IP" ]]; then
|
||||||
read -r -d '' message <<- EOM
|
read -r -d '' message <<- EOM
|
||||||
The IP being routed by Linux is not the IP address assigned to the management interface ($MNIC).
|
The IP being routed by Linux is not the IP address assigned to the management interface ($MNIC).
|
||||||
@@ -763,7 +761,12 @@ compare_main_nic_ip() {
|
|||||||
whiptail --title "Security Onion Setup" --msgbox "$message" 10 75
|
whiptail --title "Security Onion Setup" --msgbox "$message" 10 75
|
||||||
kill -SIGINT "$(ps --pid $$ -oppid=)"; exit 1
|
kill -SIGINT "$(ps --pid $$ -oppid=)"; exit 1
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
# Setup uses MAINIP, but since we ignore the equality condition when using a VPN
|
||||||
|
# just set the variable to the IP of the VPN interface
|
||||||
|
MAINIP=$MNIC_IP
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
compare_versions() {
|
compare_versions() {
|
||||||
|
|||||||
Reference in New Issue
Block a user