IP FILTER(4) | Device Drivers Manual | IP FILTER(4) |
Special provision is made for the three most common Internet protocols, TCP, UDP and ICMP. The IP Packet filter allows filtering of:
To keep track of the performance of the IP packet filter, a logging device is used which supports logging of:
A packet can be logged when:
IP Filter keeps its own set of statistics on:
ipf(8) reads in a set of rules, from either stdin or a file, and adds them to the kernels current list (appending them). It can also be used to flush the current filter set or delete individual filter rules. The file format is described in ipf(5).
ipfs(8) is a utility to temporarily lock the IP Filter kernel tables (state tables and NAT mappings) and write them to disk. After that the system can be rebooted, and ipfs can be used to read these tables from disk and restore them into the kernel. This way the system can be rebooted without the connections being terminated.
ipfstat(8) interrogates the kernel for statistics on packet filtering, so far, and retrieves the list of filters in operation for inbound and outbound packets.
ipftest(1) reads in a filter rule file and then applies sample IP packets to the rule file. This allows for testing of filter list and examination of how a packet is passed along through it.
ipmon(8) reads buffered data from the logging device (default is /dev/ipl) for output to either:
ipsend(1) generates arbitary IP packets for ethernet connected machines.
ipresend(1) reads in a data file of saved IP packets (ie snoop/tcpdump/etherfind output) and sends it back across the network.
iptest(1) contains a set of test "programs" which send out a series of IP packets, aimed at testing the strength of the TCP/IP stack at which it is aimed at. WARNING: this may crash machine(s) targeted!
ipnat(8) reads in a set of rules, from either stdin or a file and adds them to the kernels current list of active NAT rules. NAT rules can also be deleted using ipnat. The format of the configuration file to be used with ipnat is described in ipnat(5).
For use in your own programs (e.g. for writing of transparent application proxies), the programming interface and the associated ioctl's are documented in ipf(4).
Documentation on ioctl's and the format of data saved to the logging character device is provided in ipl(4) so that you may develop your own applications to work with or in place of any of the above.
Similar, the interface to the NAT code is documented in ipnat(4).
IN | V +-------------------------+--------------------------+ | | | | V | | Network Address Translation | | | | | authenticated | | | +-------<---------+ | | | | | | | V | | V IP Accounting | | | | | | | V | | | Fragment Cache Check--+ | | | | | | | V V V | | | Packet State Check-->+ | | | | | | | | +->--+ | | | | | | | V | | | V groups IP Filtering V | | | | | | | | | | +--<-+ | | | | | | | | | +---------------->|<-----------+ | | | | | V | | +---<----+ | | | | | | function | | | | V | | +--->----+ | | | | | V | +--|---<--- fast-route ---<--+ | | | | | | | V | | +-------------------------+--------------------------+ | | | pass only | | | V V [KERNEL TCP/IP Processing] | | | +-------------------------+--------------------------+ | | | | | | V | | | Fragment Cache Check--+ | | | | | | | | V V | | | Packet State Check-->+ | | | | | | | | V | | V | IP Filtering | | | | | V | | | |<-----------+ | | | V | | | IP Accounting | | | | | | | V | | | Network Address Translation | | | | | | | V | | +-------------------------+--------------------------+ | | | pass only V | +--------------------------->| V OUT
BSD |