mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 09:42:46 +01:00
Add additional checks for manager hostname + ip
Check for current hostname, ip, and localhost (ip + string) when setting the manager ip and hostname
This commit is contained in:
@@ -470,7 +470,7 @@ collect_int_ip_mask() {
|
|||||||
collect_mngr_hostname() {
|
collect_mngr_hostname() {
|
||||||
whiptail_management_server
|
whiptail_management_server
|
||||||
|
|
||||||
while ! valid_hostname "$MSRV"; do
|
while ! valid_hostname "$MSRV" || [[ $MSRV == "$HOSTNAME" || $MSRVIP == "localhost" ]]; do
|
||||||
whiptail_invalid_hostname
|
whiptail_invalid_hostname
|
||||||
whiptail_management_server "$MSRV"
|
whiptail_management_server "$MSRV"
|
||||||
done
|
done
|
||||||
@@ -478,7 +478,7 @@ collect_mngr_hostname() {
|
|||||||
if ! getent hosts "$MSRV"; then
|
if ! getent hosts "$MSRV"; then
|
||||||
whiptail_manager_ip
|
whiptail_manager_ip
|
||||||
|
|
||||||
while ! valid_ip4 "$MSRVIP"; do
|
while ! valid_ip4 "$MSRVIP" || [[ $MSRVIP == "$MAINIP" || $MSRVIP == "127.0.0.1" ]]; do
|
||||||
whiptail_invalid_input
|
whiptail_invalid_input
|
||||||
whiptail_manager_ip "$MSRVIP"
|
whiptail_manager_ip "$MSRVIP"
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user