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('site::allnodeinfo')
25 roles = scope.lookupvar('site::roles')
27 %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|
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_DB_V4 = (<%= scope.function_filter_ipv4([rolehost['dbmaster']]).uniq.join(' ') %>);
57 @def $HOST_DB_V6 = (<%= scope.function_filter_ipv6([rolehost['dbmaster']]).uniq.join(' ') %>);
58 @def $HOST_DB = ( $HOST_DB_V4 $HOST_DB_V6 );
60 @def $HOST_PGBACKUPHOST_V4 = (<%= scope.function_filter_ipv4([rolehost['postgres_backup_server']]).uniq.join(' ') %>);
61 @def $HOST_PGBACKUPHOST_V6 = (<%= scope.function_filter_ipv6([rolehost['postgres_backup_server']]).uniq.join(' ') %>);
62 @def $HOST_PGBACKUPHOST = ( $HOST_PGBACKUPHOST_V4 $HOST_PGBACKUPHOST_V6 );
64 @def $HOST_STATICMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['static_master']]).uniq.join(' ') %>);
65 @def $HOST_STATICMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['static_master']]).uniq.join(' ') %>);
66 @def $HOST_STATIC_V4 = (<%= scope.function_filter_ipv4([rolehost['static_mirror'] + rolehost['static_source'] + rolehost['static_master']]).uniq.join(' ') %>);
67 @def $HOST_STATIC_V6 = (<%= scope.function_filter_ipv6([rolehost['static_mirror'] + rolehost['static_source'] + rolehost['static_master']]).uniq.join(' ') %>);
69 @def $HOST_FTPMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['ftp_master']]).uniq.join(' ') %>);
70 @def $HOST_FTPMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['ftp_master']]).uniq.join(' ') %>);
71 @def $HOST_SECMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['security_master']]).uniq.join(' ') %>);
72 @def $HOST_SECMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['security_master']]).uniq.join(' ') %>);
73 @def $HOST_PORTSMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['ports_master']]).uniq.join(' ') %>);
74 @def $HOST_PORTSMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['ports_master']]).uniq.join(' ') %>);
75 @def $HOST_ARCHIVEMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['historical_master']]).uniq.join(' ') %>);
76 @def $HOST_ARCHIVEMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['historical_master']]).uniq.join(' ') %>);
77 @def $HOST_MIRRORMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['mirrormaster']]).uniq.join(' ') %>);
78 @def $HOST_MIRRORMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['mirrormaster']]).uniq.join(' ') %>);
79 @def $HOST_SYNCPROXY_V4 = (<%= scope.function_filter_ipv4([rolehost['syncproxy']]).uniq.join(' ') %>);
80 @def $HOST_SYNCPROXY_V6 = (<%= scope.function_filter_ipv6([rolehost['syncproxy']]).uniq.join(' ') %>);
81 # syncproxy.au syncproxy2.eu syncproxy3.eu syncproxy4.eu
82 @def $HOST_SYNCPROXY_V4 = ($HOST_SYNCPROXY_V4 150.203.164.60 130.89.148.10 5.153.231.9 217.196.149.237);
83 @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);
84 # syncproxy.cna syncproxy.na syncproxy2.wna syncproxy3.wna
85 @def $HOST_SYNCPROXY_V4 = ($HOST_SYNCPROXY_V4 128.101.240.216 128.31.0.64 149.20.4.16 209.87.16.40);
86 @def $HOST_SYNCPROXY_V6 = ($HOST_SYNCPROXY_V6 2607:ea00:101:3c0b::1deb:216 2001:470:8b2d:bb8::801f:40 2001:4f8:1:c::16 2607:f8f0:614:1::1274:40);
88 @def $HOST_DNS_GEO_V4 = (<%= scope.function_filter_ipv4([rolehost['dns_geo']]).uniq.join(' ') %>);
89 @def $HOST_DNS_GEO_V6 = (<%= scope.function_filter_ipv6([rolehost['dns_geo']]).uniq.join(' ') %>);
90 @def $HOST_DNS_GEO = ($HOST_DNS_GEO_V4 $HOST_DNS_GEO_V6);
91 @def $HOST_EASYDNS = (64.68.200.91 205.210.42.80);
92 @def $HOST_RCODE0 = (83.136.34.0/27 2A02:850:8::/47);
93 @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);
95 @def $HOST_DNSPRIMARY_V4 = (<%= scope.function_filter_ipv4([rolehost['dns_primary']]).uniq.join(' ') %>);
96 @def $HOST_DNSPRIMARY_V6 = (<%= scope.function_filter_ipv6([rolehost['dns_primary']]).uniq.join(' ') %>);
97 @def $HOST_DNSPRIMARY = ($HOST_DNSPRIMARY_V4 $HOST_DNSPRIMARY_V6);
100 def getfastlyranges()
102 data = YAML.safe_load(File.open("/srv/puppet.debian.org/puppet-facts/fastly_ranges.yaml").read)
103 return data['addresses']
109 @def $HOST_FASTLY = (<%= getfastlyranges().join(' ') %>);
111 @def $HOST_DEBIAN_V4 = (<%= scope.function_filter_ipv4([dbs]).uniq.join(' ') %>);
112 @def $HOST_DEBIAN_V6 = (<%= scope.function_filter_ipv6([dbs]).uniq.join(' ') %>);
113 @def $HOST_DEBIAN = ($HOST_DEBIAN_V4 $HOST_DEBIAN_V6);
117 @def $weasel = ($weasel 86.59.118.144/28); # debian@sil
118 @def $weasel = ($weasel 86.59.21.32/29); # anguilla1
119 @def $weasel = ($weasel 86.59.30.32/28); # anguilla2
120 @def $weasel = ($weasel 213.235.231.192/26); # sil-noreply
121 @def $weasel = ($weasel 141.201.0.0/16); # uni salzburg
122 @def $weasel = ($weasel 62.99.152.176/28); # campus sbg
123 @def $weasel = ($weasel 194.118.0.0/16 62.46.0.0/15); # A1 Telekom
125 @def $zobel = ($zobel 87.139.82.80/32); # exit.credativ.com
126 @def $zobel = ($zobel 87.193.134.192/27); # credativ qsc
127 @def $zobel = ($zobel 94.79.138.160/29); # credativ Unitiymedia
128 @def $zobel = ($zobel 78.47.2.104/29); # baldur, bragi, saga
129 @def $zobel = ($zobel 217.6.179.48/29); # credativ DTAG
130 @def $zobel = ($zobel 62.154.226.64/27); # credativ DTAG 2
131 @def $zobel = ($zobel 92.198.42.24/29); # DG-i Office
132 @def $zobel = ($zobel 93.94.128.0/21); # DG-i AS
133 @def $zobel = ($zobel 195.49.152.0/22); # DG-i AS
134 @def $zobel = ($zobel 194.187.64.0/22); # DG-i AS
135 @def $zobel = ($zobel 88.99.108.200/29); # buri, dag, ...
137 @def $luca = ($luca 162.210.192.22); # jump snafu.emyr.net
139 @def $tfheen = ($tfheen 178.255.151.162); # vuizook
140 @def $tfheen = ($tfheen 51.174.0.0/15); # Altibox
142 @def $jcristau = ($jcristau 82.255.47.115/32); # home
143 @def $jcristau = ($jcristau 62.210.122.202/32); # topinambour
144 @def $master = (82.195.75.110); # master.debian.org
145 @def $people = (5.153.231.30); # paradis.debian.org
146 @def $DSA_IPS = ($weasel $zobel $luca $tfheen $jcristau $master $people);
149 @def $weasel6 = ($weasel6 2001:826:408::/48); # unisbg
150 @def $weasel6 = ($weasel6 2001:858:10f::/48); # anguilla
152 @def $zobel6 = ($zobel6 2001:6f8:1215::/48); # baldur
153 @def $zobel6 = ($zobel6 2001:6f8:928::/48); # WS2
154 @def $zobel6 = ($zobel6 2a01:198:549::/48); # WGS20
155 @def $zobel6 = ($zobel6 2a01:198:6b2::/48); # AdS20
156 @def $zobel6 = ($zobel6 2a02:158::/32); # DG-i AS
157 @def $zobel6 = ($zobel6 2003:5b:203b::/48); # credativ DTAG v6
158 @def $zobel6 = ($zobel6 2a01:4f8:10a:1504::/64); # buri, dag, ....
160 @def $luca6 = ($luca6 2604:9a00:2010:a041:4:ffff:a2d2:c016); # jump snafu.emyr.net
162 @def $tfheen6 = ($tfheen6 2a02:20c8:2640::/64); # vuizook
163 @def $tfheen6 = ($tfheen6 2a01:798::/29); # Altibox
164 @def $jcristau6 = ();
165 @def $jcristau6 = ($jcristau6 2a01:e35:2ff2:f730::/61); # home
166 @def $jcristau6 = ($jcristau6 2001:bc8:3f1d::/48); # topinambour
167 @def $master6 = (2001:41b8:202:deb:216:36ff:fe40:4001); # master.debian.org
168 @def $DSA_V6_IPS = ($weasel6 $zobel6 $luca6 $tfheen6 $jcristau6 $master6);
170 @def $USER_joerg = ();
171 @def $USER_joerg = ($USER_joerg 213.146.108.160/29);
172 @def $USER_joerg = ($USER_joerg 46.4.205.32);
173 @def $USER_joerg6 = ();
174 @def $USER_joerg6 = ($USER_joerg6 2a02:248:1005::/48);
175 @def $USER_joerg6 = ($USER_joerg6 2a01:4f8:131:1520::6667);
177 @def $BUILDD_SSH_ACCESS = ();
178 @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 5.153.231.18); # wuiet
179 @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 97.107.116.29); # master
180 @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 82.195.75.110); # new-master