## ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git ## @def &SERVICE($proto, $port) = { proto $proto mod state state (NEW) dport $port ACCEPT; } @def &SERVICE_RANGE($proto, $port, $srange) = { proto $proto mod state state (NEW) dport $port @subchain "$port" { saddr ($srange) ACCEPT; }" } @def &TCP_UDP_SERVICE($port) = { proto (tcp udp) dport $port ACCEPT; } @def &TCP_UDP_SERVICE_RANGE($port, $srange) = { proto (tcp udp) dport $port @subchain "$port" { saddr ($srange) ACCEPT; }" } <% rolehost={} allnodeinfo = scope.lookupvar('deprecated::allnodeinfo') roles = scope.lookupvar('deprecated::roles') %w{postgres_backup_server}.each do |role| rolehost[role] = [] roles[role].each do |node| next unless allnodeinfo.has_key?(node) and allnodeinfo[node].has_key?('ipHostNumber') rolehost[role] << allnodeinfo[node]['ipHostNumber'] end rolehost[role].flatten!.sort.uniq end dbs = [] allnodeinfo.keys.sort.each do |node| next unless allnodeinfo[node].has_key?('ipHostNumber') dbs << allnodeinfo[node]['ipHostNumber'] end dbs.flatten! %> @def $HOST_PGBACKUPHOST_V4 = (<%= scope.function_filter_ipv4([rolehost['postgres_backup_server']]).uniq.join(' ') %>); @def $HOST_PGBACKUPHOST_V6 = (<%= scope.function_filter_ipv6([rolehost['postgres_backup_server']]).uniq.join(' ') %>); @def $HOST_PGBACKUPHOST = ( $HOST_PGBACKUPHOST_V4 $HOST_PGBACKUPHOST_V6 ); <% def getfastlyranges() begin data = YAML.safe_load(File.open("/srv/puppet.debian.org/puppet-facts/fastly_ranges.yaml").read) return data['addresses'] rescue return [] end end %> @def $HOST_FASTLY = (<%= getfastlyranges().join(' ') %>); @def $HOST_DEBIAN_V4 = (<%= scope.function_filter_ipv4([dbs]).uniq.join(' ') %>); @def $HOST_DEBIAN_V6 = (<%= scope.function_filter_ipv6([dbs]).uniq.join(' ') %>); @def $HOST_DEBIAN = ($HOST_DEBIAN_V4 $HOST_DEBIAN_V6); @def $weasel = (); @def $weasel = ($weasel 86.59.118.144/28); # debian@sil @def $weasel = ($weasel 86.59.21.32/29); # anguilla1 @def $weasel = ($weasel 86.59.30.32/28); # anguilla2 @def $weasel = ($weasel 213.235.231.192/26); # sil-noreply @def $weasel = ($weasel 141.201.0.0/16); # uni salzburg @def $weasel = ($weasel 194.118.0.0/16 62.46.0.0/15); # A1 Telekom @def $weasel = ($weasel 2001:826:408::/48); # unisbg @def $weasel = ($weasel 2001:858:10f::/48); # anguilla @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 94.79.138.160/29); # credativ Unitiymedia @def $zobel = ($zobel 78.47.2.104/29); # baldur, bragi, saga @def $zobel = ($zobel 217.6.179.48/29); # credativ DTAG @def $zobel = ($zobel 62.154.226.64/27); # credativ DTAG 2 @def $zobel = ($zobel 92.198.42.24/29); # DG-i Office @def $zobel = ($zobel 93.94.128.0/21); # DG-i AS @def $zobel = ($zobel 195.49.152.0/22); # DG-i AS @def $zobel = ($zobel 194.187.64.0/22); # DG-i AS @def $zobel = ($zobel 88.99.108.200/29); # buri, dag, ... @def $zobel = ($zobel 2001:6f8:1215::/48); # baldur @def $zobel = ($zobel 2001:6f8:928::/48); # WS2 @def $zobel = ($zobel 2a01:198:549::/48); # WGS20 @def $zobel = ($zobel 2a01:198:6b2::/48); # AdS20 @def $zobel = ($zobel 2a02:158::/32); # DG-i AS @def $zobel = ($zobel 2003:5b:203b::/48); # credativ DTAG v6 @def $zobel = ($zobel 2a01:4f8:10a:1504::/64); # buri, dag, .... @def $luca = (); @def $luca = ($luca 162.210.192.22); # jump snafu.emyr.net @def $luca = ($luca 2604:9a00:2010:a041:4:ffff:a2d2:c016); # jump snafu.emyr.net @def $tfheen = (); @def $tfheen = ($tfheen 178.255.151.162); # vuizook @def $tfheen = ($tfheen 51.174.0.0/15); # Altibox @def $tfheen = ($tfheen 2a02:20c8:2640::/64); # vuizook @def $tfheen = ($tfheen 2a01:798::/29); # Altibox @def $jcristau = (); @def $jcristau = ($jcristau 82.255.47.115/32); # home @def $jcristau = ($jcristau 62.210.122.202/32); # topinambour @def $jcristau = ($jcristau 2a01:e35:2ff2:f730::/61); # home @def $jcristau = ($jcristau 2001:bc8:3f1d::/48); # topinambour @def $master = (82.195.75.110 2001:41b8:202:deb:216:36ff:fe40:4001); # master.debian.org @def $people = (5.153.231.30 2001:41c8:1000:21::21:30); # paradis.debian.org @def $draghi = (82.195.75.106 2001:41b8:202:deb:1a1a:0:52c3:4b6a); # draghi.debian.org @def $DSA_IPS = ($weasel $zobel $luca $tfheen $jcristau $master $people $draghi);