38 Commits

Author SHA1 Message Date
Michael Rash
6b7a3bbdae [server] Add FORWARD_ALL access.conf wildcard
This is a significant commit that allows iptables firewalls to be used
as an "SPA gateway" for all ports/protocols upon providing a valid SPA
packet. Additional commits will be made to extend this capability, but
this commit adds two new access.conf keywords: FORWARD_ALL and
DISABLE_DNAT. These are used in conjunction to add ACCEPT rules for all
ports/protocols in the FORWARD chain, and also disable DNAT rules at the
same time. Then, by buildling the SNAT chain to provide translation for
an internal network (where an SPA cliet is located), but DROP all
forwarded traffic by default at the same time, SPA can be used to gain
access to the internet. So, this would allow, say, an RFC 1918 internal
network to have IP's assigned via DHCP but they wouldn't be able to
access the internet before sending a SPA packet to the gateway. This
scenario was suggested by spartan1833 to the fwknop list and tracked via
github issue 131.

Additional commits will be made to fully support this feature.
2015-01-17 08:38:32 -05:00
Michael Rash
b5fe62bfc7 [test suite] command exec too many args tests 2014-10-26 16:58:13 -04:00
Michael Rash
837f7780fe [libfko] validate MAX_PORT integer value for SPA messages 2014-10-25 08:42:14 -04:00
Michael Rash
e271442aa9 [server] first cut at converting iptables commands to use execvpe() 2014-10-03 21:58:51 -04:00
Damien Stuart
73186e511a Added WIN32 definitions for popen (_popen) and pclose (_pclose) to accommodate the call to wget on Windows-based systems. 2014-08-30 16:18:46 -04:00
Michael Rash
6d1d66fe03 add --fault-injection-tag support to the client/server/libfko
This is a significant commit to add the ability to leverage libfko fault
injections from both the fwknop client and server command lines via a
new option '--fault-injection-tag <tag name>'.  This option is used by
the test suite with the tests/fault_injection.pl tests.
2014-06-05 23:05:49 -04:00
Michael Rash
ddaf0134d6 use fiu.h instead of fiu-local.h 2014-05-26 15:54:12 -04:00
Michael Rash
15aff82980 client/server added libfiu header files in --enable-libfiu-support mode 2014-05-26 08:39:44 -04:00
Michael Rash
4ba55d6814 fix automake subdir-objects warning on Mac OS X, fixes part of #115 2014-03-17 22:05:45 -04:00
Michael Rash
9e990c9be0 fix header non-ascii chars, and introduce test suite support for detecting this in source files 2014-03-14 09:14:35 -04:00
Michael Rash
bfdbb8f260 Updated authorship and copyright information
This commit updates all authorship and copyright information to include a
standard header that references the AUTHORS and CREDITS file. This standard
header was written by the Debian legal team at the request of Franck Joncourt.
2014-03-04 17:53:10 -05:00
Damien S. Stuart
4b0f0802ee Tweaks to unbreak the windows build: Renamed FD_SET macro to FD_SET_ALT to avoid conflict with the well-known FD_SET macro. Made the client read password from file descriptor a non-supported function on Windows. 2013-07-17 22:46:24 -04:00
Franck Joncourt
c2e1a00154 s/GNU Public/GNU General Public/g 2013-06-30 22:21:22 +02:00
Michael Rash
382099e85a Updated copyright dates, removed NEWS file in favor of the ChangeLog 2013-06-02 14:07:01 -04:00
Damien Stuart
15d9c6197b Fixes to get hmac_support and 2.5 changes working for the Windows lib and client builds. 2013-05-05 13:20:20 -04:00
Franck Joncourt
d93648cf99 Moved/Created proto_intostr() and proto_strtoint() to utils.c.
This allows to update dump_transmit_options() to use the log module to dump data.
2013-04-30 22:22:03 +02:00
Damien Stuart
6ecf81b16e First round if refactoring to clean up header dependencies. 2013-03-02 17:03:20 -05:00
Michael Rash
1afc8db96a Added strtol_wrapper() libfko utility function for atoi() replacement (#21)
This commit replaces most atoi() calls (which don't report errors) with a strtol()
wrapper function for stronger string -> integer conversion validation.
2013-02-18 19:32:53 -05:00
Michael Rash
47f20ea30c merged in the fixes_for_2.0.4 branch 2013-01-19 18:36:52 -05:00
Damien Stuart
e3c4c045c6 Changes to address header references, platform support, error messages, and the perl module test suite.
Rearranged headers to reduce duplication and remove local header
references from fko.h.
Removed references to headers that did not need to be explicitly set.
Moved the MAX_PROTO_STR_LEN and MAX_PORT_STR_LEN definitions to the
fko_limits.h file.
Fixed bug where invalid nat_access or command messages were returning
FKO_ERROR_INVALID_SPA_ACCESS_MSG error code instead of the one
appropriate to the message type.
Fixed bad nat_access_msg test in Perl module test suite (caught by new
validation code).
2012-12-01 11:06:41 -05:00
Damien Stuart
1ec9f4ae94 Re-tweaks for accommodating the windows build and systems that do not have strnlen 2012-11-30 23:40:24 -05:00
Damien Stuart
617305504a Revert "Tweaks to EXTRA_DIST. Added one missing and removed one invalid entry under the test directory."
This reverts commit 556ca2c146a598cddada4dd8cdf3f9b12f32f202.
2012-11-19 12:19:12 -05:00
Damien Stuart
556ca2c146 Tweaks to EXTRA_DIST. Added one missing and removed one invalid entry under the test directory. 2012-11-19 09:30:15 -05:00
Damien Stuart
f499e30900 Tweaks to fix issues with building the lib and client under Windows. Added .fwknop.last support on Windows. Bumped the lib version to 0.0.4. Fixed bug in username detection code. Removed -Werror from AM_INIT_AUTOMAKE which prevented setting of CPPFLAG for the lib build in some circumstances. 2012-11-19 08:43:14 -05:00
Michael Rash
e4751d1c20 added icmp type/code blurb 2012-10-11 23:40:04 -04:00
Michael Rash
229a36625b Better IP spoofing support (udpraw and icmp)
- [client] Added '-P udpraw' to allow the client to send SPA packets over
  UDP with a spoofed source IP address.  This is in addition to the
  original 'tcpraw' and 'icmp' protocols that also support a spoofed
  source IP.
- [server] Bug fix to accept SPA packets over ICMP if the fwknop client
  is executed with '-P icmp' and the user has the required privileges.
2012-10-03 22:56:10 -04:00
Michael Rash
1548cbafc8 get MAX_PORT_STR_LEN constant from fko_message.h 2012-08-31 23:05:05 -04:00
Michael Rash
5ef07c73e2 Better SPA message validation upon SPA decrypt/decode.
Added SPA message validation calls to fko decoding routines to help
ensure that SPA messages conform to expected values.
2012-07-21 15:32:15 -04:00
Michael Rash
9b7c1a8ce6 Added FORCE_NAT mode to the access.conf file
This commit adds a new configuration variable "FORCE_NAT" to the access.conf
file:

    For any valid SPA packet, force the requested connection to be NAT'd
    through to the specified (usually internal) IP and port value.  This is
    useful if there are multiple internal systems running a service such as
    SSHD, and you want to give transparent access to only one internal system
    for each stanza in the access.conf file.  This way, multiple external
    users can each directly access only one internal system per SPA key.

This commit also implements a few minor code cleanups.
2011-11-30 20:51:19 -05:00
Michael Rash
0649ef924a PF support on OpenBSD in progress, fwknop --fw-list now works
This is the first commit that has fwknopd interact with the PF firewall on
OpenBSD (via fwknopd --fw-list to show any active fwknopd rules).
2011-08-27 10:57:17 -04:00
Damien Stuart
0f6ca00ac4 Updated the GPL blurb at the top of the source files. Added some missing copyright statements (Thanks to Franck Joncourt).
git-svn-id: file:///home/mbr/svn/fwknop/trunk@300 510a4753-2344-4c79-9c09-4d669213fbeb
2010-11-13 03:04:36 +00:00
Damien Stuart
838b80fd7d Refactored firewall rule code to separate files by firewall type. Stubbed in ipfw and ipf firewall types. Updated autoconf to set a firewall type and path depending on configure arguments.
git-svn-id: file:///home/mbr/svn/fwknop/trunk@279 510a4753-2344-4c79-9c09-4d669213fbeb
2010-08-10 02:29:09 +00:00
Damien Stuart
dcd6106a4b Oops left out new header for last update.
git-svn-id: file:///home/mbr/svn/fwknop/trunk@277 510a4753-2344-4c79-9c09-4d669213fbeb
2010-08-08 18:56:53 +00:00
Damien Stuart
6126b7b7ca Updates to accomodate building and compiling on FreeBSD systems.
git-svn-id: file:///home/mbr/svn/fwknop/trunk@276 510a4753-2344-4c79-9c09-4d669213fbeb
2010-08-08 18:53:35 +00:00
Damien Stuart
b0886a1d49 Updates and clean-up to address the many compiler warnings when compiled with -Wall. Also some autoconf updates
git-svn-id: file:///home/mbr/svn/fwknop/trunk@265 510a4753-2344-4c79-9c09-4d669213fbeb
2010-07-16 14:28:32 +00:00
Damien Stuart
bbb8f7bcc6 Fixed issues found by the Windows compiler (that I would think would have been flagged by gcc).
git-svn-id: file:///home/mbr/svn/fwknop/trunk@241 510a4753-2344-4c79-9c09-4d669213fbeb
2010-07-07 17:32:21 +00:00
Damien Stuart
5035cf0fed Added .fwknoprc file creation and processing. This allows for saved default and named configuration profiles. Updated fwknop manpage to reflect the new capability. Also cleaned up messages (errors, info) from the program.
git-svn-id: file:///home/mbr/svn/fwknop/trunk@234 510a4753-2344-4c79-9c09-4d669213fbeb
2010-07-05 22:49:03 +00:00
Damien Stuart
53b7fae8bb Major rearrangement. Renamed directories: "fko" to "lib", "src" to "client". Added "common" and "server" directories. Setup autoconf to allow disabling the server and/or client builds.
git-svn-id: file:///home/mbr/svn/fwknop/trunk@127 510a4753-2344-4c79-9c09-4d669213fbeb
2009-08-09 15:43:16 +00:00