September 2005
Intermediate to advanced
552 pages
13h 30m
English
The goal of optimization is to get the packet through the filter processing as quickly as possible, with as few unnecessary tests as possible. Ideally, you want the packets flowing through at line speed.
In terms of the firewall itself, three factors affect performance: the number of rules installed in the kernel; the chain traversal length, or the number of rules that any given packet is tested against before it matches; and the total number of match tests performed on the packet. Also, when it comes to using the state module, remember that the trade-off is speed versus memory.
By way of example, consider the FTP client-out and server-in rules, and compare the straight-through firewall presented in Chapter 4 with the ...