## ## 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('site::allnodeinfo') roles = scope.lookupvar('site::roles') %w{mailrelay nagiosmaster extranrpeclient muninmaster dbmaster static_mirror static_source static_master dns_geo postgres_backup_server syncproxy security_master ftp_master historical_master ports_master mirrormaster dns_primary}.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_MAILRELAY_V4 = (<%= scope.function_filter_ipv4([rolehost['mailrelay']]).uniq.join(' ') %>); @def $HOST_MAILRELAY_V6 = (<%= scope.function_filter_ipv6([rolehost['mailrelay']]).uniq.join(' ') %>); @def $HOST_MAILRELAY = ( $HOST_MAILRELAY_V4 $HOST_MAILRELAY_V6 ); @def $HOST_NAGIOS_V4 = (<%= scope.function_filter_ipv4([rolehost['nagiosmaster'] + rolehost['extranrpeclient']]).uniq.join(' ') %>); @def $HOST_NAGIOS_V6 = (<%= scope.function_filter_ipv6([rolehost['nagiosmaster'] + rolehost['extranrpeclient']]).uniq.join(' ') %>); @def $HOST_NAGIOS = ( $HOST_NAGIOS_V4 $HOST_NAGIOS_V6 ); @def $HOST_MUNIN_V4 = (<%= scope.function_filter_ipv4([rolehost['muninmaster']]).uniq.join(' ') %>); @def $HOST_MUNIN_V6 = (<%= scope.function_filter_ipv6([rolehost['muninmaster']]).uniq.join(' ') %>); @def $HOST_MUNIN = ( $HOST_MUNIN_V4 $HOST_MUNIN_V6 ); @def $HOST_DB_V4 = (<%= scope.function_filter_ipv4([rolehost['dbmaster']]).uniq.join(' ') %>); @def $HOST_DB_V6 = (<%= scope.function_filter_ipv6([rolehost['dbmaster']]).uniq.join(' ') %>); @def $HOST_DB = ( $HOST_DB_V4 $HOST_DB_V6 ); @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 $HOST_STATICMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['static_master']]).uniq.join(' ') %>); @def $HOST_STATICMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['static_master']]).uniq.join(' ') %>); @def $HOST_STATIC_V4 = (<%= scope.function_filter_ipv4([rolehost['static_mirror'] + rolehost['static_source'] + rolehost['static_master']]).uniq.join(' ') %>); @def $HOST_STATIC_V6 = (<%= scope.function_filter_ipv6([rolehost['static_mirror'] + rolehost['static_source'] + rolehost['static_master']]).uniq.join(' ') %>); @def $HOST_FTPMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['ftp_master']]).uniq.join(' ') %>); @def $HOST_FTPMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['ftp_master']]).uniq.join(' ') %>); @def $HOST_SECMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['security_master']]).uniq.join(' ') %>); @def $HOST_SECMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['security_master']]).uniq.join(' ') %>); @def $HOST_PORTSMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['ports_master']]).uniq.join(' ') %>); @def $HOST_PORTSMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['ports_master']]).uniq.join(' ') %>); @def $HOST_ARCHIVEMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['historical_master']]).uniq.join(' ') %>); @def $HOST_ARCHIVEMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['historical_master']]).uniq.join(' ') %>); @def $HOST_MIRRORMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['mirrormaster']]).uniq.join(' ') %>); @def $HOST_MIRRORMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['mirrormaster']]).uniq.join(' ') %>); @def $HOST_SYNCPROXY_V4 = (<%= scope.function_filter_ipv4([rolehost['syncproxy']]).uniq.join(' ') %>); @def $HOST_SYNCPROXY_V6 = (<%= scope.function_filter_ipv6([rolehost['syncproxy']]).uniq.join(' ') %>); # syncproxy.au syncproxy2.eu syncproxy3.eu syncproxy4.eu @def $HOST_SYNCPROXY_V4 = ($HOST_SYNCPROXY_V4 150.203.164.60 130.89.148.10 5.153.231.9 217.196.149.237); @def $HOST_SYNCPROXY_V6 = ($HOST_SYNCPROXY_V6 2001:388:1034:2900::3c 2001:67c:2564:a119::148:10 2001:41c8:1000:21::21:9 2a02:16a8:dc41:100::237); # syncproxy.cna syncproxy.na syncproxy2.wna syncproxy3.wna @def $HOST_SYNCPROXY_V4 = ($HOST_SYNCPROXY_V4 128.101.240.216 128.31.0.64 149.20.4.16 209.87.16.40); @def $HOST_SYNCPROXY_V6 = ($HOST_SYNCPROXY_V6 2607:ea00:101:3c0b::1deb:216 2001:4f8:1:c::16 2607:f8f0:614:1::1274:40); @def $HOST_DNS_GEO_V4 = (<%= scope.function_filter_ipv4([rolehost['dns_geo']]).uniq.join(' ') %>); @def $HOST_DNS_GEO_V6 = (<%= scope.function_filter_ipv6([rolehost['dns_geo']]).uniq.join(' ') %>); @def $HOST_DNS_GEO = ($HOST_DNS_GEO_V6 HOST_DNS_GEO_V4); @def $HOST_EASYDNS = (64.68.200.91 205.210.42.80); @def $HOST_RCODE0 = (83.136.34.0/27 2A02:850:8::/47); @def $HOST_NETNOD = (192.71.80.0/24 192.36.144.222 192.36.144.218 194.146.105.24 194.146.105.25 2a01:3f0:0:27::24 2a01:3f0:0:28::25); @def $HOST_DNSPRIMARY_V4 = (<%= scope.function_filter_ipv4([rolehost['dns_primary']]).uniq.join(' ') %>); @def $HOST_DNSPRIMARY_V6 = (<%= scope.function_filter_ipv6([rolehost['dns_primary']]).uniq.join(' ') %>); @def $HOST_DNSPRIMARY = ($HOST_DNSPRIMARY_V4 $HOST_DNSPRIMARY_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 62.99.152.176/28); # campus sbg @def $weasel = ($weasel 194.118.0.0/16 62.46.0.0/15); # A1 Telekom @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 $luca = (); @def $luca = ($luca 162.210.192.22); # jump snafu.emyr.net @def $tfheen = (); @def $tfheen = ($tfheen 178.255.151.162); # vuizook @def $tfheen = ($tfheen 51.174.0.0/15); # Altibox @def $jcristau = (); @def $jcristau = ($jcristau 82.255.47.115/32); # home @def $jcristau = ($jcristau 62.210.122.202/32); # topinambour @def $master = (82.195.75.110); # master.debian.org @def $people = (5.153.231.30); # paradis.debian.org @def $DSA_IPS = ($weasel $zobel $luca $tfheen $jcristau $master $people); @def $weasel6 = (); @def $weasel6 = ($weasel6 2001:826:408::/48); # unisbg @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 $zobel6 = ($zobel6 2a01:198:6b2::/48); # AdS20 @def $zobel6 = ($zobel6 2a02:158::/32); # DG-i AS @def $zobel6 = ($zobel6 2003:5b:203b::/48); # credativ DTAG v6 @def $zobel6 = ($zobel6 2a01:4f8:10a:1504::/64); # buri, dag, .... @def $luca6 = (); @def $luca6 = ($luca6 2604:9a00:2010:a041:4:ffff:a2d2:c016); # jump snafu.emyr.net @def $tfheen6 = (); @def $tfheen6 = ($tfheen6 2a02:20c8:2640::/64); # vuizook @def $tfheen6 = ($tfheen6 2a01:798::/29); # Altibox @def $jcristau6 = (); @def $jcristau6 = ($jcristau6 2a01:e35:2ff2:f730::/61); # home @def $jcristau6 = ($jcristau6 2001:bc8:3f1d::/48); # topinambour @def $master6 = (2001:41b8:202:deb:216:36ff:fe40:4001); # master.debian.org @def $DSA_V6_IPS = ($weasel6 $zobel6 $luca6 $tfheen6 $jcristau6 $master6); @def $USER_christoph = (); #@def $USER_christoph = ($USER_christoph 212.114.250.148/31); #@def $USER_christoph = ($USER_christoph 128.111.48.6/32); # U of Cal at Santa Barbara, until 2013-03 @def $USER_joerg = (); @def $USER_joerg = ($USER_joerg 213.146.108.160/29); @def $USER_joerg = ($USER_joerg 46.4.205.32); @def $USER_joerg6 = (); @def $USER_joerg6 = ($USER_joerg6 2a02:248:1005::/48); @def $USER_joerg6 = ($USER_joerg6 2a01:4f8:131:1520::6667); @def $BUILDD_SSH_ACCESS = (); @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 5.153.231.18); # wuiet @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 97.107.116.29); # master @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 82.195.75.110); # new-master @def $FREEBSD_SSH_ACCESS = (); @def $FREEBSD_SSH_ACCESS = ($FREEBSD_SSH_ACCESS $DSA_IPS $BUILDD_SSH_ACCESS); @def $FREEBSD_SSH_ACCESS = ($FREEBSD_SSH_ACCESS $USER_christoph); # buildd admins