Remove wheezy-supporting cruft
[mirror/dsa-puppet.git] / modules / ferm / templates / ferm.conf.erb
1 ##
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
4 ##
5
6 # -*- shell-script -*-
7
8 @include 'conf.d/';
9
10 domain (ip ip6) {
11         table filter {
12               chain log_and_reject {
13                       NFLOG nflog-prefix "REJECT: ";
14                       proto tcp REJECT reject-with tcp-reset;
15                       REJECT;
16               }
17
18               chain log_or_drop {
19                       mod hashlimit hashlimit-name nflogreject  hashlimit-mode srcip hashlimit-burst 10 hashlimit 1/second jump log_and_reject;
20                       mod hashlimit hashlimit-name nfloglogdrop hashlimit-mode srcip hashlimit-burst 10 hashlimit 1/second NFLOG nflog-prefix "DROP: ";
21                       DROP;
22               }
23
24         }
25 }
26 domain (ip ip6) {
27         table filter {
28               chain INPUT {
29                       policy ACCEPT;
30                       mod state state (ESTABLISHED RELATED) ACCEPT;
31                       interface lo ACCEPT;
32                       proto icmp ACCEPT;
33                       # some of our hosts (e.g. villa and lobos) do ipv6 via tunnels (proto 41)
34                       # this requires we allow proto ipv6 to work in all cases.
35                       # without this, ipv6 connectivity only works once the host itself
36                       # created some ipv6 connectivity to some place.
37                       proto ipv6 ACCEPT;
38                       mod state state (INVALID) DROP;
39               }
40         }
41 }
42
43 @include 'dsa.d/';
44
45 domain (ip ip6) {
46         chain INPUT {
47                 proto (tcp udp) mod multiport destination-ports (135 137 138 139 445 1026 1027 1433) DROP;
48                 jump log_or_drop;
49         }
50 }
51
52 @hook pre "umask 0177; rm -f /var/run/iptables-ferm.checksum /var/run/ip6tables-ferm.checksum";
53 @hook post "umask 0177; iptables-save | sed -e 's/\[.*//' -e 's/^#.*//' | sha256sum > /var/run/iptables-ferm.checksum";
54 @hook post "umask 0177; ip6tables-save | sed -e 's/\[.*//' -e 's/^#.*//' | sha256sum > /var/run/ip6tables-ferm.checksum";
55 # vim:set et: