2 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
3 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
6 @def &SERVICE($proto, $port) = {
7 proto $proto mod state state (NEW) dport $port ACCEPT;
10 @def &SERVICE_RANGE($proto, $port, $srange) = {
11 proto $proto mod state state (NEW) dport $port @subchain "$port" { saddr ($srange) ACCEPT; }"
14 @def &TCP_UDP_SERVICE($port) = {
15 proto (tcp udp) dport $port ACCEPT;
18 @def &TCP_UDP_SERVICE_RANGE($port, $srange) = {
19 proto (tcp udp) dport $port @subchain "$port" { saddr ($srange) ACCEPT; }"
24 allnodeinfo = scope.lookupvar('deprecated::allnodeinfo')
25 roles = scope.lookupvar('deprecated::roles')
27 %w{mailrelay nagiosmaster extranrpeclient muninmaster postgres_backup_server syncproxy security_master ftp_master historical_master ports_master mirrormaster}.each do |role|
29 roles[role].each do |node|
30 next unless allnodeinfo.has_key?(node) and allnodeinfo[node].has_key?('ipHostNumber')
31 rolehost[role] << allnodeinfo[node]['ipHostNumber']
33 rolehost[role].flatten!.sort.uniq
37 allnodeinfo.keys.sort.each do |node|
38 next unless allnodeinfo[node].has_key?('ipHostNumber')
39 dbs << allnodeinfo[node]['ipHostNumber']
44 @def $HOST_MAILRELAY_V4 = (<%= scope.function_filter_ipv4([rolehost['mailrelay']]).uniq.join(' ') %>);
45 @def $HOST_MAILRELAY_V6 = (<%= scope.function_filter_ipv6([rolehost['mailrelay']]).uniq.join(' ') %>);
46 @def $HOST_MAILRELAY = ( $HOST_MAILRELAY_V4 $HOST_MAILRELAY_V6 );
48 @def $HOST_NAGIOS_V4 = (<%= scope.function_filter_ipv4([rolehost['nagiosmaster'] + rolehost['extranrpeclient']]).uniq.join(' ') %>);
49 @def $HOST_NAGIOS_V6 = (<%= scope.function_filter_ipv6([rolehost['nagiosmaster'] + rolehost['extranrpeclient']]).uniq.join(' ') %>);
50 @def $HOST_NAGIOS = ( $HOST_NAGIOS_V4 $HOST_NAGIOS_V6 );
52 @def $HOST_MUNIN_V4 = (<%= scope.function_filter_ipv4([rolehost['muninmaster']]).uniq.join(' ') %>);
53 @def $HOST_MUNIN_V6 = (<%= scope.function_filter_ipv6([rolehost['muninmaster']]).uniq.join(' ') %>);
54 @def $HOST_MUNIN = ( $HOST_MUNIN_V4 $HOST_MUNIN_V6 );
56 @def $HOST_PGBACKUPHOST_V4 = (<%= scope.function_filter_ipv4([rolehost['postgres_backup_server']]).uniq.join(' ') %>);
57 @def $HOST_PGBACKUPHOST_V6 = (<%= scope.function_filter_ipv6([rolehost['postgres_backup_server']]).uniq.join(' ') %>);
58 @def $HOST_PGBACKUPHOST = ( $HOST_PGBACKUPHOST_V4 $HOST_PGBACKUPHOST_V6 );
60 @def $HOST_FTPMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['ftp_master']]).uniq.join(' ') %>);
61 @def $HOST_FTPMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['ftp_master']]).uniq.join(' ') %>);
62 @def $HOST_SECMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['security_master']]).uniq.join(' ') %>);
63 @def $HOST_SECMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['security_master']]).uniq.join(' ') %>);
64 @def $HOST_PORTSMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['ports_master']]).uniq.join(' ') %>);
65 @def $HOST_PORTSMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['ports_master']]).uniq.join(' ') %>);
66 @def $HOST_ARCHIVEMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['historical_master']]).uniq.join(' ') %>);
67 @def $HOST_ARCHIVEMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['historical_master']]).uniq.join(' ') %>);
68 @def $HOST_MIRRORMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['mirrormaster']]).uniq.join(' ') %>);
69 @def $HOST_MIRRORMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['mirrormaster']]).uniq.join(' ') %>);
70 @def $HOST_SYNCPROXY_V4 = (<%= scope.function_filter_ipv4([rolehost['syncproxy']]).uniq.join(' ') %>);
71 @def $HOST_SYNCPROXY_V6 = (<%= scope.function_filter_ipv6([rolehost['syncproxy']]).uniq.join(' ') %>);
72 # syncproxy.au syncproxy2.eu syncproxy3.eu syncproxy4.eu
73 @def $HOST_SYNCPROXY_V4 = ($HOST_SYNCPROXY_V4 150.203.164.60 130.89.148.10 5.153.231.9 217.196.149.237);
74 @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);
75 # syncproxy.cna syncproxy.na syncproxy2.wna syncproxy3.wna
76 @def $HOST_SYNCPROXY_V4 = ($HOST_SYNCPROXY_V4 128.101.240.216 128.31.0.64 149.20.4.16 209.87.16.40);
77 @def $HOST_SYNCPROXY_V6 = ($HOST_SYNCPROXY_V6 2607:ea00:101:3c0b::1deb:216 2603:400a:ffff:bb8::801f:40 2001:4f8:1:c::16 2607:f8f0:614:1::1274:40);
83 data = YAML.safe_load(File.open("/srv/puppet.debian.org/puppet-facts/fastly_ranges.yaml").read)
84 return data['addresses']
90 @def $HOST_FASTLY = (<%= getfastlyranges().join(' ') %>);
92 @def $HOST_DEBIAN_V4 = (<%= scope.function_filter_ipv4([dbs]).uniq.join(' ') %>);
93 @def $HOST_DEBIAN_V6 = (<%= scope.function_filter_ipv6([dbs]).uniq.join(' ') %>);
94 @def $HOST_DEBIAN = ($HOST_DEBIAN_V4 $HOST_DEBIAN_V6);
98 @def $weasel = ($weasel 86.59.118.144/28); # debian@sil
99 @def $weasel = ($weasel 86.59.21.32/29); # anguilla1
100 @def $weasel = ($weasel 86.59.30.32/28); # anguilla2
101 @def $weasel = ($weasel 213.235.231.192/26); # sil-noreply
102 @def $weasel = ($weasel 141.201.0.0/16); # uni salzburg
103 @def $weasel = ($weasel 62.99.152.176/28); # campus sbg
104 @def $weasel = ($weasel 194.118.0.0/16 62.46.0.0/15); # A1 Telekom
106 @def $zobel = ($zobel 87.139.82.80/32); # exit.credativ.com
107 @def $zobel = ($zobel 87.193.134.192/27); # credativ qsc
108 @def $zobel = ($zobel 94.79.138.160/29); # credativ Unitiymedia
109 @def $zobel = ($zobel 78.47.2.104/29); # baldur, bragi, saga
110 @def $zobel = ($zobel 217.6.179.48/29); # credativ DTAG
111 @def $zobel = ($zobel 62.154.226.64/27); # credativ DTAG 2
112 @def $zobel = ($zobel 92.198.42.24/29); # DG-i Office
113 @def $zobel = ($zobel 93.94.128.0/21); # DG-i AS
114 @def $zobel = ($zobel 195.49.152.0/22); # DG-i AS
115 @def $zobel = ($zobel 194.187.64.0/22); # DG-i AS
116 @def $zobel = ($zobel 88.99.108.200/29); # buri, dag, ...
118 @def $luca = ($luca 162.210.192.22); # jump snafu.emyr.net
120 @def $tfheen = ($tfheen 178.255.151.162); # vuizook
121 @def $tfheen = ($tfheen 51.174.0.0/15); # Altibox
123 @def $jcristau = ($jcristau 82.255.47.115/32); # home
124 @def $jcristau = ($jcristau 62.210.122.202/32); # topinambour
125 @def $master = (82.195.75.110); # master.debian.org
126 @def $people = (5.153.231.30); # paradis.debian.org
127 @def $DSA_IPS = ($weasel $zobel $luca $tfheen $jcristau $master $people);
130 @def $weasel6 = ($weasel6 2001:826:408::/48); # unisbg
131 @def $weasel6 = ($weasel6 2001:858:10f::/48); # anguilla
133 @def $zobel6 = ($zobel6 2001:6f8:1215::/48); # baldur
134 @def $zobel6 = ($zobel6 2001:6f8:928::/48); # WS2
135 @def $zobel6 = ($zobel6 2a01:198:549::/48); # WGS20
136 @def $zobel6 = ($zobel6 2a01:198:6b2::/48); # AdS20
137 @def $zobel6 = ($zobel6 2a02:158::/32); # DG-i AS
138 @def $zobel6 = ($zobel6 2003:5b:203b::/48); # credativ DTAG v6
139 @def $zobel6 = ($zobel6 2a01:4f8:10a:1504::/64); # buri, dag, ....
141 @def $luca6 = ($luca6 2604:9a00:2010:a041:4:ffff:a2d2:c016); # jump snafu.emyr.net
143 @def $tfheen6 = ($tfheen6 2a02:20c8:2640::/64); # vuizook
144 @def $tfheen6 = ($tfheen6 2a01:798::/29); # Altibox
145 @def $jcristau6 = ();
146 @def $jcristau6 = ($jcristau6 2a01:e35:2ff2:f730::/61); # home
147 @def $jcristau6 = ($jcristau6 2001:bc8:3f1d::/48); # topinambour
148 @def $master6 = (2001:41b8:202:deb:216:36ff:fe40:4001); # master.debian.org
149 @def $DSA_V6_IPS = ($weasel6 $zobel6 $luca6 $tfheen6 $jcristau6 $master6);
151 @def $USER_joerg = ();
152 @def $USER_joerg = ($USER_joerg 213.146.108.160/29);
153 @def $USER_joerg = ($USER_joerg 46.4.205.32);
154 @def $USER_joerg6 = ();
155 @def $USER_joerg6 = ($USER_joerg6 2a02:248:1005::/48);
156 @def $USER_joerg6 = ($USER_joerg6 2a01:4f8:131:1520::6667);
158 @def $BUILDD_SSH_ACCESS = ();
159 @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 5.153.231.18); # wuiet
160 @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 97.107.116.29); # master
161 @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 82.195.75.110); # new-master