Linux Firewalls Enhancing Security with nftables and Beyond
Linux Firewalls Enhancing Security with nftables and Beyond
Fourth Edition
Steve Suehring
AAddison-Wesley
Upper Saddle River, NJ • Boston •
Indianapolis • San Francisco
New York • Toronto • Montreal • London •
Munich • Paris • Madrid
Capetown •
Sydney •
Tokyo •
Singapore • Mexico City
Contents
Preface xlx
Next Steps 7
IP Fragmentation 11
ICMP 12
Transport Mechanisms 14
UDP 14
TCP 14
System 19
Summary 23
2 Packet-Filtering Concepts 25
A Packet-Filtering Rrewall 26
Denial-of-Service Attacks 39
Source-Routed Packets 46
Summary 50
iptables Features 55
iptables Syntax 61
Summary 82
Program 83
nf tables Features 84
nf tables Syntax 85
Table Syntax 85
Chain Syntax 86
Rule Syntax 87
Summary 93
Examples 100
Summary 141
tcp-state-flags 165
connection-tracking 166
local-dhcp-client-query and
remote-dhcp-server-response 166
Contents
source-address-check 167
destination-address-check 168
Summary 177
Summary 195
Summary 210
Contents
Nmap 227
Summary 227
IPsec 230
Openswan/Libreswan 233
OpenVPN 233
PPTP 233
Summary 234
Summary 247
ARPWatch 251
Swatch 256
Summary 261
Summary 293
Summary 310
C Glossary 351
0. Preamble 363
4. Modifications 366
8. Translation 368
9. Termination 369
Index 371