Automatically apply @ipfilter on dual-stack config
[ferm.git] / examples / ipv6.ferm
blob4cb4c9c41a5a82f44a0dbe378fe7d86bde004c96
1 # -*- shell-script -*-
3 # Ferm example script
5 # IPv6 demo.
7 # Author: Max Kellermann <max@duempel.org>
10 domain ip6 table filter {
11     chain INPUT {
12         policy DROP;
14         # connection tracking
15         mod state state INVALID DROP;
16         mod state state (ESTABLISHED RELATED) ACCEPT;
18         # allow local connections
19         interface lo ACCEPT;
21         # allow ICMP (for neighbor solicitation, like ARP for IPv4)
22         proto ipv6-icmp ACCEPT;
24         # allow SSH connections
25         proto tcp dport ssh ACCEPT;
27         # ident connections are also allowed
28         proto tcp dport auth ACCEPT;
30         # the rest is dropped by the above policy
31     }
33     # outgoing connections are not limited
34     chain OUTPUT policy ACCEPT;
36     # this is not a router
37     chain FORWARD policy DROP;