}
@def &SERVICE_RANGE($proto, $port, $srange) = {
- proto $proto mod state state (NEW) dport $port saddr ($srange) ACCEPT;
+ proto $proto mod state state (NEW) dport $port @subchain "$port" { saddr ($srange) ACCEPT; }"
}
@def &TCP_UDP_SERVICE($port) = {
proto (tcp udp) mod state state (NEW) dport $port ACCEPT;
}
-@def $HOST_NAGIOS = (<%=
+@def $HOST_MAILRELAY_V4 = (<%=
+ mailrelay = []
+ localinfo.keys.sort.each do |node|
+ if localinfo[node]['mailrelay']
+ keyinfo[node]['ipHostNumber'].each do |ip|
+ next if ip =~ /:/
+ mailrelay << ip
+ end
+ end
+ end
+
+ mailrelay.join(' ')
+%>);
+
+@def $HOST_MAILRELAY_V6 = (<%=
+ mailrelay = []
+ localinfo.keys.sort.each do |node|
+ if localinfo[node]['mailrelay']
+ keyinfo[node]['ipHostNumber'].each do |ip|
+ next if ip =~ /\./
+ mailrelay << ip
+ end
+ end
+ end
+
+ mailrelay.join(' ')
+%>);
+
+@def $HOST_MAILRELAY = ( $HOST_MAILRELAY_V4 $HOST_MAILRELAY_V6 );
+
+@def $HOST_NAGIOS_V4 = (<%=
nagii = []
localinfo.keys.sort.each do |node|
- if localinfo[node]['nagiosmaster']
- nagii << keyinfo[node][0]['ipHostNumber']
+ if localinfo[node]['nagiosmaster'] or localinfo[node]['extranrpeclient']
+ keyinfo[node]['ipHostNumber'].each do |ip|
+ next if ip =~ /:/
+ nagii << ip
+ end
end
end
nagii.join(' ')
%>);
-@def $HOST_MUNIN = (<%=
+@def $HOST_NAGIOS_V6 = (<%=
+ nagii = []
+ localinfo.keys.sort.each do |node|
+ if localinfo[node]['nagiosmaster'] or localinfo[node]['extranrpeclient']
+ keyinfo[node]['ipHostNumber'].each do |ip|
+ next if ip =~ /\./
+ nagii << ip
+ end
+ end
+ end
+
+ nagii.join(' ')
+%>);
+
+@def $HOST_NAGIOS = ( $HOST_NAGIOS_V4 $HOST_NAGIOS_V6 );
+
+@def $HOST_MUNIN_V4 = (<%=
munins = []
localinfo.keys.sort.each do |node|
if localinfo[node]['muninmaster']
- munins << keyinfo[node][0]['ipHostNumber']
+ keyinfo[node]['ipHostNumber'].each do |ip|
+ next if ip =~ /:/
+ munins << ip
+ end
end
end
munins.join(' ')
%>);
-@def $sgran = (91.103.132.24/29);
+@def $HOST_MUNIN_V6 = (<%=
+ munins = []
+ localinfo.keys.sort.each do |node|
+ if localinfo[node]['muninmaster']
+ keyinfo[node]['ipHostNumber'].each do |ip|
+ next if ip =~ /\./
+ munins << ip
+ end
+ end
+ end
+
+ munins.join(' ')
+%>);
+
+@def $HOST_MUNIN = ( $HOST_MUNIN_V4 $HOST_MUNIN_V6 );
+
+@def $HOST_DB_V6 = (<%=
+ dbs = []
+ localinfo.keys.sort.each do |node|
+ if localinfo[node]['dbmaster']
+ keyinfo[node]['ipHostNumber'].each do |ip|
+ next if ip =~ /\./
+ dbs << ip
+ end
+ end
+ end
+
+ dbs.join(' ')
+%>);
+
+@def $HOST_DB_V4 = (<%=
+ dbs = []
+ localinfo.keys.sort.each do |node|
+ if localinfo[node]['dbmaster']
+ keyinfo[node]['ipHostNumber'].each do |ip|
+ next if ip =~ /:/
+ dbs << ip
+ end
+ end
+ end
+
+ dbs.join(' ')
+%>);
+
+@def $HOST_DB = ($HOST_DB_V4 $HOST_DB_V6);
+
+@def $HOST_DEBIAN_V4 = (<%=
+ dbs = []
+ keyinfo.keys.sort.each do |node|
+ next unless keyinfo[node].has_key?('ipHostNumber')
+ keyinfo[node]['ipHostNumber'].each do |ip|
+ next if ip =~ /:/
+ dbs << ip
+ end
+ end
+
+ dbs.join(' ')
+%>);
+
+@def $HOST_DEBIAN_V6 = (<%=
+ dbs = []
+ keyinfo.keys.sort.each do |node|
+ next unless keyinfo[node].has_key?('ipHostNumber')
+ keyinfo[node]['ipHostNumber'].each do |ip|
+ next if ip =~ /\./
+ dbs << ip
+ end
+ end
+
+ dbs.join(' ')
+%>);
+
+@def $HOST_DEBIAN = ($HOST_DEBIAN_V4 $HOST_DEBIAN_V6);
+
+@def $sgran = (91.103.132.24/29 85.158.45.51/32);
@def $weasel = ();
@def $weasel = ($weasel 86.59.118.144/28); # debian@sil
@def $weasel = ($weasel 86.59.21.32/29); # anguilla1
@def $weasel = ($weasel 141.201.27.0/24); # came
@def $weasel = ($weasel 62.99.152.178); # argos.campus-sbg
@def $zobel = ();
+@def $zobel = ($zobel 87.139.82.80/32); # exit.credativ.com
+@def $zobel = ($zobel 87.193.134.192/27); # credativ qsc
+@def $zobel = ($zobel 78.47.2.104/29); # baldur, bragi, saga
@def $luca = ();
@def $DSA_IPS = ($sgran $weasel $zobel $luca);
@def $sgran6 = (2001:4b10:100b::/48);
+@def $sgran6 = ($sgran6 2001:4b10:0000:810b::/64);
@def $weasel6 = ();
@def $weasel6 = ($weasel6 2001:826:408:200::/56); # came
@def $weasel6 = ($weasel6 2001:858:10f::/48); # anguilla
@def $zobel6 = ();
+@def $zobel6 = ($zobel6 2001:6f8:1215::/48); # baldur
+@def $zobel6 = ($zobel6 2001:6f8:928::/48); # WS2
+@def $zobel6 = ($zobel6 2a01:198:549::/48); # WGS20
@def $luca6 = ();
@def $DSA_V6_IPS = ($sgran6 $weasel6 $zobel6 $luca6);
+
+@def $USER_kibi = ();
+@def $USER_kibi = ($USER_kibi 90.80.97.98); # gruyere.kerlabs.com
+@def $USER_kibi = ($USER_kibi 88.164.242.219); # home.ikibiki.org
+@def $USER_kibi = ($USER_kibi 82.244.158.68); # @parents'
+@def $USER_aurel32 = ();
+@def $USER_aurel32 = ($USER_aurel32 88.191.82.174); # hall.aurel32.net
+@def $USER_aurel32 = ($USER_aurel32 82.232.2.251); # farad.aurel32.net
+@def $FREEBSD_SSH_ACCESS = ($DSA_IPS $USER_kibi $USER_aurel32);