jaguar.m4: Allow Munin from distorted.org.uk and hstg.corp.good.com. jaguar
authorMark Wooding <mdw@distorted.org.uk>
Mon, 11 May 2015 14:21:07 +0000 (15:21 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 11 May 2015 14:27:00 +0000 (15:27 +0100)
jaguar.m4

index 414d6f9..adb14b2 100644 (file)
--- a/jaguar.m4
+++ b/jaguar.m4
@@ -37,11 +37,13 @@ ntpclient inbound 212.13.198.69 2001:ba8:0:1d9::5
 ## Allow Munin queries from HSTG and the distorted.org.uk mothership.
 clearchain munin
 ip46tables -A inbound -j munin -p tcp --dport $port_munin
-for i in 217.150.97.26 212.13.198.71 62.49.204.147; do
-  iptables -A munin -j ACCEPT -s $i
-done
-for i in 2001:470:1f09:1b98::3 2001:ba8:0:1d9::7; do
-  ip6tables -A munin -j ACCEPT -s $i
+for i in \
+       217.150.97.26 \
+       212.13.198.71 2001:ba8:0:1d9::7 \
+       62.49.204.147 2001:470:1f09:1b98::3
+do
+  case $i in *:*) ipt=ip6tables ;; *) ipt=iptables ;; esac
+  run $ipt -A munin -j ACCEPT -s $i
 done
 
 ## Other interesting things.