local.m4, fender.m4, radius.m4: Fixing for `fender' coming home.
[firewall] / vampire.m4
1 ### -*-sh-*-
2 ###
3 ### Firewall configuration for vampire
4 ###
5 ### (c) 2008 Mark Wooding
6 ###
7
8 ###----- Licensing notice ---------------------------------------------------
9 ###
10 ### This program is free software; you can redistribute it and/or modify
11 ### it under the terms of the GNU General Public License as published by
12 ### the Free Software Foundation; either version 2 of the License, or
13 ### (at your option) any later version.
14 ###
15 ### This program is distributed in the hope that it will be useful,
16 ### but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ### GNU General Public License for more details.
19 ###
20 ### You should have received a copy of the GNU General Public License
21 ### along with this program; if not, write to the Free Software Foundation,
22 ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
24 ###--------------------------------------------------------------------------
25 ### vampire-specific rules.
26
27 m4_divert(86)m4_dnl
28 ## Externally visible services.
29 allowservices inbound tcp \
30 ident \
31 ssh \
32 tor_public tor_directory i2p
33 allowservices inbound udp \
34 tripe \
35 gnutella_svc \
36 i2p
37
38 allowservices inbound-untrusted tcp \
39 dns \
40 lpd \
41 netbios_ssn microsoft_ds
42 allowservices inbound-untrusted udp \
43 dns \
44 tftp
45
46 ## Provide syslog for evolution.
47 run iptables -A inbound -j ACCEPT \
48 -s 172.29.198.2 \
49 -p udp --destination-port $port_syslog
50
51 ## Watch outgoing Tor usage.
52 run iptables -A OUTPUT -m multiport \
53 -p tcp --source-ports $port_tor_public,$port_tor_directory
54
55 ## Other interesting things.
56 dnsresolver inbound
57 dnsserver inbound
58 ntpclient inbound $ntp_servers
59
60 ## Provide NTP service to untrusted clients.
61 ip46tables -A inbound-untrusted -p udp -j ACCEPT \
62 --source-port 123 --destination-port 123
63
64 m4_divert(-1)
65 ###----- That's all, folks --------------------------------------------------