From 33cb0d48269ec95866eade22bbe854d6955bed35 Mon Sep 17 00:00:00 2001 From: Michael Rash Date: Sat, 16 Jan 2010 22:09:14 +0000 Subject: [PATCH] added --server-cmd arg to fwknop client man page and help output git-svn-id: file:///home/mbr/svn/fwknop/trunk@197 510a4753-2344-4c79-9c09-4d669213fbeb --- client/config_init.c | 3 ++- client/config_init.h | 2 +- doc/fwknop.man.asciidoc | 27 +++++++++++++++++---------- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/client/config_init.c b/client/config_init.c index 9d4b4165..8fdd57e2 100644 --- a/client/config_init.c +++ b/client/config_init.c @@ -471,13 +471,14 @@ usage(void) fprintf(stderr, "Usage: fwknop -A [-s|-R|-a] -D [options]\n\n" " -h, --help Print this usage message and exit.\n" - " -c, --config-file Specify an alternate configuration file.\n" " -A, --access Provide a list of ports/protocols to open\n" " on the server.\n" " -B, --save-packet Save the generated packet data to the\n" " specified file.\n" " -a, --allow-ip Specify IP address to allow within the SPA\n" " packet.\n" + " -C, --server-cmd Specify a command that the fwknop server will\n" + " execute on behalf of the fwknop client..\n" " -D, --destination Specify the IP address of the fwknop server.\n" " -N, --nat-access Gain NAT access to an internal service\n" " protected by the fwknop server.\n" diff --git a/client/config_init.h b/client/config_init.h index f520d6e3..bc61e804 100644 --- a/client/config_init.h +++ b/client/config_init.h @@ -62,7 +62,7 @@ static struct option cmd_opts[] = {"save-packet-append", 0, NULL, 'b'}, {"save-packet", 1, NULL, 'B'}, {"no-save-args", 0, NULL, NO_SAVE_ARGS}, - {"server-command", 1, NULL, 'C'}, + {"server-cmd", 1, NULL, 'C'}, {"digest-type", 1, NULL, FKO_DIGEST_NAME}, {"destination", 1, NULL, 'D'}, {"fw-timeout", 1, NULL, 'f'}, diff --git a/doc/fwknop.man.asciidoc b/doc/fwknop.man.asciidoc index 54a05a55..f4a211b8 100644 --- a/doc/fwknop.man.asciidoc +++ b/doc/fwknop.man.asciidoc @@ -79,7 +79,7 @@ syslog and email alerts are generated if a replay is detected (although this can be tuned via the *ALERTING_METHODS* variable in the '/etc/fwknop/fwknop.conf' file). By default, the *fwknop* client sends authorization packets over UDP port 62201, but this can be altered with the -*--Server-port* argument. The server must first be configured to acquire the +*--server-port* argument. The server must first be configured to acquire the SPA data on the changed protocol-port. Also, *fwknop* can send the SPA packet over a random port via the *--rand-port* argument. See 'fwknopd(8)' for further details. See the *EXAMPLES* section for example invocations of the @@ -99,7 +99,7 @@ REQUIRED ARGUMENTS running *fwknopd*. The format of this list is ``+/.../+'', e.g. ``tcp/22,udp/53''. *NOTE:* The vast majority of usages for *fwknop* require the *-A* argument, but - sending full commands with the *--Server-cmd* argument via an SPA + sending full commands with the *--server-cmd* argument via an SPA packet to be executed by *fwknopd* does not require this argument. *-R|-a|-s*:: @@ -118,20 +118,20 @@ GENERAL OPTIONS Instruct the *fwknop* client to write a newly created SPA packet out to the specified file so that it can be examined off-line. +*-G, --get-key*='':: + Load an encryption key/password from the specified file. + *-l, --last-cmd*:: Execute *fwknop* with the command-line arguments from the previous invocation (if any). The previous arguments are parsed out of the '~/.fwknop.run' file. -*-G, --get-key*='':: - Load an encryption key/password from the specified file. +*-q, --quiet*:: + Perform *fwknop* functions quietly (suppress informational output). *--show-last*:: Display the last command-line arguments used by *fwknop*. -*-q, --quiet*:: - Perform *fwknop* functions quietly (suppress informational output). - *-T, --test*:: Test mode. Generate the SPA packet data, but do not send it. Instead, print a break-down of the SPA data fields, then run the data through @@ -163,6 +163,12 @@ SPA OPTIONS system is connected to by querying the 'http://www.whatismyip.com' website. +*-C, --server-cmd*='':: + Instead of requesting access to a service with an SPA packet, the + *--server-cmd* argument specifies a command that will be executed by + the *fwknopd* server. The command is encrypted within the SPA packet + and sniffed off the wire (as usual) by the *fwknopd* server. + *-g, --gpg-encryption*:: Use GPG encryption on the SPA packet (default if not specified is Rijndael). *Note:* Use of this option will require the specification of @@ -170,9 +176,10 @@ SPA OPTIONS options below). *-H, --http-proxy*='':: - Specify an HTTP *fwknopd* client will use to send the SPA packet through. - Using this option will automatically set the SPA packet transmission mode - (usually set via the *--server-proto* argument) to ``http''. + Specify an HTTP proxy that the *fwknop* client will use to send the SPA + packet through. Using this option will automatically set the SPA packet + transmission mode (usually set via the *--server-proto* argument) to + ``http''. *-m, --digest-type*='':: Specify the message digest algorithm to use in the SPA data. Choices