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

Rules and Keywords
IPFilter Keywords
Chapter 228
from and to: Filtering by IP Addresses and Subnets
IPFilter can pass or block packets based on both source and destination
IP addresses. It can also filter on subnets.
To configure IPFilter to pass or block packets based on their source IP
address, use the from
ip_address
keyword. For example:
block in quick from 192.168.0.0 to any
For traffic coming from any address within a subnet, you can use from
with the following subnet address syntax:
block in quick from 192.168.0.0/16 to any
For traffic coming from any address within a range of addresses, you can
use from with the following address range syntax:
block in quick from 192.168.32.2-192.168.32.100 to any
To configure IPFilter to pass or block packets based on their destination
IP address, use the to
ip_address
keyword. For example:
block in quick from any to 192.168.0.0
For packets originating in or destined for a subnet, you can use either to
or from with any of the following subnet address syntaxes:
A standard dot-notation address mask, for example:
pass in from 192.168.1.1 to any
A single hexadecimal number with a leading 0x, for example:
pass in proto tcp from 0xc0a80101 to any
or use the integer format, for example:
pass in from 3232235777 to any
NOTE 0xc0a80101 and 3233325777 are the hexadecimal and integer
representations of 192.168.1.1, respectively.
A Classless Inter-Domain Routing (CIDR) notation, such as:
pass in from 192.168.1.1/24 to any