Added the fwknopd.8 man page.
git-svn-id: file:///home/mbr/svn/fwknop/trunk@213 510a4753-2344-4c79-9c09-4d669213fbeb
This commit is contained in:
parent
0008cdc86c
commit
bf9e165165
568
server/fwknopd.8
Normal file
568
server/fwknopd.8
Normal file
@ -0,0 +1,568 @@
|
||||
'\" t
|
||||
.\" Title: fwknopd
|
||||
.\" Author: [see the "AUTHOR" section]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||
.\" Date: 02/09/2010
|
||||
.\" Manual:
|
||||
.\" Source:
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "FWKNOPD" "8" "02/09/2010" ""
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
fwknopd \- Firewall Knock Operator Daemon
|
||||
.SH "SYNOPSIS"
|
||||
.sp
|
||||
\fBfwknopd\fR [\fIoptions\fR]
|
||||
.SH "DESCRIPTION"
|
||||
.sp
|
||||
\fBfwknopd\fR is the server component for the FireWall Knock Operator, and is responsible for monitoring Single Packet Authorization (SPA) packets that are generated by \fBfwknop\fR clients, modifying a firewall or acl policy to allow the desired access after decrypting a valid SPA packet, and removing access after a configurable timeout\&. The main application of this program is to protect services such as \fISSH\fR with an additional layer of security in order to make the exploitation of vulnerabilities (both 0\-day and unpatched code) much more difficult\&.
|
||||
.sp
|
||||
The main configuration for \fBfwknopd\fR is maintained within two files: \fIfwknopd\&.conf\fR and \fIaccess\&.conf\fR\&. The default location for these files is determined at package configuration (typically \fI/etc/fwknop\fR)The configuration variables within these files are desribed below\&.
|
||||
.SH "COMMAND-LINE OPTIONS"
|
||||
.PP
|
||||
\fB\-a, \-\-access\-file\fR=\fI<access\-file>\fR
|
||||
.RS 4
|
||||
Specify the location of the
|
||||
\fIaccess\&.conf\fR
|
||||
file\&. If this option is not given,
|
||||
\fIfwkopd\fR
|
||||
will use the default location (typically
|
||||
\fI/etc/fwknop/access\&.conf\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-c, \-\-config\fR=\fI<config\-file>\fR
|
||||
.RS 4
|
||||
Specify the location of the
|
||||
\fIfwknopd\&.conf\fR
|
||||
file\&. If this option is not given,
|
||||
\fIfwkopd\fR
|
||||
will use the default location (typically
|
||||
\fI/etc/fwknop/fwknopd\&.conf\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-C, \-\-packet\-limit\fR=\fI<n>\fR
|
||||
.RS 4
|
||||
Specify the number of candidate SPA packets to process and exit when this limit is reached\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-i, \-\-interface\fR=\fI<interface>\fR
|
||||
.RS 4
|
||||
Manually specify interface on which to sniff, e\&.g\&. \(lq\-i eth0\(rq\&. This option is not usually needed because the \(lqPCAP_INTF\(rq keyword in the
|
||||
\fIfwknopd\&.conf\fR
|
||||
file defines the sniffing interface\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-fw\-list\fR
|
||||
.RS 4
|
||||
List all active rules in the \(lqFWKNOP\(rq Netfilter chain(s)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-fw\-flush\fR
|
||||
.RS 4
|
||||
Flush all active rules in the \(lqFWKNOP\(rq Netfilter chain(s)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-O, \-\-Override\-config\fR=\fI<file>\fR
|
||||
.RS 4
|
||||
Override config variable values that are normally read from the
|
||||
\fIfwknop\&.conf\fR
|
||||
file with values from the specified file\&. Multiple override config files can be given as a comma\-separated list\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-D, \-\-Dump\-config\fR
|
||||
.RS 4
|
||||
Dump the configuration values that
|
||||
\fBfwknopd\fR
|
||||
derives from the
|
||||
\fIfwknop\&.conf\fR
|
||||
(or override files) and
|
||||
\fIaccess\&.conf\fR
|
||||
on STDERR\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-K, \-\-Kill\fR
|
||||
.RS 4
|
||||
Kill the current
|
||||
\fBfwknopd\fR
|
||||
process\&. This provides a quick and easy way to stop
|
||||
\fBfwknopd\fR
|
||||
without having to look in the process table\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-R, \-\-Restart\fR
|
||||
.RS 4
|
||||
Restart the currently running
|
||||
\fBfwknopd\fR
|
||||
processes\&. This option will preserve the command line options that were supplied to the original
|
||||
\fBfwknopd\fR
|
||||
process but will force
|
||||
\fBfwknopd\fR
|
||||
to re\-read the
|
||||
\fIfwknopd\&.conf\fR
|
||||
and
|
||||
\fIaccess\&.conf\fR
|
||||
files\&. This will also force a flush of the current \(lqFWKNOP\(rq Netfilter chain(s)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-S, \-\-Status\fR
|
||||
.RS 4
|
||||
Display the status of any
|
||||
\fBfwknopd\fR
|
||||
processes that may or not be running\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-l, \-\-locale\fR=\fI<locale>\fR
|
||||
.RS 4
|
||||
Provide a locale setting other than the default \(lqC\(rq locale\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-no\-locale\fR
|
||||
.RS 4
|
||||
Do not set the locale at all so that the default system locale will apply\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-v, \-\-verbose\fR
|
||||
.RS 4
|
||||
Run
|
||||
\fBfwknopd\fR
|
||||
in verbose mode\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-h, \-\-help\fR
|
||||
.RS 4
|
||||
Display usage information and exit\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-V, \-\-Version\fR
|
||||
.RS 4
|
||||
Display version information and exit\&.
|
||||
.RE
|
||||
.SH "FWKNOPD CONFIG AND ACCESS VARIABLES"
|
||||
.sp
|
||||
\fBfwknopd\fR references the \fIfwknopd\&.conf\fR file for configuration variables such as the path to the firewall logfile, the sleep interval fwknop uses to check for new log messages, and paths to system binaries, etc\&. The fwknop config file does not define any access control directives\&.
|
||||
.sp
|
||||
The access control directives are contained in the \fIaccess\&.conf\fR file\&. Access control directives define encryption keys and level of access that is granted to an fwknop client that has generated the appropriate encrypted message\&.
|
||||
.SS "FWKNOPS\&.CONF VARIABLES"
|
||||
.sp
|
||||
This section list the more prominent configuration variables used by \fBfwknopd\fR\&. It is not a complete list\&. See the \fIfwknopd\&.conf\fR file for the full list and corresponding details\&.
|
||||
.PP
|
||||
\fBHOSTNAME\fR \fI<hostname>\fR
|
||||
.RS 4
|
||||
Force hostname to this value\&. If not set here,
|
||||
\fBfwknopd\fR
|
||||
will attempt to use
|
||||
\fIgethostname()\fR
|
||||
to determine the local hostname and use that\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBFIREWALL_TYPE\fR \fI<iptables|ipfw>\fR
|
||||
.RS 4
|
||||
Define the firewall type\&. The default is
|
||||
\fIiptables\fR
|
||||
for Linux systems, but this can be set to
|
||||
\fIipfw\fR
|
||||
for BSD systems\&. Also supported is
|
||||
\fIexternal_cmd\fR
|
||||
to allow
|
||||
\fBfwknopd\fR
|
||||
to invoke an external command instead of interfacing with the firewall at all\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBAUTH_MODE\fR \fI<PCAP|FILE_PCAP|ULOG_PCAP>\fR
|
||||
.RS 4
|
||||
This defines the general strategy
|
||||
\fBfwknopd\fR
|
||||
uses to authenticate remote clients\&. Possible values are
|
||||
\fIPCAP\fR
|
||||
(authenticate via regular pcap; this is the default and puts the interface in promiscuous mode unless \(lqENABLE_PCAP_PROMISC\(rq is turned off),
|
||||
\fIFILE_PCAP\fR
|
||||
(authenticate via a pcap file that is built by a sniffer),
|
||||
\fIULOG_PCAP\fR
|
||||
(authenticate via the ulogd pcap writer)\&.
|
||||
\fBNote:\fR
|
||||
Currently, only
|
||||
\fIPCAP\fR
|
||||
is implemented\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBPCAP_INTF\fR \fI<interface>\fR
|
||||
.RS 4
|
||||
Define the ethernet interface on which
|
||||
\fBfwknopd\fR
|
||||
will sniff packets\&. Note that this is only used if the \(lqAUTH_MODE\(rq keyword above is set to \(lqPCAP\(rq\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBENABLE_PCAP_PROMISC\fR \fI<Y/N>\fR
|
||||
.RS 4
|
||||
By default
|
||||
\fBfwknopd\fR
|
||||
puts the pcap interface into promiscuous mode\&. Set this to \(lqN\(rq to disable that behavior (non\-promiscuous)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBPCAP_FILTER\fR \fI<pcap filter spec>\fR
|
||||
.RS 4
|
||||
Define the filter used for
|
||||
\fIPCAP\fR
|
||||
modes;
|
||||
\fBfwknopd\fR
|
||||
defaults to UDP port 62201\&. However, if an
|
||||
\fBfwknop\fR
|
||||
client uses the
|
||||
\fB\-\-rand\-port\fR
|
||||
option to send the SPA packet over a random port, then this variable should be updated to something like \(lqudp dst portrange 10000\-65535\(rq\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBENABLE_SPA_PACKET_AGING\fR \fI<Y/N>\fR
|
||||
.RS 4
|
||||
This instructs
|
||||
\fBfwknopd\fR
|
||||
to not honor SPA packets that have an old time stamp\&. The value for \(lqold\(rq is defined by the \(lqMAX_SPA_PACKET_AGE\(rq variable\&. If \(lqENABLE_SPA_PACKET_AGING\(rq is set to \(lqN\(rq,
|
||||
\fBfwknopd\fR
|
||||
will not use the client time stamp at all\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBMAX_SPA_PACKET_AGE\fR \fI<seconds>\fR
|
||||
.RS 4
|
||||
Defines the maximum age (in seconds) that an SPA packet will be accepted\&. This requires that the client system is in relatively close time synchronization with the
|
||||
\fBfwknopd\fR
|
||||
server system (NTP is good)\&. The default age is 120 seconds (two minutes)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBENABLE_DIGEST_PERSISTENCE\fR \fI<Y/N>\fR
|
||||
.RS 4
|
||||
Track digest sums associated with previous SPA packets processed by
|
||||
\fBfwknopd\fR\&. This allows digest sums to remain persistent across executions of
|
||||
\fBfwknopd\fR\&. The default is \(lqY\(rq\&. If set to \(lqN\(rq,
|
||||
\fBfwknopd\fR
|
||||
will not check incoming SPA packet data against any previously save digests\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBENABLE_IPT_FORWARDING\fR \fI<Y/N>\fR
|
||||
.RS 4
|
||||
Allow SPA clients to request access to services through an iptables firewall instead of just to it (i\&.e\&. access through the FWKNOP_FORWARD chain instead of the INPUT chain)\&. This also requires the \(lqENABLE_FORWARD_ACCESS\(rq variable to be set in the
|
||||
\fIaccess\&.conf\fR
|
||||
file for the specific \(lqSOURCE\(rq stanzas that should be allowed for forwarding access\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBENABLE_IPT_LOCAL_NAT\fR \fI>Y/N>\fR
|
||||
.RS 4
|
||||
Allow SPA clients to request access to a local socket via NAT\&. This still puts an ACCEPT rule into the FWKNOP_INPUT chain, but a different port is translated via DNAT rules to the real one\&. So, the user would do \(lqssh \-p <port>\(rq to access the local service (see the
|
||||
\fB\-\-NAT\-local\fR
|
||||
and
|
||||
\fB\-\-NAT\-rand\-port\fR
|
||||
on the
|
||||
\fBfwknop\fR
|
||||
client command line)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBENABLE_IPT_SNAT\fR \fI<Y/N>\fR
|
||||
.RS 4
|
||||
Set this to \(lqY\(rq to enable a corresponding SNAT rule\&. By default, if forwarding access is enabled (see the \(lqENABLE_IPT_FORWARDING\(rq variable above), then
|
||||
\fBfwknopd\fR
|
||||
creates DNAT rules for incoming connections, but does not also complement these rules with SNAT rules at the same time\&. In some situations, internal systems may not have a route back out for the source address of the incoming connection, so it is necessary to also apply SNAT rules so that the internal systems see the IP of the internal interface where
|
||||
\fBfwknopd\fR
|
||||
is running\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBSNAT_TRANSLATE_IP\fR \fI<ip_address>\fR
|
||||
.RS 4
|
||||
Specify the IP address for SNAT\&. This functionality is only enabled when \(lqENABLE_IPT_SNAT\(rq is set to \(lqY\(rq and by default SNAT rules are built with the MASQUERADE target (since then the internal IP does not have to be defined here in the
|
||||
\fIfwknopd\&.conf\fR
|
||||
file), but if you want
|
||||
\fBfwknopd\fR
|
||||
to use the SNAT target, you mus also define an IP address with the \(lqSNAT_TRANSLATE_IP\(rq variable\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBENABLE_IPT_OUTPUT\fR \fI<Y/N>\fR
|
||||
.RS 4
|
||||
Add ACCEPT rules to the FWKNOP_OUTPUT chain\&. This is usually only useful if there are no state tracking rules to allow connection responses out and the OUTPUT chain has a default\-drop stance\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBMAX_SNIFF_BYTES\fR \fI<bytes>\fR
|
||||
.RS 4
|
||||
Specify the the maximum number of bytes to sniff per frame\&. 1500 is the default\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBFLUSH_IPT_AT_INIT\fR \fI<Y/N>\fR
|
||||
.RS 4
|
||||
Flush all existing rules in the fwknop chains at
|
||||
\fBfwknopd\fR
|
||||
start time\&. The default is \(lqY\(rq\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBFLUSH_IPT_AT_EXIT\fR \fI<Y/N>\fR
|
||||
.RS 4
|
||||
Flush all existing rules in the fwknop chains when
|
||||
\fBfwknopd\fR
|
||||
is stopped or otherwise exits cleanly\&. The default is \(lqY\(rq\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBIPFW_RULE_NUM\fR \fI<rule_num>\fR
|
||||
.RS 4
|
||||
If running on
|
||||
\fIipfw\fR
|
||||
firewalls, this variable defines the rule number that
|
||||
\fBfwknopd\fR
|
||||
uses to insert an ipfw
|
||||
\fIpass\fR
|
||||
rule\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBIPFW_SET_NUM\fR \fI<set_num>\fR
|
||||
.RS 4
|
||||
If running on
|
||||
\fIipfw\fR
|
||||
firewalls, this variable defines the rule set that will be used to store expired rules that still have a dynamic rule associated to them\&. That set will be disabled by
|
||||
\fBfwknopd\fR
|
||||
and should not be enabled while
|
||||
\fBfwknopd\fR
|
||||
is running\&. Not used when ipfw isn\(cqt using dynamic rules\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBIPFW_DYNAMIC_INTERVAL\fR \fI<seconds>\fR
|
||||
.RS 4
|
||||
For
|
||||
\fIipfw\fR
|
||||
firewalls set the interval (in seconds) over those rules that have no remaining dynamic rules associated with them will be removed\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBPCAP_CMD_TIMEOUT\fR \fI<seconds>\fR
|
||||
.RS 4
|
||||
Define the timeout for running a command\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBGPG_HOME_DIR\fR \fI<path>\fR
|
||||
.RS 4
|
||||
If GPG keys are used instead of a Rijndael symmetric key, this is the default GPG keys directory\&. Note that each access block in
|
||||
\fIaccess\&.conf\fR
|
||||
can specify its own GPG directory to override this default\&. If not set here or in an
|
||||
\fIaccess\&.conf\fR
|
||||
stanza, then the
|
||||
\fI$HOME/\&.gnupg\fR
|
||||
directory of the user running
|
||||
\fBfwknopd\fR
|
||||
(most likely root)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBPCAP_PKT_FILE\fR \fI</path/to/sniff\&.pcap>\fR
|
||||
.RS 4
|
||||
This gets used if AUTH_MODE is set to "FILE_PCAP"\&. This file must be created by a sniffer process (or something like the ulogd pcap writer)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBBLACKLIST\fR \fI<ipaddr/mask,\&...ipaddr,etc>\fR
|
||||
.RS 4
|
||||
Define a comma\-separated set of IP addresses and/or networks that should be globally blacklisted\&. That is, any SPA packet that is from a source IP (or has an internal \-\-allow\-ip) within a blacklisted network will be ignored\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBMAX_HOPS\fR \fI<num_hops>\fR
|
||||
.RS 4
|
||||
TTL values are decremented depending on the number of hops the packet has taken before it hits the firewall\&. We will assume packets will not jump through more than
|
||||
\fInum_hops\fR
|
||||
hops on average\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBENABLE_SPA_OVER_HTTP\fR \fI<Y/N>\fR
|
||||
.RS 4
|
||||
Allow
|
||||
\fBfwknopd\fR
|
||||
to acquire SPA data from HTTP requests (generated with the fwknop client in
|
||||
\fB\-\-HTTP\fR
|
||||
mode)\&. Note that the \(lqPCAP_FILTER\(rq variable would need to be updated when this is enabled to sniff traffic over TCP/80 connections\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBENABLE_TCP_SERVER\fR \fI<Y/N>\fR
|
||||
.RS 4
|
||||
Note that
|
||||
\fBfwknopd\fR
|
||||
still only gets its data via pcap, so the filter defined by \(lqPCAP_FILTER\(rq needs to be updated to include this TCP port\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBTCPSERV_PORT\fR \fI<port>\fR
|
||||
.RS 4
|
||||
Set the default port number that the
|
||||
\fIfwknopd_serv\fR
|
||||
\(lqdummy\(rq TCP server listens on\&. This server is only spawned when \(lqENABLE_TCP_SERVER\(rq is set to \(lqY\(rq\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBLOCALE\fR \fI<locale>\fR
|
||||
.RS 4
|
||||
Set the locale (via the LC_ALL variable)\&. This can be unset or set to \(lqNONE\(rq to have
|
||||
\fBfwknopd\fR
|
||||
honor the default system locale\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBSYSLOG_IDENTITY\fR \fI<identity>\fR
|
||||
.RS 4
|
||||
Override syslog identity on message logged by
|
||||
\fBfwknopd\fR\&. The defaults are usually ok\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBSYSLOG_FACILITY\fR \fI<facility>\fR
|
||||
.RS 4
|
||||
Override syslog facility\&. The \(lqSYSLOG_FACILITY\(rq variable can be set to
|
||||
.RE
|
||||
.PP
|
||||
\fBIPT_EXEC_TRIES\fR \fI<num_tries>\fR
|
||||
.RS 4
|
||||
Define the number of times that
|
||||
\fBfwknopd\fR
|
||||
will run certain critical iptables commands (such as adding a new access rule) if any problems are encountered\&.
|
||||
.RE
|
||||
.SS "ACCESS\&.CONF VARIABLES"
|
||||
.sp
|
||||
This section describes the access control directives in the \fIaccess\&.conf\fR file\&. Theses directives define encryption keys and level of access that is granted to \fBfwknop\fR clients that have generated the appropriate encrypted message\&.
|
||||
.sp
|
||||
The \fIaccess\&.conf\fR variables described below provide the access directives for the SPA packets with a source (or embeded request) IP that matches an address or network range defined by the \(lqSOURCE\(rq variable\&. All variables following \(lqSOURCE\(rq apply to the source \fIstanza\fR\&. Each \(lqSOURCE\(rq directive starts a new stanza\&.
|
||||
.PP
|
||||
\fBSOURCE\fR: \fI<IP,\&.\&.,IP/NET,\&.\&.,NET/ANY>\fR
|
||||
.RS 4
|
||||
This defines the source address from which the SPA packet will be accepted\&. The string \(lqANY\(rq is also accepted if a valid SPA packet should be honored from any source IP\&. Every authorization stanza in
|
||||
\fIaccess\&.conf\fR
|
||||
definition must start with the \(lqSOURCE\(rq keyword\&. Networks should be specified in CIDR notation (e\&.g\&. \(lq192\&.168\&.10\&.0/24\(rq), and individual IP addresses can be specified as well\&. Also, multiple IP\(cqs and/or networks can be defined as a comma separated list (e\&.g\&. \(lq192\&.168\&.10\&.0/24,10\&.1\&.1\&.123\(rq)
|
||||
.RE
|
||||
.PP
|
||||
\fBOPEN_PORTS\fR: \fI<proto/port>,\&...,<proto/port>\fR
|
||||
.RS 4
|
||||
Define a set of ports and protocols (tcp or udp) that will be opened if a valid knock sequence is seen\&. If this entry is not set,
|
||||
\fBfwknopd\fR
|
||||
will attempt to honor the request specifed in the SPA data (unless of it matches any \(lqRESTRICT_PORTS\(rq entries)\&. Multiple entries are comma\-separated\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBRESTRICT_PORTS\fR: \fI<proto/port>,\&...,<proto/port>\fR
|
||||
.RS 4
|
||||
Define a set of ports and protocols (tcp or udp) that are explicitly
|
||||
\fBnot\fR
|
||||
allowed regardless of the validity of the incoming SPA packet\&. Multiple entries are comma\-separated\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBKEY\fR: \fI<password>\fR
|
||||
.RS 4
|
||||
Define the key used for decrypting an incoming SPA packet that is using its built\-in (Rijndael) encryption\&. This variable is required for all non\-GPG\-encrypted SPA packets\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBFW_ACCESS_TIMEOUT\fR: \fI<seconds>\fR
|
||||
.RS 4
|
||||
Define the length of time access will be granted by
|
||||
\fBfwknopd\fR
|
||||
through the firewall after a valid knock sequence from a source IP address\&. If \(lqFW_ACCESS_TIMEOUT\(rq is not set then the default timeout of 120 seconds (2 minutes) will automatically be set\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBENABLE_CMD_EXEC\fR: \fI<Y/N>\fR
|
||||
.RS 4
|
||||
This instructs
|
||||
\fBfwknopd\fR
|
||||
to accept complete commands that are contained within an authorization packet\&. Any such command will be executed as root by the
|
||||
\fBfwknopd\fR
|
||||
server\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBCMD_REGEX\fR: \fI<regex>\fR \fI(NOT IMPLEMENTED)\fR
|
||||
.RS 4
|
||||
If \(lqENABLE_CMD_EXEC\(rq is specified, the \(lqCMD_REGEX\(rq keyword instructs
|
||||
\fBfwknopd\fR
|
||||
to restrict command execution to only those command that match the given regular expression\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBREQUIRE_USERNAME\fR: \fI<username>\fR
|
||||
.RS 4
|
||||
Require a specific username from the client system as encoded in the SPA data\&. This variable is optional and if not specified, the username data in the SPA data is ignored\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBREQUIRE_SOURCE_ADDRESS:\fR \fI<Y/N>\fR
|
||||
.RS 4
|
||||
Force all SPA packets to contain a real IP address within the encrypted data\&. This makes it impossible to use the
|
||||
\fB\-s\fR
|
||||
command line argument on the
|
||||
\fBfwknop\fR
|
||||
client command line, so either
|
||||
\fB\-R\fR
|
||||
has to be used to automatically resolve the external address (if the client behind a NAT) or the client must know the external IP\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBGPG_HOME_DIR\fR: \fI<path>\fR
|
||||
.RS 4
|
||||
Define the path to the GnuPG directory to be used by the
|
||||
\fBfwknopd\fR
|
||||
server\&. If this keyword is not specified within
|
||||
\fIaccess\&.conf\fR
|
||||
then
|
||||
\fBfwknopd\fR
|
||||
will default to using the
|
||||
\fI/root/\&.gnupg\fR
|
||||
directory for the server key(s) for incoming SPA packets handled by the matching
|
||||
\fIaccess\&.conf\fR
|
||||
stanza\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBGPG_DECRYPT_ID\fR: \fI<keyID>\fR
|
||||
.RS 4
|
||||
Define a GnuPG key ID to use for decrypting SPA messages that have been encrypted by an
|
||||
\fBfwknop\fR
|
||||
client\&. This keyword is required for authentication that is based on GPG keys\&. The GPG key ring on the client must have imported and signed the
|
||||
\fBfwknopd\fR
|
||||
server key, and vice versa\&. It is ok to use a sensitive personal GPG key on the client, but each
|
||||
\fBfwknopd\fR
|
||||
server should have its own GPG key that is generated specifically for fwknop communications\&. The reason for this is that the decryption password for the server key must be placed within the
|
||||
\fIaccess\&.conf\fR
|
||||
file for
|
||||
\fBfwknopd\fR
|
||||
to function (it has to be able to decrypt SPA messages that have been encrypted with the server\(cqs public key)\&. For more information on using fwknop with GnuPG keys, see the following link: \(lqhttp://www\&.cipherdyne\&.org/fwknop/docs/gpghowto\&.html\(rq\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBGPG DECRYPT_PW\fR: \fI<decrypt password>\fR
|
||||
.RS 4
|
||||
Specify the decryption password for the gpg key defined by the \(lqGPG_DECRYPT_ID\(rq above\&. This is a required field for gpg\-based authentication\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBGPG_REMOTE_ID\fR: \fI<keyID,\&...,keyID>\fR
|
||||
.RS 4
|
||||
Define a list of gpg key ID\(cqs that are required to have signed any incoming SPA message that has been encrypted with the
|
||||
\fBfwknopd\fR
|
||||
server key\&. This ensures that the verification of the remote user is accomplished via a strong cryptographic mechanism\&.
|
||||
.RE
|
||||
.SH "FILES"
|
||||
.PP
|
||||
\fB/etc/fwknop/fwknop\&.conf\fR
|
||||
.RS 4
|
||||
The main configuration file for fwknop\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB/etc/fwknop/access\&.conf\fR
|
||||
.RS 4
|
||||
Defines all knock sequences and access control directives\&.
|
||||
.RE
|
||||
.SH "DEPENDENCIES"
|
||||
.sp
|
||||
The \fBfwknopd\fR daemon requires a functioning Netfilter firewall on the underlying operating system\&.
|
||||
.SH "DIAGNOSTICS"
|
||||
.sp
|
||||
\fBfwknopd\fR can be run in debug mode with the \fB\-\-debug\fR command line option\&. This will disable daemon mode execution, and print verbose information to the screen on STDERR as packets are received\&.
|
||||
.SH "SEE ALSO"
|
||||
.sp
|
||||
fwknop(8), iptables(8), gpg(1), gpg\-agent(1), libfko docmentation\&.
|
||||
.SH "AUTHOR"
|
||||
.sp
|
||||
Damien Stuart <dstuart@dstuart\&.org>
|
||||
.br
|
||||
Michael Rash <mbr@cipherdyne\&.org>
|
||||
.SH "CREDITS"
|
||||
.sp
|
||||
This \(lqC\(rq version of \fBfwknopd\fR was derived from the original Perl\-based version on which many people who are active in the open source community have contributed\&. See the \fICREDITS\fR file in the fwknop sources, or visit \fIhttp://www\&.cipherdyne\&.org/fwknop/docs/contributors\&.html\fR to view the online list of contributors\&.
|
||||
.sp
|
||||
The phrase \(lqSingle Packet Authorization\(rq was coined by MadHat and Simple Nomad at the BlackHat Briefings of 2005 (see: \fIhttp://www\&.nmrc\&.org\fR)\&.
|
||||
.SH "BUGS"
|
||||
.sp
|
||||
Send bug reports to dstuart@dstuart\&.org\&. Suggestions and/or comments are always welcome as well\&.
|
||||
.SH "DISTRIBUTION"
|
||||
.sp
|
||||
\fBfwknopd\fR is distributed under the GNU General Public License (GPL), and the latest version may be downloaded from \fIhttp://www\&.cipherdyne\&.org\fR\&.
|
||||
Loading…
x
Reference in New Issue
Block a user