mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Prevent the tun interface from being disabled
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [[ "$DEVICE_IFACE" != "$MNIC" && "$DEVICE_IFACE" != *"docker"* ]]; then
|
if [[ "$DEVICE_IFACE" != "$MNIC" && "$DEVICE_IFACE" != *"docker"* && "$DEVICE_IFACE" != *"tun"* && "DEVICE_IFACE" != *"wg"* ]]; then
|
||||||
for i in rx tx sg tso ufo gso gro lro; do
|
for i in rx tx sg tso ufo gso gro lro; do
|
||||||
ethtool -K "$DEVICE_IFACE" "$i" off;
|
ethtool -K "$DEVICE_IFACE" "$i" off;
|
||||||
done
|
done
|
||||||
ip link set dev "$DEVICE_IFACE" arp off multicast off allmulticast off promisc on
|
ip link set dev "$DEVICE_IFACE" arp off multicast off allmulticast off promisc on
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1184,7 +1184,7 @@ es_heapsize() {
|
|||||||
# Determine ES Heap Size
|
# Determine ES Heap Size
|
||||||
if [ "$total_mem" -lt 8000 ] ; then
|
if [ "$total_mem" -lt 8000 ] ; then
|
||||||
ES_HEAP_SIZE="600m"
|
ES_HEAP_SIZE="600m"
|
||||||
elif [ "$total_mem" -ge 100000 ]; then
|
elif [ "$total_mem" -ge 100000 ]; then1
|
||||||
# Set a max of 25GB for heap size
|
# Set a max of 25GB for heap size
|
||||||
# https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html
|
# https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html
|
||||||
ES_HEAP_SIZE="25000m"
|
ES_HEAP_SIZE="25000m"
|
||||||
@@ -1213,7 +1213,7 @@ filter_unused_nics() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Finally, set filtered_nics to any NICs we aren't using (and ignore interfaces that aren't of use)
|
# Finally, set filtered_nics to any NICs we aren't using (and ignore interfaces that aren't of use)
|
||||||
filtered_nics=$(ip link | awk -F: '$0 !~ "lo|vir|veth|br|docker|wl|^[^0-9]"{print $2}' | grep -vwe "$grep_string" | sed 's/ //g')
|
filtered_nics=$(ip link | awk -F: '$0 !~ "lo|vir|veth|br|docker|tun|wg|wl|^[^0-9]"{print $2}' | grep -vwe "$grep_string" | sed 's/ //g')
|
||||||
readarray -t filtered_nics <<< "$filtered_nics"
|
readarray -t filtered_nics <<< "$filtered_nics"
|
||||||
|
|
||||||
nic_list=()
|
nic_list=()
|
||||||
|
|||||||
Reference in New Issue
Block a user