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 localinfo = scope.lookupvar('site::localinfo')
25 allnodeinfo = scope.lookupvar('site::allnodeinfo')
27 %w{mailrelay nagiosmaster extranrpeclient muninmaster dbmaster static_mirror static_source static_master}.each do |role|
29 localinfo.keys.sort.each do |node|
30 if localinfo[node][role]
31 rolehost[role] << allnodeinfo[node]['ipHostNumber']
34 rolehost[role].flatten!
38 allnodeinfo.keys.sort.each do |node|
39 next unless allnodeinfo[node].has_key?('ipHostNumber')
40 dbs << allnodeinfo[node]['ipHostNumber']
45 @def $HOST_MAILRELAY_V4 = (<%= scope.function_filter_ipv4([rolehost['mailrelay']]).uniq.join(' ') %>);
46 @def $HOST_MAILRELAY_V6 = (<%= scope.function_filter_ipv6([rolehost['mailrelay']]).uniq.join(' ') %>);
47 @def $HOST_MAILRELAY = ( $HOST_MAILRELAY_V4 $HOST_MAILRELAY_V6 );
49 @def $HOST_NAGIOS_V4 = (<%= scope.function_filter_ipv4([rolehost['nagiosmaster'] + rolehost['extranrpeclient']]).uniq.join(' ') %>);
50 @def $HOST_NAGIOS_V6 = (<%= scope.function_filter_ipv6([rolehost['nagiosmaster'] + rolehost['extranrpeclient']]).uniq.join(' ') %>);
51 @def $HOST_NAGIOS = ( $HOST_NAGIOS_V4 $HOST_NAGIOS_V6 );
53 @def $HOST_MUNIN_V4 = (<%= scope.function_filter_ipv4([rolehost['muninmaster']]).uniq.join(' ') %>);
54 @def $HOST_MUNIN_V6 = (<%= scope.function_filter_ipv6([rolehost['muninmaster']]).uniq.join(' ') %>);
55 @def $HOST_MUNIN = ( $HOST_MUNIN_V4 $HOST_MUNIN_V6 );
57 @def $HOST_DB_V4 = (<%= scope.function_filter_ipv4([rolehost['dbmaster']]).uniq.join(' ') %>);
58 @def $HOST_DB_V6 = (<%= scope.function_filter_ipv6([rolehost['dbmaster']]).uniq.join(' ') %>);
59 @def $HOST_DB = ( $HOST_DB_V4 $HOST_DB_V6 );
61 @def $HOST_STATICMASTER_V4 = (<%= scope.function_filter_ipv4([rolehost['static_master']]).uniq.join(' ') %>);
62 @def $HOST_STATICMASTER_V6 = (<%= scope.function_filter_ipv6([rolehost['static_master']]).uniq.join(' ') %>);
63 @def $HOST_STATIC_V4 = (<%= scope.function_filter_ipv4([rolehost['static_mirror'] + rolehost['static_source'] + rolehost['static_master']]).uniq.join(' ') %>);
64 @def $HOST_STATIC_V6 = (<%= scope.function_filter_ipv6([rolehost['static_mirror'] + rolehost['static_source'] + rolehost['static_master']]).uniq.join(' ') %>);
66 @def $HOST_DEBIAN_V4 = (<%= scope.function_filter_ipv4([dbs]).uniq.join(' ') %>);
67 @def $HOST_DEBIAN_V6 = (<%= scope.function_filter_ipv6([dbs]).uniq.join(' ') %>);
68 @def $HOST_DEBIAN = ($HOST_DEBIAN_V4 $HOST_DEBIAN_V6);
71 @def $sgran = (91.103.132.24/29 85.158.45.51/32);
73 @def $weasel = ($weasel 86.59.118.144/28); # debian@sil
74 @def $weasel = ($weasel 86.59.21.32/29); # anguilla1
75 @def $weasel = ($weasel 86.59.30.32/28); # anguilla2
76 @def $weasel = ($weasel 141.201.0.0/16); # uni salzburg
77 @def $weasel = ($weasel 62.99.152.176/28); # campus sbg
79 @def $zobel = ($zobel 87.139.82.80/32); # exit.credativ.com
80 @def $zobel = ($zobel 87.193.134.192/27); # credativ qsc
81 @def $zobel = ($zobel 78.47.2.104/29); # baldur, bragi, saga
82 @def $zobel = ($zobel 92.198.42.24/29); # DG-i Office
83 @def $zobel = ($zobel 93.94.128.0/21); # DG-i AS
84 @def $zobel = ($zobel 195.49.152.0/22); # DG-i AS
85 @def $zobel = ($zobel 194.187.64.0/22); # DG-i AS
86 @def $luca = (64.71.152.109);
87 @def $paravoid = (62.217.125.135); # scrooge.tty.gr
89 @def $tfheen = ($tfheen 194.31.39.0/26); # office network
90 @def $tfheen = ($tfheen 195.159.200.122); # home
91 @def $tfheen = ($tfheen 77.40.254.120/29); # home
92 @def $master = (82.195.75.110); # master.debian.org
93 @def $DSA_IPS = ($sgran $weasel $zobel $luca $paravoid $tfheen $master);
95 @def $sgran6 = (2001:4b10:100b::/48);
96 @def $sgran6 = ($sgran6 2001:4b10:0000:810b::/64);
98 @def $weasel6 = ($weasel6 2001:826:408::/48); # unisbg
99 @def $weasel6 = ($weasel6 2001:858:10f::/48); # anguilla
101 @def $zobel6 = ($zobel6 2001:6f8:1215::/48); # baldur
102 @def $zobel6 = ($zobel6 2001:6f8:928::/48); # WS2
103 @def $zobel6 = ($zobel6 2a01:198:549::/48); # WGS20
104 @def $zobel6 = ($zobel6 2a01:198:6b2::/48); # AdS20
105 @def $zobel6 = ($zobel6 2a02:158::/32); # DG-i AS
107 @def $paravoid6 = (2001:648:2ffc:113:dcdb:eeff:fe5c:182b); # scrooge.tty.gr
109 @def $tfheen6 = ($tfheen6 2a02:c0:1013:1::/64); # Office
110 @def $tfheen6 = ($tfheen6 2001:840:f000:4007::/64); # Home, link
111 @def $tfheen6 = ($tfheen6 2001:840:4007::/48); # Home
112 @def $master6 = (2001:41b8:202:deb:216:36ff:fe40:4001); # master.debian.org
113 @def $DSA_V6_IPS = ($sgran6 $weasel6 $zobel6 $luca6 $paravoid6 $tfheen6 $master6);
115 @def $USER_christoph = ();
116 #@def $USER_christoph = ($USER_christoph 212.114.250.148/31);
117 #@def $USER_christoph = ($USER_christoph 128.111.48.6/32); # U of Cal at Santa Barbara, until 2013-03
118 @def $USER_aurel32 = ();
119 @def $USER_aurel32 = ($USER_aurel32 88.191.126.93); # hall.aurel32.net
120 @def $USER_aurel32 = ($USER_aurel32 82.232.2.251); # farad.aurel32.net
121 @def $USER_joerg = ();
122 @def $USER_joerg = ($USER_joerg 213.146.108.160/29);
123 @def $USER_joerg = ($USER_joerg 46.4.205.32);
124 @def $USER_joerg6 = ();
125 @def $USER_joerg6 = ($USER_joerg6 2a02:248:1005::/48);
126 @def $USER_joerg6 = ($USER_joerg6 2a01:4f8:131:1520::6667);
128 @def $BUILDD_SSH_ACCESS = ();
129 @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 194.177.211.200); # grieg
130 @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 97.107.116.29); # master
131 @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 206.12.19.5); # ravel
132 @def $BUILDD_SSH_ACCESS = ($BUILDD_SSH_ACCESS 82.195.75.110); # new-master
133 @def $FREEBSD_SSH_ACCESS = ();
134 @def $FREEBSD_SSH_ACCESS = ($FREEBSD_SSH_ACCESS $DSA_IPS $BUILDD_SSH_ACCESS);
135 @def $FREEBSD_SSH_ACCESS = ($FREEBSD_SSH_ACCESS $USER_christoph $USER_aurel32); # buildd admins
136 @def $UNGER_SSH_ACCESS = ();
137 @def $UNGER_SSH_ACCESS = ($UNGER_SSH_ACCESS $USER_joerg);
138 @def $UNGER_SSH6_ACCESS = ();
139 @def $UNGER_SSH6_ACCESS = ($UNGER_SSH6_ACCESS $USER_joerg6);