]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/ferm/files/ferm.conf
5f77ce48530fb0a42ce3e63f195229299b8764f1
[dsa-puppet.git] / modules / ferm / files / ferm.conf
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 {
11         table filter {
12               chain log_and_reject {
13                       ULOG ulog-prefix "REJECT: ";
14                       proto tcp REJECT reject-with tcp-reset;
15                       REJECT;
16               }
17
18               chain log_or_drop {
19                       mod hashlimit hashlimit-name ulogreject  hashlimit-mode srcip hashlimit-burst 10 hashlimit 1/second jump log_and_reject;
20                       mod hashlimit hashlimit-name uloglogdrop hashlimit-mode srcip hashlimit-burst 10 hashlimit 1/second ULOG ulog-prefix "DROP: ";
21                       DROP;
22               }
23
24         }
25 }
26 domain ip6 {
27         table filter {
28               chain log_and_reject {
29                       LOG log-prefix "REJECT: ";
30                       proto tcp REJECT reject-with tcp-reset;
31                       REJECT;
32               }
33
34               chain log_or_drop {
35                       mod hashlimit hashlimit-name logreject  hashlimit-mode srcip hashlimit-burst 10 hashlimit 1/second jump log_and_reject;
36                       mod hashlimit hashlimit-name loglogdrop hashlimit-mode srcip hashlimit-burst 10 hashlimit 1/second LOG log-prefix "DROP: ";
37                       DROP;
38               }
39         }
40 }
41 domain (ip ip6) {
42         table filter {
43               chain INPUT {
44                       policy ACCEPT;
45                       mod state state (ESTABLISHED RELATED) ACCEPT;
46                       interface lo ACCEPT;
47                       proto icmp ACCEPT;
48                       # some of our hosts (e.g. villa and lobos) do ipv6 via tunnels (proto 41)
49                       # this requires we allow proto ipv6 to work in all cases.
50                       # without this, ipv6 connectivity only works once the host itself
51                       # created some ipv6 connectivity to some place.
52                       proto ipv6 ACCEPT;
53                       mod state state (INVALID) DROP;
54               }
55         }
56 }
57
58 @include 'dsa.d/';
59
60 domain (ip ip6) {
61         chain INPUT {
62                 proto (tcp udp) mod multiport destination-ports (135 137 138 139 445 1026 1027 1433) DROP;
63                 jump log_or_drop;
64         }
65 }
66
67 @hook post "umask 0177; iptables-save | sed -e 's/\[.*//' -e 's/^#.*//' | sha256sum > /var/run/iptables-ferm.checksum";
68 @hook post "umask 0177; ip6tables-save | sed -e 's/\[.*//' -e 's/^#.*//' | sha256sum > /var/run/ip6tables-ferm.checksum";
69 # vim:set et: