HP-UX IPFilter Version A.03.05.14 Administrator's Guide

Contents
iii
Preface: About This Document
1. Installing and Configuring HP-UX IPFilter
Overview of HP-UX IPFilter Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Installation and Configuration Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Step 1: Checking HP-UX IPFilter Installation Prerequisites . . . . . . . . . . . . . . . . . . . . . 4
Step 2: Loading HP-UX IPFilter Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Step 3: Determining the Rules for IPFilter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Step 4: Adding Rules to the Rules Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Adding IPFilter Rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Adding NAT Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Step 5: Loading IPFilter and NAT Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Loading IPFilter Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Removing IPFilter Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Loading NAT Rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Step 6: Verifying the Installation and Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Additional Configuration Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Supported and Unsupported Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Troubleshooting HP-UX IPFilter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2. Rules and Keywords
IPFilter Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
IPFilter Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
IPFilter Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Basic Rules Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
IPFilter Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
pass and block: Controlling IP Traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
in and out: Bidirectional Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
quick: Optimizing IPFilter Rules Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
on: Filtering by Network Interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
from and to: Filtering by IP Addresses and Subnets . . . . . . . . . . . . . . . . . . . . . . . . . 28
log: Tracking Packets on a System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
proto: Controlling Specific Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
opt and ipopts: Filtering on IP Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
icmp-type: Filtering ICMP Traffic by Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
port: Filtering on TCP and UDP Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
keep state: Protecting TCP, UDP, and ICMP Sessions . . . . . . . . . . . . . . . . . . . . . . . . 34
flags: Tight Filtering Based on TCP Header Flags. . . . . . . . . . . . . . . . . . . . . . . . . . . 35