increment version number to 2.4.2
[ferm.git] / examples / webserver.ferm
blob3ef54d79326113aabf30aa3459cd59a23a2f25d1
1 # -*- shell-script -*-
3 # Ferm example script
5 # Firewall configuration for a web and SMTP server.
7 # Author: Max Kellermann <max@duempel.org>
10 @def $NET_TRUSTED = 195.135.144.144/28;
12 table filter {
13     chain INPUT {
14         policy DROP;
16         # connection tracking
17         mod state state INVALID DROP;
18         mod state state (ESTABLISHED RELATED) ACCEPT;
20         # allow local connections
21         interface lo ACCEPT;
23         # respond to ping
24         proto icmp icmp-type echo-request ACCEPT;
26         # remote administration from the company network
27         saddr $NET_TRUSTED proto tcp dport ssh ACCEPT;
29         # our services to the world
30         proto tcp dport (http https smtp) ACCEPT;
32         # the rest is dropped by the above policy
33     }
35     # outgoing connections are not limited
36     chain OUTPUT policy ACCEPT;
38     # this is not a router
39     chain FORWARD policy DROP;