Attempt to identify secondary interface on LVS servers and set firewall accordingly
authorAndy Witter <awitter@georgialibraries.org>
Tue, 22 Aug 2017 16:57:54 +0000 (12:57 -0400)
committerAndy Witter <awitter@georgialibraries.org>
Tue, 22 Aug 2017 16:57:54 +0000 (12:57 -0400)
templates/setup.sh

index 069436c..45b3d52 100755 (executable)
@@ -260,6 +260,12 @@ cat named_options.txt >> /etc/bind/named.options
 
 fi
 
+# configure firewall for lvs servers
+sed -i "s/eth1/$PRIMARY_IF/g" "/etc/network/iptables-rules.fw"
+# find secondary interface
+SECONDARY_IF=$(ls /sys/class/net |grep -v "lo" |grep -v "$PRIMARY_IF")
+sed -i "s/eth0/$SECONDARY_IF/g" "/etc/network/iptables-rules.fw"
+
 
 ConfigLogging () { ### Configure logging for the cluster.
 if ! cat /etc/hostname|grep -q logger