5 # Firewall configuration for a file server (NFSv4 and SMB).
7 # Author: Max Kellermann <max@duempel.org>
15 mod state state INVALID DROP;
16 mod state state (ESTABLISHED RELATED) ACCEPT;
18 # allow local connections
22 proto icmp icmp-type echo-request ACCEPT;
24 # remote administration
25 proto tcp dport ssh ACCEPT;
28 proto tcp dport (139 445) ACCEPT; #smbd
29 proto udp dport (137:138) ACCEPT; #nmbd
32 proto tcp dport sunrpc ACCEPT;
33 proto (tcp udp) dport 2049 ACCEPT;
35 # reject the rest gracefully
39 # outgoing connections are not limited
40 chain OUTPUT policy ACCEPT;
42 # this is not a router
43 chain FORWARD policy DROP;