Commit Graph

23 Commits

Author SHA1 Message Date
rmind
4b85474b41 - Expire all sessions on flush.
- Enable checking for zero mask in IP{4,6}MATCH after npfctl changes.
- Make locking symmetric for npf_ruleset_inspect().
- Sync function prototypes in npf(3) man page with reality.
- Rename NPF_TABLE_RBTREE to NPF_TABLE_TREE.
2012-01-15 00:49:47 +00:00
christos
a079a21d6c handle variables that contain variables 2012-01-12 20:41:33 +00:00
joerg
4c70cdf100 Use __dead 2012-01-10 23:39:11 +00:00
rmind
ee48c623f2 npfctl_ncgen_putptr: use correct format for size_t. 2012-01-09 01:47:09 +00:00
christos
058e423965 update. 2012-01-08 22:14:55 +00:00
rmind
d3c56566f0 Full rewrite of npfctl(8) parser and rework of n-code generation part.
Fixes most of the known bugs and issues with the utility.  Note: rule
procedures are not yet (as we want to make them fully modular).

Huge thanks to Martin Husemann who wrote the parser and Christos Zoulas
who wrote intermediate structures and helped to complete the work.
2012-01-08 21:34:21 +00:00
riz
8747d13883 Remove quotes from "hash" and "tree" in the table examples so
the example stands a chance of actually working as written.  There appear
to be other problems, too.
2011-11-29 01:12:09 +00:00
jakllsch
7c5be444d3 freeaddrinfo() only on getaddrinfo() success. 2011-11-05 19:19:29 +00:00
zoltan
5a5d868dc5 Add IPv6 support for NPF. 2011-11-04 01:00:27 +00:00
joerg
bec77c5f43 Use __dead 2011-08-31 13:32:36 +00:00
jruoho
b0ced04988 As per request from the author, put non-standard PERFORMANCE back. 2011-03-24 05:48:54 +00:00
jruoho
761da725b5 Use 'offset indent' for the list of commands. Emphasize valid commands.
Remove PERFORMANCE (too small paragraph to warrant a section).
2011-03-22 07:40:10 +00:00
jruoho
b9f2143d66 Use .Ss for non-standard subtitles in the DESCRIPTION. 2011-03-22 07:31:42 +00:00
rmind
3bb326c464 Fix sun2 builds. Noted by joerg@. 2011-02-04 00:19:51 +00:00
rmind
07ac07d35f NPF checkpoint:
- Add libnpf(3) - a library to control NPF (configuration, ruleset, etc).
- Add NPF support for ftp-proxy(8).
- Add rc.d script for NPF.
- Convert npfctl(8) to use libnpf(3) and thus make it less depressive.
  Note: next clean-up step should be a parser, once dholland@ will finish it.
- Add more documentation.
- Various fixes.
2011-02-02 02:20:24 +00:00
rmind
f938371887 NPF checkpoint:
- Add the concept of rule procedure: separate normalization, logging and
  potentially other functions from the rule structure.  Rule procedure can be
  shared amongst the rules.  Separation is both at kernel level (npf_rproc_t)
  and configuration ("procedure" + "apply").
- Fix portmap sharing for NAT policy.
- Update TCP state tracking logic.  Use TCP FSM definitions.
- Add if_byindex(), OK by matt@.  Use in logging for the lookup.
- Fix traceroute ALG and many other bugs; misc clean-up.
2011-01-18 20:33:45 +00:00
rmind
628e094cdc NPF checkpoint:
- Add support for session saving/restoring.
- Add packet logging support (can tcpdump a pseudo-interface).
- Support reload without flushing of sessions; rework some locking.
- Revisit session mangement, replace linking with npf_sentry_t entries.
- Add some counters for statistics, using percpu(9).
- Add IP_DF flag cleansing.
- Fix various bugs; misc clean-up.
2010-12-18 01:07:25 +00:00
rmind
97b932f123 NPF checkpoint:
- Add proper TCP state tracking as described in Guido van Rooij paper,
  plus handle TCP Window Scaling option.
- Completely rework npf_cache_t, reduce granularity, simplify code.
- Add npf_addr_t as an abstraction, amend session handling code, as well
  as NAT code et al, to use it.  Now design is prepared for IPv6 support.
- Handle IPv4 fragments i.e. perform packet reassembly.
- Add support for IPv4 ID randomization and minimum TTL enforcement.
- Add support for TCP MSS "clamping".
- Random bits for IPv6.  Various fixes and clean-up.
2010-11-11 06:30:39 +00:00
rmind
63012b51f1 NPF checkpoint:
- Add support for bi-directional NAT and redirection / port forwarding.
- Finish filtering on ICMP type/code and add filtering on TCP flags.
- Add support for TCP reset (RST) or ICMP destination unreachable on block.
- Fix a bunch of bugs; misc cleanup.
2010-09-16 04:53:27 +00:00
kim
cd552cca7d Fix remaining references for npf.conf(8) to npf.conf(5) 2010-09-14 11:04:57 +00:00
rmind
3b6fdb92e5 Move npf.conf(5-8) into the correct section, hence npf.conf(5). 2010-08-24 23:55:04 +00:00
jnemeth
08e3aa9c11 fix build failure -- correct printf sizes 2010-08-23 06:01:04 +00:00
rmind
2e6f2099c6 Import NPF - a packet filter. Some features:
- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
  Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
  supporting generic RISC-like and specific CISC-like instructions for
  common patterns (e.g. IPv4 address matching).  See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@
2010-08-22 18:56:18 +00:00