mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-20 16:03:06 +01:00
SO Setup - First attempt at bonding
This commit is contained in:
@@ -148,12 +148,23 @@ create_bond() {
|
||||
|
||||
# Do something different based on the OS
|
||||
if [ $OS == 'centos' ]; then
|
||||
alias bond0 bonding
|
||||
mode=0
|
||||
# Create Bond files for the selected monitor interface - TODO
|
||||
modprobe --first-time bonding
|
||||
touch /etc/sysconfig/network-scripts/ifcfg-bond0
|
||||
echo "DEVICE=bond0" >> /etc/sysconfig/network-scripts/ifcfg-bond0
|
||||
echo "NAME=bond0" >> /etc/sysconfig/network-scripts/ifcfg-bond0
|
||||
echo "Type=Bond" >> /etc/sysconfig/network-scripts/ifcfg-bond0
|
||||
echo "BONDING_MASTER=yes" >> /etc/sysconfig/network-scripts/ifcfg-bond0
|
||||
echo "BOOTPROTO=none" >> /etc/sysconfig/network-scripts/ifcfg-bond0
|
||||
echo "BONDING_OPTS=\"mode=0\"" >> /etc/sysconfig/network-scripts/ifcfg-bond0
|
||||
|
||||
# Create Bond configs for the selected monitor interface
|
||||
for BNIC in ${BNICS[@]}; do
|
||||
echo "blah"
|
||||
sed -i 's/ONBOOT=\"no\"/ONBOOT=\"yes\"/g' /etc/sysconfig/network-scripts/ifcfg-$BNIC
|
||||
echo "MASTER=bond0" >> /etc/sysconfig/network-scripts/ifcfg-$BNIC
|
||||
echo "SLAVE=yes" >> /etc/sysconfig/network-scripts/ifcfg-$BNIC
|
||||
done
|
||||
nmcli con reload
|
||||
systemctl restart networking
|
||||
|
||||
else
|
||||
|
||||
|
||||
Reference in New Issue
Block a user