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}.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_DNS_GEO_V4 = (<%= scope.function_filter_ipv4([rolehost['dns_geo']]).uniq.join(' ') %>);
70 @def $HOST_DNS_GEO_V6 = (<%= scope.function_filter_ipv6([rolehost['dns_geo']]).uniq.join(' ') %>);
71 @def $HOST_EASYDNS_V4 = (64.68.200.91);
72 @def $HOST_RCODE0_V4 = (83.136.34.0/27);
73 @def $HOST_RCODE0_V6 = (2A02:850:8::/47);
74 @def $HOST_NETNOD_V4 = (192.71.80.0/24 192.36.144.222 192.36.144.218);
76 @def $HOST_DEBIAN_V4 = (<%= scope.function_filter_ipv4([dbs]).uniq.join(' ') %>);
77 @def $HOST_DEBIAN_V6 = (<%= scope.function_filter_ipv6([dbs]).uniq.join(' ') %>);
78 @def $HOST_DEBIAN = ($HOST_DEBIAN_V4 $HOST_DEBIAN_V6);
81 @def $sgran = (91.103.132.24/29 85.158.45.51/32);
83 @def $weasel = ($weasel 86.59.118.144/28); # debian@sil
84 @def $weasel = ($weasel 86.59.21.32/29); # anguilla1
85 @def $weasel = ($weasel 86.59.30.32/28); # anguilla2
86 @def $weasel = ($weasel 141.201.0.0/16); # uni salzburg
87 @def $weasel = ($weasel 62.99.152.176/28); # campus sbg
89 @def $zobel = ($zobel 87.139.82.80/32); # exit.credativ.com
90 @def $zobel = ($zobel 87.193.134.192/27); # credativ qsc
91 @def $zobel = ($zobel 94.79.138.160/29); # credativ Unitiymedia
92 @def $zobel = ($zobel 78.47.2.104/29); # baldur, bragi, saga
93 @def $zobel = ($zobel 217.6.179.48/29); # credativ DTAG
94 @def $zobel = ($zobel 62.154.226.64/27); # credativ DTAG 2
95 @def $zobel = ($zobel 92.198.42.24/29); # DG-i Office
96 @def $zobel = ($zobel 93.94.128.0/21); # DG-i AS
97 @def $zobel = ($zobel 195.49.152.0/22); # DG-i AS
98 @def $zobel = ($zobel 194.187.64.0/22); # DG-i AS
100 @def $luca = ($luca 69.4.89.5); # jump fubar.emyr.net
101 @def $luca = ($luca 137.82.37.25); # jump eye.iun.ubc.ca
102 @def $luca = ($luca 50.67.19.106); # home
103 @def $luca = ($luca 142.103.249.101); # work
104 @def $paravoid = (62.217.125.135); # scrooge.tty.gr
106 @def $tfheen = ($tfheen 195.159.200.122); # home
107 @def $tfheen = ($tfheen 77.40.254.120/29); # home
109 @def $jcristau = ($jcristau 82.225.74.107/32); # home
110 @def $jcristau = ($jcristau 109.190.188.123/32 109.190.188.138/32 109.190.107.82/32); # office
111 @def $master = (82.195.75.110); # master.debian.org
112 @def $DSA_IPS = ($sgran $weasel $zobel $luca $paravoid $tfheen $jcristau $master);
114 @def $sgran6 = (2001:4b10:100b::/48);
115 @def $sgran6 = ($sgran6 2001:4b10:0000:810b::/64);
117 @def $weasel6 = ($weasel6 2001:826:408::/48); # unisbg
118 @def $weasel6 = ($weasel6 2001:858:10f::/48); # anguilla
120 @def $zobel6 = ($zobel6 2001:6f8:1215::/48); # baldur
121 @def $zobel6 = ($zobel6 2001:6f8:928::/48); # WS2
122 @def $zobel6 = ($zobel6 2a01:198:549::/48); # WGS20
123 @def $zobel6 = ($zobel6 2a01:198:6b2::/48); # AdS20
124 @def $zobel6 = ($zobel6 2a02:158::/32); # DG-i AS
125 @def $zobel6 = ($zobel6 2003:5b:203b::/48); # credativ DTAG v6
127 @def $paravoid6 = (2001:648:2ffc:113:dcdb:eeff:fe5c:182b); # scrooge.tty.gr
129 @def $tfheen6 = ($tfheen6 2001:840:f000:4007::/64); # Home, link
130 @def $tfheen6 = ($tfheen6 2001:840:4007::/48); # Home
131 @def $jcristau6 = (2a01:e35:2e14:a6b0::/64); # home
132 @def $master6 = (2001:41b8:202:deb:216:36ff:fe40:4001); # master.debian.org
133 @def $DSA_V6_IPS = ($sgran6 $weasel6 $zobel6 $luca6 $paravoid6 $tfheen6 $jcristau6 $master6);
135 @def $USER_christoph = ();
136 #@def $USER_christoph = ($USER_christoph 212.114.250.148/31);
137 #@def $USER_christoph = ($USER_christoph 128.111.48.6/32); # U of Cal at Santa Barbara, until 2013-03
138 @def $USER_joerg = ();
139 @def $USER_joerg = ($USER_joerg 213.146.108.160/29);
140 @def $USER_joerg = ($USER_joerg 46.4.205.32);
141 @def $USER_joerg6 = ();
142 @def $USER_joerg6 = ($USER_joerg6 2a02:248:1005::/48);
143 @def $USER_joerg6 = ($USER_joerg6 2a01:4f8:131:1520::6667);
145 @def $BUILDD_SSH_ACCESS = ();
146 @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 5.153.231.18); # wuiet
147 @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 97.107.116.29); # master
148 @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 82.195.75.110); # new-master
149 @def $FREEBSD_SSH_ACCESS = ();
150 @def $FREEBSD_SSH_ACCESS = ($FREEBSD_SSH_ACCESS $DSA_IPS $BUILDD_SSH_ACCESS);
151 @def $FREEBSD_SSH_ACCESS = ($FREEBSD_SSH_ACCESS $USER_christoph); # buildd admins