root/fwknop/tags/fwknop-1.8.3/fwknop.conf

Revision 798, 9.9 kB (checked in by mbr, 1 year ago)

- Started on re-instating port knocking mode just in case some people

insist on using it instead of Single Packet Authorization.

- Implemented source IP storage for MD5 sums.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 #
2 #############################################################################
3 #
4 #         [+] fwknop - Firewall Knock Operator [+]
5 #
6 # This is the configuration file for fwknop, the Firewall Knock Operator.
7 # The primary authentication and authorization mechanism offered by fwknop
8 # is known as Single Packet Authorization (SPA).  More information about
9 # SPA can be found at: http://www.cipherdyne.org/fwknop/docs/SPA.html
10 #
11 # Note there are no access control directives in this file.  All access
12 # control directives are located in the file
13 # /etc/fwknop/access.conf.  You will need to edit the access.conf file in
14 # order for fwknop to function correctly.
15 #
16 #############################################################################
17 #
18 # $Id$
19 #
20
21 ### Supports multiple email addresses (as a comma separated
22 ### list).
23 EMAIL_ADDRESSES             root@localhost;
24
25 ### Machine hostname
26 HOSTNAME                    _CHANGEME_;
27
28 ### Define the firewall type.  The default is "iptables" for Linux systems,
29 ### but this can be set to "ipfw" for *BSD systems.
30 FIREWALL_TYPE               iptables;
31
32 ### This defines the general strategy fwknop uses to authenticate remote
33 ### clients.  Possible values are "PCAP" (authenticate via regular pcap; this
34 ### is the default and puts the interface in promiscuous mode unless
35 ### ENABLE_PCAP_PROMISC is turned off) FILE_PCAP (authenticate via a pcap file
36 ### that is built by a sniffer), ULOG_PCAP (authenticate via the ulogd pcap
37 ### writer).
38 AUTH_MODE                   PCAP;
39
40 ### Define the ethernet interface on which we will sniff packets.  Note
41 ### that this is only used if the AUTH_MODE keyword above is set to
42 ### "PCAP"
43 PCAP_INTF                   eth0;
44
45 ### Define whether put the pcap interface in promiscuous mode.
46 ENABLE_PCAP_PROMISC         Y;
47
48 ### Define the filters used for PCAP and FILE_PCAP modes; we default
49 ### to udp port 62201.  Note that either of these variables can be
50 ### set to NONE in order to look at all packets.
51 PCAP_FILTER                 udp port 62201;
52
53 ### This instructs fwknopd to not honor SPA packets that have an old time
54 ### stamp.  The value for "old" is defined by the MAX_SPA_PACKET_AGE variable.
55 ### If ENABLE_SPA_PACKET_AGING is set to "N", fwknopd will not use the client
56 ### time stamp at all.
57 ENABLE_SPA_PACKET_AGING     Y;
58
59 ### Defines the maximum age (in seconds) that an SPA packet will be accepted.
60 ### This requires that the client system is in relatively close time
61 ### synchronization with the fwknopd server system (NTP is good).  The default
62 ### age is two minutes.
63 MAX_SPA_PACKET_AGE          120;
64
65 ### Track md5 sums associated with previous fwknop process.  This allows
66 ### md5 sums to remain persistent across executions of fwknop.
67 ENABLE_MD5_PERSISTENCE      Y;
68
69 ### This variable controls whether fwknopd includes the source IP of each SPA
70 ### packet in the MD5 store. If a replayed SPA message is detected, then
71 ### having this information can provide information about which networks have
72 ### people sniffing your SPA packets.
73 ENABLE_MD5_INCLUDE_SRC      Y;
74
75 ### Force all SPA packets to contain a real IP address within the encrypted
76 ### data.  This makes it impossible to use the -s command line argument on
77 ### the fwknop command line, so either -R has to be used to automatically
78 ### resolve the external address (if the client behind a NAT) or the client
79 ### must know the external IP.
80 REQUIRE_SOURCE_ADDRESS      N;
81
82 ### Flush all existing rules in the fwknop chains at fwknop start time.
83 FLUSH_IPT_AT_INIT           Y;
84
85 ### If running on ipfw firewalls, this variable defines the rule number
86 IPFW_RULE_NUM               1;
87
88 ### Define the timeout for running a command
89 PCAP_CMD_TIMEOUT            10;
90
91 ### If GPG keys are used instead of a Rijndael symmetric key, this is
92 ### the default GPG keys directory.  Note that each access block in
93 ### /etc/fwknop/access.conf can specify its own GPG directory to override
94 ### this default.
95 GPG_DEFAULT_HOME_DIR        /root/.gnupg;
96
97 ### This gets used if AUTH_MODE is set to "FILE_PCAP".  This file must
98 ### be created by a sniffer process (or something like the ulogd pcap
99 ### writer).
100 PCAP_PKT_FILE               /var/log/sniff.pcap;
101
102 ### Defines interval fwknop will use to check for more iptables
103 ### messages (this is only used in the legacy port knocking mode).
104 SLEEP_INTERVAL              2;  ### seconds
105
106 ### TTL values are decremented depending on the number of hops the packet
107 ### has taken before it hits the firewall.  We will assume packets will not
108 ### jump through more than 20 hops on average.
109 MAX_HOPS                    20;
110
111 ### Note that fwknopd still only gets its data via pcap, so the filter
112 ### defined by PCAP_FILTER needs to be updated to include this TCP port.
113 ENABLE_TCP_SERVER           N;
114
115 ### Set the default port number that the fwknop_serv "dummy" TCP server
116 ### listens on. This server is only spawned when ENABLE_TCP_SERVER is set
117 ### to "Y".
118 TCPSERV_PORT                62201;
119
120 ### Set the type of syslog daemon that is used.  The SYSLOG_DAEMON variable
121 ### accepts three possible values: syslogd, syslog-ng, or metalog.
122 SYSLOG_DAEMON               syslogd;
123
124 ### syslog facility and priority (the defaults are usually ok)
125 ### The SYSLOG_FACILITY variable can be set to one of LOG_LOCAL{0-7}, and
126 ### SYSLOG_PRIORITY can be set to one of LOG_INFO, LOG_DEBUG, LOG_NOTICE,
127 ### LOG_WARNING, LOG_ERR, LOG_CRIT, LOG_ALERT, or LOG_EMERG
128 SYSLOG_IDENTITY             fwknopd;
129 SYSLOG_FACILITY             LOG_LOCAL7;
130 SYSLOG_PRIORITY             LOG_INFO;
131
132 ### Allow reporting methods to be enabled/restricted.  This keyword can
133 ### accept values of "nosyslog" (don't write any messages to syslog),
134 ### "noemail" (don't send any email messages), or "ALL" (to generate both
135 ### syslog and email messages).  "ALL" is the default.  Both "nosyslog"
136 ### and "noemail" can be combined with a comma to disable all logging
137 ### and alerting.
138 ALERTING_METHODS            ALL;
139
140 ### The following variables can be modified to look for logging messages
141 ### that are specific to your firewall configuration (specified by the
142 ### "--log-prefix" for iptables firewalls).  For example, if your firewall
143 ### uses the string "Audit" for packets that have been blocked, then you
144 ### could set FW_MSG_SEARCH = "Audit";
145 FW_MSG_SEARCH               DROP;
146
147 ### For knopwatchd
148 KNOPWATCHD_CHECK_INTERVAL   5;  ### seconds
149 KNOPWATCHD_MAX_RETRIES      10;
150
151 ### Default minimum message size SPA messages encrypted with GnuPG. The
152 ### fwknopd daemon will not attempt to decrypt any packet with gpg that is not
153 ### at least as large as this value.
154 MIN_GNUPG_MSG_SIZE          400;
155
156 ### Fwknop uses the IPTables::ChainMgr module to add allow rules to a
157 ### custom iptables chain "FWKNOP_INPUT".  This chain is called from
158 ### the INPUT chain, and by default no other iptables chains are used.
159 ### However, additional chains can be added (say, if access needs to
160 ### be allowed through the local system via the FORWARD chain) by
161 ### altering the "IPT_AUTO_CHAIN" keywords below.  For a discussion of
162 ### the format followed by these keywords, read on:
163 ###     Specify chain names to which iptables blocking rules will be
164 ### added with the IPT_AUTO_CHAIN{n} keyword.  There is no limit on the
165 ### number of IPT_AUTO_CHAIN{n} keywords; just increment the {n} number
166 ### to add an additional IPT_AUTO_CHAIN requirement. The format for this
167 ### variable is: <Target>,<Direction>,<Table>,<From_chain>,<Jump_rule_position>, \
168 ###              <To_chain>,<Rule_position>.
169 ### "Target": Can be any legitimate iptables target, but should usually
170 ###           just be "DROP".
171 ### "Direction": Can be "src", "dst", or "both", which correspond to the
172 ###              INPUT, OUTPUT, and FORWARD chains.
173 ### "Table": Can be any iptables table, but the default is "filter".
174 ### "From_chain": Is the chain from which packets will be jumped.
175 ### "Jump_rule_position": Defines the position within the From_chain where
176 ###                       the jump rule is added.
177 ### "To_chain": Is the chain to which packets will be jumped. This is the
178 ###             main chain where fwknop rules are added.
179 ### "Rule_position": Defines the position where rule are added within the
180 ###                  To_chain.
181 IPT_AUTO_CHAIN1             ACCEPT, src, filter, INPUT, 1, FWKNOP_INPUT, 1;
182
183 ### Directories
184 FWKNOP_DIR                  /var/log/fwknop;
185 FWKNOP_RUN_DIR              /var/run/fwknop;
186 FWKNOP_LIB_DIR              /var/lib/fwknop; # for legacy port knocking mode
187 FWKNOP_MOD_DIR              /usr/lib/fwknop;
188 FWKNOP_CONF_DIR             /etc/fwknop;
189 FWKNOP_ERR_DIR              $FWKNOP_DIR/errs;
190
191 ### Files
192 FW_DATA_FILE                $FWKNOP_DIR/fwdata; # legacy port knocking mode
193 ACCESS_CONF                 $FWKNOP_CONF_DIR/access.conf;
194 P0F_FILE                    $FWKNOP_CONF_DIR/pf.os;   ### p0f-based fingerprints
195 MD5_FILE                    $FWKNOP_DIR/md5sums;
196 KNOPTM_TIMEOUT_FILE         $FWKNOP_DIR/knoptm.cache;  ### timeout cache
197 FWKNOP_PID_FILE             $FWKNOP_RUN_DIR/fwknopd.pid;
198 FWKNOP_CMDLINE_FILE         $FWKNOP_RUN_DIR/fwknopd.cmd;
199 TCPSERV_PID_FILE            $FWKNOP_RUN_DIR/fwknop_serv.pid;
200 KNOPWATCHD_PID_FILE         $FWKNOP_RUN_DIR/knopwatchd.pid;
201 KNOPMD_PID_FILE             $FWKNOP_RUN_DIR/knopmd.pid;
202 KNOPTM_PID_FILE             $FWKNOP_RUN_DIR/knoptm.pid;
203 KNOPTM_IP_TIMEOUT_SOCK      $FWKNOP_RUN_DIR/knoptm_ip_timeout.sock;
204 KNOPMD_FIFO                 $FWKNOP_LIB_DIR/fwknopfifo;
205
206 ### iptables command output and error collection files; these are
207 ### used by IPTables::ChainMgr
208 IPT_OUTPUT_FILE             $FWKNOP_DIR/fwknopd.iptout;
209 IPT_ERROR_FILE              $FWKNOP_DIR/fwknopd.ipterr;
210 KNOPTM_IPT_OUTPUT_FILE      $FWKNOP_DIR/knoptm.iptout;
211 KNOPTM_IPT_ERROR_FILE       $FWKNOP_DIR/knoptm.ipterr;
212
213 ### system binaries
214 mailCmd          /bin/mail;
215 shCmd            /bin/sh;
216 mknodCmd         /bin/mknod;
217 iptablesCmd      /sbin/iptables;
218 ipfwCmd          /sbin/ipfw;  ### BSD and Mac OS X only
219 fwknopdCmd       /usr/sbin/fwknopd;
220 fwknop_servCmd   /usr/sbin/fwknop_serv;
221 knopmdCmd        /usr/sbin/knopmd;
222 knoptmCmd        /usr/sbin/knoptm;
223 knopwatchdCmd    /usr/sbin/knopwatchd;
Note: See TracBrowser for help on using the browser.