2 if $::hostname in [ancina,zandonai,zelenka] {
6 if $::hostname in [klecker,merikanto,powell,ravel,rietz,senfl,sibelius,stabile] {
7 ferm::rule { 'dsa-rsync':
9 description => 'Allow rsync access',
10 rule => '&SERVICE(tcp, 873)'
16 @ferm::rule { 'dsa-udd-stunnel':
17 description => 'port 8080 for udd stunnel',
18 rule => '&SERVICE_RANGE(tcp, http-alt, ( 192.25.206.16 70.103.162.29 217.196.43.134 ))'
22 @ferm::rule { 'dsa-postgres-udd':
23 description => 'Allow postgress access',
25 rule => '&SERVICE_RANGE(tcp, 5452, ( 206.12.19.122/32 217.196.43.134/32 217.196.43.132/32 ))'
27 @ferm::rule { 'dsa-postgres-udd6':
29 description => 'Allow postgress access',
31 rule => '&SERVICE_RANGE(tcp, 5452, ( 2607:f8f0:610:4000:216:36ff:fe40:3860/128 ))'
35 @ferm::rule { 'dsa-postgres-ullmann':
36 description => 'Allow postgress access',
37 rule => '&SERVICE_RANGE(tcp, 5433, ( 206.12.19.141/32 ))'
39 @ferm::rule { 'dsa-postgres-ullmann6':
41 description => 'Allow postgress access',
42 rule => '&SERVICE_RANGE(tcp, 5433, ( 2607:f8f0:610:4000:6564:a62:ce0c:138d/128 ))'
46 @ferm::rule { 'dsa-postgres-danzi':
47 description => 'Allow postgress access',
48 rule => '&SERVICE_RANGE(tcp, 5433, ( 206.12.19.0/24 ))'
50 @ferm::rule { 'dsa-postgres-danzi6':
52 description => 'Allow postgress access',
53 rule => '&SERVICE_RANGE(tcp, 5433, ( 2607:f8f0:610:4000::/64 ))'
56 @ferm::rule { 'dsa-postgres2-danzi':
57 description => 'Allow postgress access2',
58 rule => '&SERVICE_RANGE(tcp, 5437, ( 206.12.19.0/24 ))'
60 @ferm::rule { 'dsa-postgres3-danzi':
61 description => 'Allow postgress access3',
62 rule => '&SERVICE_RANGE(tcp, 5436, ( 206.12.19.0/24 ))'
64 @ferm::rule { 'dsa-postgres4-danzi':
65 description => 'Allow postgress access4',
66 rule => '&SERVICE_RANGE(tcp, 5438, ( 206.12.19.0/24 ))'
70 @ferm::rule { 'dsa-tftp':
71 description => 'Allow tftp access',
72 rule => '&SERVICE(udp, 69)'
76 @ferm::rule { 'dsa-dhcp':
77 description => 'Allow dhcp access',
78 rule => '&SERVICE(udp, 67)'
80 @ferm::rule { 'dsa-tftp':
81 description => 'Allow tftp access',
82 rule => '&SERVICE(udp, 69)'
86 @ferm::rule { 'dsa-powell-v6-tunnel':
87 description => 'Allow powell to use V6 tunnel broker',
88 rule => 'proto ipv6 saddr 212.227.117.6 jump ACCEPT'
90 @ferm::rule { 'dsa-powell-btseed':
92 description => 'Allow powell to seed BT',
93 rule => 'proto tcp dport 8000:8100 jump ACCEPT'
97 @ferm::rule { 'dsa-syslog':
98 description => 'Allow syslog access',
99 rule => '&SERVICE_RANGE(tcp, 5140, $HOST_DEBIAN_V4)'
101 @ferm::rule { 'dsa-syslog-v6':
103 description => 'Allow syslog access',
104 rule => '&SERVICE_RANGE(tcp, 5140, $HOST_DEBIAN_V6)'
108 @ferm::rule { 'dsa-hkp':
109 domain => '(ip ip6)',
110 description => 'Allow hkp access',
111 rule => '&SERVICE(tcp, 11371)'
115 @ferm::rule { 'dsa-infinoted':
116 domain => '(ip ip6)',
117 description => 'Allow infinoted access',
118 rule => '&SERVICE(tcp, 6523)'
122 #@ferm::rule { 'dsa-bind':
123 # domain => '(ip ip6)',
124 # description => 'Allow nameserver access',
125 # rule => '&TCP_UDP_SERVICE(53)'
127 @ferm::rule { 'dsa-finger':
128 domain => '(ip ip6)',
129 description => 'Allow finger access',
130 rule => '&SERVICE(tcp, 79)'
132 @ferm::rule { 'dsa-ldap':
133 domain => '(ip ip6)',
134 description => 'Allow ldap access',
135 rule => '&SERVICE(tcp, 389)'
137 @ferm::rule { 'dsa-ldaps':
138 domain => '(ip ip6)',
139 description => 'Allow ldaps access',
140 rule => '&SERVICE(tcp, 636)'
144 ferm::module { 'nf_conntrack_sip': }
145 ferm::module { 'nf_conntrack_h323': }
147 @ferm::rule { 'dsa-sip':
148 domain => '(ip ip6)',
149 description => 'Allow sip access',
150 rule => '&TCP_UDP_SERVICE(5060)'
152 @ferm::rule { 'dsa-sipx':
153 domain => '(ip ip6)',
154 description => 'Allow sipx access',
155 rule => '&TCP_UDP_SERVICE(5080)'
159 @ferm::rule { 'dsa-notrack-dns-diamond-in':
161 description => 'NOTRACK for nameserver traffic',
163 chain => 'PREROUTING',
164 rule => 'destination 82.195.75.108 proto (tcp udp) dport 53 jump NOTRACK'
166 @ferm::rule { 'dsa-notrack-dns-diamond-out':
168 description => 'NOTRACK for nameserver traffic',
170 chain => 'PREROUTING',
171 rule => 'source 82.195.75.108 proto (tcp udp) sport 53 jump NOTRACK'
177 if $::hostname in [rautavaara,luchesi,czerny] {
178 @ferm::rule { 'dsa-to-kfreebsd':
179 description => 'Traffic routed to kfreebsd hosts',
180 chain => 'to-kfreebsd',
181 rule => 'proto icmp ACCEPT;
182 source ($FREEBSD_SSH_ACCESS $HOST_NAGIOS_V4) proto tcp dport 22 ACCEPT;
183 source ($HOST_MAILRELAY_V4 $HOST_NAGIOS_V4) proto tcp dport 25 ACCEPT;
184 source ($HOST_MUNIN_V4 $HOST_NAGIOS_V4) proto tcp dport 4949 ACCEPT;
185 source ($HOST_NAGIOS_V4) proto tcp dport 5666 ACCEPT;
186 source ($HOST_NAGIOS_V4) proto udp dport ntp ACCEPT
189 @ferm::rule { 'dsa-from-kfreebsd':
190 description => 'Traffic routed from kfreebsd vlan/bridge',
191 chain => 'from-kfreebsd',
192 rule => 'proto icmp ACCEPT;
193 proto tcp dport (21 22 80 53 443) ACCEPT;
194 proto udp dport (53 123) ACCEPT;
195 proto tcp dport 8140 daddr 82.195.75.104 ACCEPT; # puppethost
196 proto tcp dport 5140 daddr (82.195.75.99 206.12.19.121) ACCEPT; # loghost
197 proto tcp dport 11371 daddr 82.195.75.107 ACCEPT; # keyring host
198 proto tcp dport (25 submission) daddr ($HOST_MAILRELAY_V4) ACCEPT
204 @ferm::rule { 'dsa-routing':
205 description => 'forward chain',
207 rule => 'def $ADDRESS_FASCH=194.177.211.201;
208 def $ADDRESS_FIELD=194.177.211.210;
209 def $FREEBSD_HOSTS=($ADDRESS_FASCH $ADDRESS_FIELD);
212 mod state state (ESTABLISHED RELATED) ACCEPT;
213 interface vlan11 outerface eth0 jump from-kfreebsd;
214 interface eth0 destination ($FREEBSD_HOSTS) jump to-kfreebsd;
215 ULOG ulog-prefix "REJECT FORWARD: ";
216 REJECT reject-with icmp-admin-prohibited
221 @ferm::rule { 'dsa-routing':
222 description => 'forward chain',
224 rule => 'def $ADDRESS_FANO=206.12.19.110;
225 def $ADDRESS_FINZI=206.12.19.111;
226 def $ADDRESS_FISCHER=206.12.19.112;
227 def $ADDRESS_FALLA=206.12.19.117;
228 def $FREEBSD_HOSTS=($ADDRESS_FANO $ADDRESS_FINZI $ADDRESS_FISCHER $ADDRESS_FALLA);
231 mod state state (ESTABLISHED RELATED) ACCEPT;
232 interface br0 outerface br0 ACCEPT;
233 interface br1 outerface br1 ACCEPT;
235 interface br2 outerface br0 jump from-kfreebsd;
236 interface br0 destination ($ADDRESS_FISCHER $ADDRESS_FALLA) proto tcp dport 22 ACCEPT;
237 interface br0 destination ($FREEBSD_HOSTS) jump to-kfreebsd;
238 ULOG ulog-prefix "REJECT FORWARD: ";
239 REJECT reject-with icmp-admin-prohibited
244 @ferm::rule { 'dsa-routing':
245 description => 'forward chain',
247 rule => 'def $ADDRESS_FILS=82.195.75.89;
248 def $FREEBSD_HOSTS=($ADDRESS_FILS);
251 mod state state (ESTABLISHED RELATED) ACCEPT;
252 interface br0 outerface br0 ACCEPT;
253 interface br1 outerface br1 ACCEPT;
255 interface br2 outerface br0 jump from-kfreebsd;
256 interface br0 destination ($FREEBSD_HOSTS) jump to-kfreebsd;
257 ULOG ulog-prefix "REJECT FORWARD: ";
258 REJECT reject-with icmp-admin-prohibited
265 # redirect snapshot into varnish
268 @ferm::rule { 'dsa-snapshot-varnish':
269 rule => '&SERVICE(tcp, 6081)',
271 @ferm::rule { 'dsa-nat-snapshot-varnish':
273 chain => 'PREROUTING',
274 rule => 'proto tcp daddr 193.62.202.30 dport 80 REDIRECT to-ports 6081',
278 @ferm::rule { 'dsa-snapshot-varnish':
279 rule => '&SERVICE(tcp, 6081)',
281 @ferm::rule { 'dsa-nat-snapshot-varnish':
283 chain => 'PREROUTING',
284 rule => 'proto tcp daddr 206.12.19.150 dport 80 REDIRECT to-ports 6081',