Foreword |
|
xiii | |
|
Acknowledgments |
|
xv | |
Introduction |
|
xvii | |
This is Not a HOWTO |
|
xviii | |
What This Book Covers |
|
xviii | |
|
1 Building the Network You Need |
|
|
1 | (10) |
|
Your Network: High Performance, Low Maintenance, and Secure |
|
|
1 | (2) |
|
Where the Packet Filter Fits In |
|
|
3 | (1) |
|
|
3 | (2) |
|
If You Came from Elsewhere |
|
|
5 | (4) |
|
|
6 | (1) |
|
Frequently Answered Questions About PF |
|
|
7 | (2) |
|
A Little Encouragement: A PF Haiku |
|
|
9 | (2) |
|
2 PF Configuration Basics |
|
|
11 | (14) |
|
The First Step: Enabling PF |
|
|
12 | (4) |
|
|
12 | (1) |
|
|
13 | (2) |
|
|
15 | (1) |
|
A Simple PF Rule Set: A Single, Stand-Alone Machine |
|
|
16 | (2) |
|
|
16 | (2) |
|
|
18 | (1) |
|
Slightly Stricter: Using Lists and Macros for Readability |
|
|
18 | (4) |
|
A Stricter Baseline Rule Set |
|
|
19 | (1) |
|
Reloading the Rule Set and Looking for Errors |
|
|
20 | (1) |
|
|
21 | (1) |
|
Testing the Changed Rule Set |
|
|
21 | (1) |
|
Displaying Information About Your System |
|
|
22 | (1) |
|
|
23 | (2) |
|
|
25 | (16) |
|
|
26 | (8) |
|
Keep It Simple: Avoid the Pitfalls of in, Out, and on |
|
|
26 | (1) |
|
Network Address Translation vs. IPv6 |
|
|
27 | (1) |
|
Final Preparations: Defining Your Local Network |
|
|
28 | (1) |
|
|
29 | (4) |
|
|
33 | (1) |
|
|
34 | (2) |
|
If We Must: ftp-proxy with Redirection |
|
|
34 | (2) |
|
Making Your Network Troubleshooting Friendly |
|
|
36 | (3) |
|
Do We Let it All Through? |
|
|
37 | (1) |
|
The Easy Way Out: The Buck Stops Here |
|
|
37 | (1) |
|
|
37 | (1) |
|
|
38 | (1) |
|
|
38 | (1) |
|
Tables Make Your Life Easier |
|
|
39 | (2) |
|
4 Wireless Networks Made Easy |
|
|
41 | (18) |
|
A Little IEEE 802.11 Background |
|
|
42 | (2) |
|
|
42 | (1) |
|
|
43 | (1) |
|
|
43 | (1) |
|
The Right Hardware for the Task |
|
|
44 | (1) |
|
Setting Up a Simple Wireless Network |
|
|
44 | (10) |
|
An OpenBSD WPA Access Point |
|
|
47 | (1) |
|
A FreeBSD WPA Access Point |
|
|
48 | (1) |
|
The Access Point's PF Rule Set |
|
|
49 | (1) |
|
Access Points with Three ro More Interfaces |
|
|
50 | (1) |
|
Handling IPSec, VPN Solutions |
|
|
50 | (1) |
|
|
51 | (3) |
|
Guarding Your Wireless Network with authpf |
|
|
54 | (5) |
|
A Basic Authenticating Gateway |
|
|
55 | (2) |
|
Wide Open but Actually Shut |
|
|
57 | (2) |
|
5 Bigger or Trickier Networks |
|
|
59 | (26) |
|
A Web Server and Mail Server on the inside---Routable Addresses |
|
|
60 | (11) |
|
A Degree of Separation: Introducing the DMZ |
|
|
63 | (2) |
|
Sharing the Load: Redirecting to a Pool of Addresses |
|
|
65 | (1) |
|
Getting Load Balancing Right with relayd |
|
|
66 | (5) |
|
A Web Server and Mail Server on the Inside---the NAT Version |
|
|
71 | (5) |
|
|
73 | (1) |
|
Redirection for Load Balancing |
|
|
73 | (1) |
|
Back to the Single NATed Network |
|
|
74 | (2) |
|
Filtering on Interface Groups |
|
|
76 | (1) |
|
|
77 | (1) |
|
|
78 | (5) |
|
Basic Bridge Setup on OpenBSD |
|
|
79 | (1) |
|
Basic Bridge Setup on FreeBSD |
|
|
80 | (1) |
|
Basic Bridge Setup on NetBSD |
|
|
81 | (1) |
|
|
82 | (1) |
|
Handling Nonroutable Addresses from Elsewhere |
|
|
83 | (2) |
|
6 Turning the Tables for Proactive Defense |
|
|
85 | (20) |
|
|
86 | (3) |
|
|
86 | (1) |
|
Setting Up an Adaptive Firewall |
|
|
86 | (3) |
|
Tidying Your Tables with pfctl |
|
|
89 | (1) |
|
Giving Spammers a Hard Time with spamd |
|
|
89 | (15) |
|
Network-Level Behavior Analysis and Blacklisting |
|
|
90 | (3) |
|
Greylisting: My Admin Told Me Not to Talk to strangers |
|
|
93 | (5) |
|
Tracking Your Real Mail Connections: spamlogd |
|
|
98 | (1) |
|
|
98 | (2) |
|
Managing Lists with spamdb |
|
|
100 | (2) |
|
Detecting Out-of-Order MX Use |
|
|
102 | (1) |
|
Handling Sites That Do Not Play Well with Greylisting |
|
|
102 | (2) |
|
|
104 | (1) |
|
7 Queues, Shaping, and Redundancy |
|
|
105 | (26) |
|
Directing Traffic with ALTQ |
|
|
105 | (3) |
|
|
106 | (1) |
|
Queue Schedulers, aka Queue Disciplines |
|
|
106 | (1) |
|
|
107 | (1) |
|
|
108 | (11) |
|
|
109 | (3) |
|
Class-Based Bandwidth Allocation for Small Networks |
|
|
112 | (1) |
|
A Basic HFSC Traffic Shaper |
|
|
113 | (2) |
|
Queueing for Servers in a DMZ |
|
|
115 | (2) |
|
Using ALTQ to Handle Unwanted Traffic |
|
|
117 | (2) |
|
Redundancy and Failover: CARP and pfsync |
|
|
119 | (12) |
|
The Project Specification: A Redundant Pair of Gateways |
|
|
119 | (2) |
|
|
121 | (4) |
|
Keeping States Synchronized: Adding pfsync |
|
|
125 | (1) |
|
Putting Together a Rule Set |
|
|
126 | (2) |
|
|
128 | (3) |
|
8 Logging, Monitoring, and Statistics |
|
|
131 | (20) |
|
|
132 | (7) |
|
Logging All Packets: log (all) |
|
|
134 | (1) |
|
Logging to Several pflog Interfaces |
|
|
135 | (1) |
|
Logging to Syslog, Local or Remote |
|
|
135 | (2) |
|
Tracking Statistics for Each Rule with Labels |
|
|
137 | (2) |
|
Additional Tools for PF Logs and Statistics |
|
|
139 | (11) |
|
Keeping an Eye on Things with systat |
|
|
139 | (2) |
|
Keeping an Eye on Things with pftop |
|
|
141 | (1) |
|
Graphing Your Traffic with pfstat |
|
|
141 | (2) |
|
Collecting NetFlow Data with pflow(4) |
|
|
143 | (6) |
|
Collecting NetFlow Data with pfflowd |
|
|
149 | (1) |
|
SNMP Tools and PF-Related SNMP MIBs |
|
|
150 | (1) |
|
Log Data as the Basis for Effective Debugging |
|
|
150 | (1) |
|
9 Getting Your Setup Just Right |
|
|
151 | (16) |
|
Things You Can Tweak and What You Probably Should Leave Alone |
|
|
151 | (7) |
|
|
152 | (1) |
|
|
152 | (1) |
|
|
153 | (1) |
|
|
153 | (1) |
|
|
154 | (1) |
|
|
155 | (1) |
|
|
156 | (1) |
|
|
157 | (1) |
|
|
158 | (1) |
|
|
158 | (1) |
|
|
158 | (2) |
|
Packet Normalization with scrub |
|
|
158 | (1) |
|
Protecting Against Spoofing with antispoof |
|
|
159 | (1) |
|
|
160 | (2) |
|
|
162 | (3) |
|
Know Your Network and Stay in Control |
|
|
165 | (2) |
|
|
167 | (6) |
|
General Networking and BSD Resources on the Internet |
|
|
167 | (2) |
|
Sample Configurations and Related Musings |
|
|
169 | (1) |
|
|
170 | (1) |
|
|
170 | (1) |
|
Wireless Networking Resources |
|
|
171 | (1) |
|
spamd and Greylisting-Related Resources |
|
|
171 | (1) |
|
Book-Related Web Resources |
|
|
172 | (1) |
|
Buy OpenBSD CDs and Donatel |
|
|
172 | (1) |
|
B A NOTE ON HARDWARE SUPPORT |
|
|
173 | (4) |
|
Getting the Right Hardware |
|
|
174 | (1) |
|
Issues Facing Hardware Support Developers |
|
|
175 | (1) |
|
How to Help the Hardware Support Efforts |
|
|
175 | (2) |
Index |
|
177 | |