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,13 +148,24 @@ create_bond() {
|
|||||||
|
|
||||||
# Do something different based on the OS
|
# Do something different based on the OS
|
||||||
if [ $OS == 'centos' ]; then
|
if [ $OS == 'centos' ]; then
|
||||||
alias bond0 bonding
|
modprobe --first-time bonding
|
||||||
mode=0
|
touch /etc/sysconfig/network-scripts/ifcfg-bond0
|
||||||
# Create Bond files for the selected monitor interface - TODO
|
echo "DEVICE=bond0" >> /etc/sysconfig/network-scripts/ifcfg-bond0
|
||||||
for BNIC in ${BNICS[@]}; do
|
echo "NAME=bond0" >> /etc/sysconfig/network-scripts/ifcfg-bond0
|
||||||
echo "blah"
|
echo "Type=Bond" >> /etc/sysconfig/network-scripts/ifcfg-bond0
|
||||||
done
|
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
|
||||||
|
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
|
else
|
||||||
|
|
||||||
# Need to add 17.04 support still
|
# Need to add 17.04 support still
|
||||||
|
|||||||
Reference in New Issue
Block a user