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-danzi':
23 description => 'Allow postgress access',
24 rule => '&SERVICE_RANGE(tcp, 5433, ( 206.12.19.0/24 ))'
26 @ferm::rule { 'dsa-postgres2-danzi':
27 description => 'Allow postgress access2',
28 rule => '&SERVICE_RANGE(tcp, 5437, ( 206.12.19.0/24 ))'
30 @ferm::rule { 'dsa-postgres3-danzi':
31 description => 'Allow postgress access3',
32 rule => '&SERVICE_RANGE(tcp, 5436, ( 206.12.19.0/24 ))'
34 @ferm::rule { 'dsa-postgres4-danzi':
35 description => 'Allow postgress access4',
36 rule => '&SERVICE_RANGE(tcp, 5438, ( 206.12.19.0/24 ))'
40 @ferm::rule { 'dsa-tftp':
41 description => 'Allow tftp access',
42 rule => '&SERVICE(udp, 69)'
46 @ferm::rule { 'dsa-dhcp':
47 description => 'Allow dhcp access',
48 rule => '&SERVICE(udp, 67)'
50 @ferm::rule { 'dsa-tftp':
51 description => 'Allow tftp access',
52 rule => '&SERVICE(udp, 69)'
56 @ferm::rule { 'dsa-powell-v6-tunnel':
57 description => 'Allow powell to use V6 tunnel broker',
58 rule => 'proto ipv6 saddr 212.227.117.6 jump ACCEPT'
60 @ferm::rule { 'dsa-powell-btseed':
62 description => 'Allow powell to seed BT',
63 rule => 'proto tcp dport 8000:8100 jump ACCEPT'
67 @ferm::rule { 'dsa-syslog':
68 description => 'Allow syslog access',
69 rule => '&SERVICE_RANGE(tcp, 5140, $HOST_DEBIAN_V4)'
71 @ferm::rule { 'dsa-syslog-v6':
73 description => 'Allow syslog access',
74 rule => '&SERVICE_RANGE(tcp, 5140, $HOST_DEBIAN_V6)'
78 @ferm::rule { 'dsa-hkp':
80 description => 'Allow hkp access',
81 rule => '&SERVICE(tcp, 11371)'
85 @ferm::rule { 'dsa-infinoted':
87 description => 'Allow infinoted access',
88 rule => '&SERVICE(tcp, 6523)'
92 #@ferm::rule { 'dsa-bind':
93 # domain => '(ip ip6)',
94 # description => 'Allow nameserver access',
95 # rule => '&TCP_UDP_SERVICE(53)'
97 @ferm::rule { 'dsa-finger':
99 description => 'Allow finger access',
100 rule => '&SERVICE(tcp, 79)'
102 @ferm::rule { 'dsa-ldap':
103 domain => '(ip ip6)',
104 description => 'Allow ldap access',
105 rule => '&SERVICE(tcp, 389)'
107 @ferm::rule { 'dsa-ldaps':
108 domain => '(ip ip6)',
109 description => 'Allow ldaps access',
110 rule => '&SERVICE(tcp, 636)'
114 ferm::module { 'nf_conntrack_sip': }
115 ferm::module { 'nf_conntrack_h323': }
117 @ferm::rule { 'dsa-sip':
118 domain => '(ip ip6)',
119 description => 'Allow sip access',
120 rule => '&TCP_UDP_SERVICE(5060)'
122 @ferm::rule { 'dsa-sipx':
123 domain => '(ip ip6)',
124 description => 'Allow sipx access',
125 rule => '&TCP_UDP_SERVICE(5080)'
129 @ferm::rule { 'dc11-icecast':
130 domain => '(ip ip6)',
131 description => 'Allow icecast access',
132 rule => '&SERVICE(tcp, 8000)'
138 if $::hostname in [rautavaara,luchesi] {
139 @ferm::rule { 'dsa-to-kfreebsd':
140 description => 'Traffic routed to kfreebsd hosts',
141 chain => 'to-kfreebsd',
142 rule => 'proto icmp ACCEPT;
143 source ($FREEBSD_SSH_ACCESS $HOST_NAGIOS_V4) proto tcp dport 22 ACCEPT;
144 source ($HOST_MAILRELAY_V4 $HOST_NAGIOS_V4) proto tcp dport 25 ACCEPT;
145 source ($HOST_MUNIN_V4 $HOST_NAGIOS_V4) proto tcp dport 4949 ACCEPT;
146 source ($HOST_NAGIOS_V4) proto tcp dport 5666 ACCEPT;
147 source ($HOST_NAGIOS_V4) proto udp dport ntp ACCEPT
150 @ferm::rule { 'dsa-from-kfreebsd':
151 description => 'Traffic routed from kfreebsd vlan/bridge',
152 chain => 'from-kfreebsd',
153 rule => 'proto icmp ACCEPT;
154 proto tcp dport (21 22 80 53 443) ACCEPT;
155 proto udp dport (53 123) ACCEPT;
156 proto tcp dport 8140 daddr 82.195.75.104 ACCEPT; # puppethost
157 proto tcp dport 5140 daddr (82.195.75.99 206.12.19.121) ACCEPT; # loghost
158 proto tcp dport 11371 daddr 82.195.75.107 ACCEPT; # keyring host
159 proto tcp dport (25 submission) daddr ($HOST_MAILRELAY_V4) ACCEPT
165 @ferm::rule { 'dsa-routing':
166 description => 'forward chain',
168 rule => 'def $ADDRESS_FASCH=194.177.211.201;
169 def $ADDRESS_FIELD=194.177.211.210;
170 def $FREEBSD_HOSTS=($ADDRESS_FASCH $ADDRESS_FIELD);
173 mod state state (ESTABLISHED RELATED) ACCEPT;
174 interface vlan11 outerface eth0 jump from-kfreebsd;
175 interface eth0 destination ($FREEBSD_HOSTS) jump to-kfreebsd;
176 ULOG ulog-prefix "REJECT FORWARD: ";
177 REJECT reject-with icmp-admin-prohibited
182 @ferm::rule { 'dsa-routing':
183 description => 'forward chain',
185 rule => 'def $ADDRESS_FANO=206.12.19.110;
186 def $ADDRESS_FINZI=206.12.19.111;
187 def $ADDRESS_FISCHER=206.12.19.112;
188 def $ADDRESS_FALLA=206.12.19.117;
189 def $FREEBSD_HOSTS=($ADDRESS_FANO $ADDRESS_FINZI $ADDRESS_FISCHER $ADDRESS_FALLA);
192 mod state state (ESTABLISHED RELATED) ACCEPT;
193 interface br0 outerface br0 ACCEPT;
194 interface br1 outerface br1 ACCEPT;
196 interface br2 outerface br0 jump from-kfreebsd;
197 interface br0 destination ($ADDRESS_FISCHER $ADDRESS_FALLA) proto tcp dport 22 ACCEPT;
198 interface br0 destination ($FREEBSD_HOSTS) jump to-kfreebsd;
199 ULOG ulog-prefix "REJECT FORWARD: ";
200 REJECT reject-with icmp-admin-prohibited
207 # redirect snapshot into varnish
210 @ferm::rule { 'dsa-snapshot-varnish':
211 rule => '&SERVICE(tcp, 6081)',
213 @ferm::rule { 'dsa-nat-snapshot-varnish':
215 chain => 'PREROUTING',
216 rule => 'proto tcp daddr 193.62.202.30 dport 80 REDIRECT to-ports 6081',
220 @ferm::rule { 'dsa-snapshot-varnish':
221 rule => '&SERVICE(tcp, 6081)',
223 @ferm::rule { 'dsa-nat-snapshot-varnish':
225 chain => 'PREROUTING',
226 rule => 'proto tcp daddr 206.12.19.150 dport 80 REDIRECT to-ports 6081',