HP-UX System Administrator's Guide: Security Management HP-UX 11i v3 (B3921-90020, September 2010)

Table Of Contents
Protocol Specifies the networking protocol that applies to this rule.
The options are:
tcp: This rule applies to the TCP protocol.
udp: This rule applies to the UDP protocol.
raw: This rule applies to any other protocol in the INET
domain.
protonum
The protocol number specified for this rule. The protonum
option is relevant only for raw specification.
port
(Optional) Specifies that this rule applies to a specific port.
port Identifies the port specified in this rule.
peer
(Optional) The port information applies to the peer endpoint
involved in the communication for this rule.
compartment_name The compartment name associated with the peer endpoint
or interface this rule applies to.
For example:
/* allow all inbound TCP connections(any port)from interfaces labeled lancmpt1 */
grant server tcp lancmpt1
/* allow DNS client lookups (both TCP and UDP) through interface labeled lancmpt1 */
grant client tcp port 53 lancmpt1
grant bidir udp port 53 lancmpt1
/* allow only outbound telnet connections through interface labeled ifacelan0 */
grant client tcp peer port 23 ifacelan0
/* allow all TCP traffic except inbound telnet through interface labeled ifacelan0 */
/* the following two lines can be specified in either order */
grant bidir tcp ifacelan0
deny server tcp port 23 ifacelan0
/* allow inbound web server traffic through interface lan1cmpt */
grant server tcp port 80 lan1cmpt
For more information about network rules, see compartments(4).
6.4.5 Miscellaneous Rules
These are rules that do not fit neatly into any other rules category.
Network Interface Rules A network interface rule specifies the compartment that an
interface belongs to. A network interface that is not in a compartment cannot be brought
on line.
6.4 Compartment Rules and Syntax 119