mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-23 17:33:10 +01:00
Setup Script - Bond Ubuntu testing
This commit is contained in:
@@ -144,8 +144,9 @@ create_bond() {
|
|||||||
# Backup and create a new interface file
|
# Backup and create a new interface file
|
||||||
cp /etc/network/interfaces /etc/network/interfaces.sosetup
|
cp /etc/network/interfaces /etc/network/interfaces.sosetup
|
||||||
local LBACK=$(awk '/auto lo/,/^$/' /etc/network/interfaces)
|
local LBACK=$(awk '/auto lo/,/^$/' /etc/network/interfaces)
|
||||||
|
echo $MNIC
|
||||||
local MINT=$(awk '/auto $MNIC/,/^$/' /etc/network/interfaces)
|
local MINT=$(awk '/auto $MNIC/,/^$/' /etc/network/interfaces)
|
||||||
|
echo $MINT
|
||||||
# Let's set up the new interface file
|
# Let's set up the new interface file
|
||||||
echo $LBACK > /etc/network/interfaces
|
echo $LBACK > /etc/network/interfaces
|
||||||
echo $MINT >> /etc/network/interfaces
|
echo $MINT >> /etc/network/interfaces
|
||||||
@@ -154,20 +155,20 @@ create_bond() {
|
|||||||
for BNIC in ${BNICS[@]}; do
|
for BNIC in ${BNICS[@]}; do
|
||||||
echo "auto $BNIC" >> /etc/network/interfaces
|
echo "auto $BNIC" >> /etc/network/interfaces
|
||||||
echo "iface $BNIC inet static" >> /etc/network/interfaces
|
echo "iface $BNIC inet static" >> /etc/network/interfaces
|
||||||
echo " up ip link set \$IFACE promisc on arp off up"
|
echo " up ip link set \$IFACE promisc on arp off up" >> /etc/network/interfaces
|
||||||
echo " down ip link set \$IFACE promisc off down"
|
echo " down ip link set \$IFACE promisc off down" >> /etc/network/interfaces
|
||||||
echo " post-up ethtool -G \$IFACE rx 4096; for i in rx tx sg tso ufo gso gro lro; do ethtool -K \$IFACE \$i off; done"
|
echo " post-up ethtool -G \$IFACE rx 4096; for i in rx tx sg tso ufo gso gro lro; do ethtool -K \$IFACE \$i off; done" >> /etc/network/interfaces
|
||||||
echo " post-up echo 1 > /proc/sys/net/ipv6/conf/\$IFACE/disable_ipv6"
|
echo " post-up echo 1 > /proc/sys/net/ipv6/conf/\$IFACE/disable_ipv6" >> /etc/network/interfaces
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "auto bond0" >> /etc/network/interfaces
|
echo "auto bond0" >> /etc/network/interfaces
|
||||||
echo "iface bond0 inet static" >> /etc/network/interfaces
|
echo "iface bond0 inet static" >> /etc/network/interfaces
|
||||||
echo " bond-mode 0" >> /etc/network/interfaces
|
echo " bond-mode 0" >> /etc/network/interfaces
|
||||||
echo " bond-slaves ${BNICS[@]}" >> /etc/network/interfaces
|
echo " bond-slaves ${BNICS[@]}" >> /etc/network/interfaces
|
||||||
echo " up ip link set \$IFACE promisc on arp off up"
|
echo " up ip link set \$IFACE promisc on arp off up" >> /etc/network/interfaces
|
||||||
echo " down ip link set \$IFACE promisc off down"
|
echo " down ip link set \$IFACE promisc off down" >> /etc/network/interfaces
|
||||||
echo " post-up ethtool -G \$IFACE rx 4096; for i in rx tx sg tso ufo gso gro lro; do ethtool -K \$IFACE \$i off; done"
|
echo " post-up ethtool -G \$IFACE rx 4096; for i in rx tx sg tso ufo gso gro lro; do ethtool -K \$IFACE \$i off; done" >> /etc/network/interfaces
|
||||||
echo " post-up echo 1 > /proc/sys/net/ipv6/conf/\$IFACE/disable_ipv6"
|
echo " post-up echo 1 > /proc/sys/net/ipv6/conf/\$IFACE/disable_ipv6" >> /etc/network/interfaces
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user