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 { 'dc11-icecast':
160 domain => '(ip ip6)',
161 description => 'Allow icecast access',
162 rule => '&SERVICE(tcp, 8000)'
168 if $::hostname in [rautavaara,luchesi,czerny] {
169 @ferm::rule { 'dsa-to-kfreebsd':
170 description => 'Traffic routed to kfreebsd hosts',
171 chain => 'to-kfreebsd',
172 rule => 'proto icmp ACCEPT;
173 source ($FREEBSD_SSH_ACCESS $HOST_NAGIOS_V4) proto tcp dport 22 ACCEPT;
174 source ($HOST_MAILRELAY_V4 $HOST_NAGIOS_V4) proto tcp dport 25 ACCEPT;
175 source ($HOST_MUNIN_V4 $HOST_NAGIOS_V4) proto tcp dport 4949 ACCEPT;
176 source ($HOST_NAGIOS_V4) proto tcp dport 5666 ACCEPT;
177 source ($HOST_NAGIOS_V4) proto udp dport ntp ACCEPT
180 @ferm::rule { 'dsa-from-kfreebsd':
181 description => 'Traffic routed from kfreebsd vlan/bridge',
182 chain => 'from-kfreebsd',
183 rule => 'proto icmp ACCEPT;
184 proto tcp dport (21 22 80 53 443) ACCEPT;
185 proto udp dport (53 123) ACCEPT;
186 proto tcp dport 8140 daddr 82.195.75.104 ACCEPT; # puppethost
187 proto tcp dport 5140 daddr (82.195.75.99 206.12.19.121) ACCEPT; # loghost
188 proto tcp dport 11371 daddr 82.195.75.107 ACCEPT; # keyring host
189 proto tcp dport (25 submission) daddr ($HOST_MAILRELAY_V4) ACCEPT
195 @ferm::rule { 'dsa-routing':
196 description => 'forward chain',
198 rule => 'def $ADDRESS_FASCH=194.177.211.201;
199 def $ADDRESS_FIELD=194.177.211.210;
200 def $FREEBSD_HOSTS=($ADDRESS_FASCH $ADDRESS_FIELD);
203 mod state state (ESTABLISHED RELATED) ACCEPT;
204 interface vlan11 outerface eth0 jump from-kfreebsd;
205 interface eth0 destination ($FREEBSD_HOSTS) jump to-kfreebsd;
206 ULOG ulog-prefix "REJECT FORWARD: ";
207 REJECT reject-with icmp-admin-prohibited
212 @ferm::rule { 'dsa-routing':
213 description => 'forward chain',
215 rule => 'def $ADDRESS_FANO=206.12.19.110;
216 def $ADDRESS_FINZI=206.12.19.111;
217 def $ADDRESS_FISCHER=206.12.19.112;
218 def $ADDRESS_FALLA=206.12.19.117;
219 def $FREEBSD_HOSTS=($ADDRESS_FANO $ADDRESS_FINZI $ADDRESS_FISCHER $ADDRESS_FALLA);
222 mod state state (ESTABLISHED RELATED) ACCEPT;
223 interface br0 outerface br0 ACCEPT;
224 interface br1 outerface br1 ACCEPT;
226 interface br2 outerface br0 jump from-kfreebsd;
227 interface br0 destination ($ADDRESS_FISCHER $ADDRESS_FALLA) proto tcp dport 22 ACCEPT;
228 interface br0 destination ($FREEBSD_HOSTS) jump to-kfreebsd;
229 ULOG ulog-prefix "REJECT FORWARD: ";
230 REJECT reject-with icmp-admin-prohibited
235 @ferm::rule { 'dsa-routing':
236 description => 'forward chain',
238 rule => 'def $ADDRESS_FILS=82.195.75.89;
239 def $FREEBSD_HOSTS=($ADDRESS_FILS);
242 mod state state (ESTABLISHED RELATED) ACCEPT;
243 interface br0 outerface br0 ACCEPT;
244 interface br1 outerface br1 ACCEPT;
246 interface br2 outerface br0 jump from-kfreebsd;
247 interface br0 destination ($FREEBSD_HOSTS) jump to-kfreebsd;
248 ULOG ulog-prefix "REJECT FORWARD: ";
249 REJECT reject-with icmp-admin-prohibited
256 # redirect snapshot into varnish
259 @ferm::rule { 'dsa-snapshot-varnish':
260 rule => '&SERVICE(tcp, 6081)',
262 @ferm::rule { 'dsa-nat-snapshot-varnish':
264 chain => 'PREROUTING',
265 rule => 'proto tcp daddr 193.62.202.30 dport 80 REDIRECT to-ports 6081',
269 @ferm::rule { 'dsa-snapshot-varnish':
270 rule => '&SERVICE(tcp, 6081)',
272 @ferm::rule { 'dsa-nat-snapshot-varnish':
274 chain => 'PREROUTING',
275 rule => 'proto tcp daddr 206.12.19.150 dport 80 REDIRECT to-ports 6081',