[Top] [Table Of Contents] [Prev] [Next] [Index]

Filters        15


This chapter describes how to use the command line interface to create, edit, and delete filters. Detailed command definitions follow a command summary table.

System administrators can use the command line interface to create appropriate packet filters to control access to specific hosts, networks, and network services.

Once a filter is defined, it can be used with the ptrace command, or attached to an Ethernet interface, network hardwired port, user, or location. If used for route propagation, the filter is assigned to a specified protocol. Filters for network hardwired ports and Ethernet interfaces are set for the port or interface. Filters for dial-in users are set in the user table, or can be referenced by RADIUS. Filters for dial-out locations are set in the location table.

For more information about designing packet filters, refer to the PortMaster Configuration Guide.

Displaying Filter Information

To display information about your filters, use the following filter-specific commands:

Summary of Filter Commands

The commands in Table 15-1 configure the filter table. Filters can be applied to Ethernet interfaces, users, locations, network hardwired ports, or protocols, and can be used for debugging with the ptrace command.

Note ¯ The commands should be entered on one line, without any breaks. Line breaks shown here are due to the limited space available.

 
Filter Table Configuration

Command Syntax

 

add filter Filtername

- see page 15-4

delete filter Filtername

- seepage 15-4

save filter

- seepage 15-5

set filter Filtername RuleNumber permit|deny [Ipaddress/NM Ipaddress(dest)/NM]
[esp|ah|ipip|ospf] [log] [notify]

- see page 15-6

set filter Filtername RuleNumber permit|deny [Ipaddress/NM Ipaddress(dest)/NM]
[protocol Number] [log] [notify]

- see page 15-6

set filter Filtername RuleNumber permit|deny =ListName Ipaddress(dest)/NM
[esp|ah|ipip|ospf] [log] [notify]

- see page 15-6

set filter Filtername RuleNumber permit|deny =ListName Ipaddress(dest)/NM
[protocol Number] [log] [notify]

- seepage 15-6

set filter Filtername RuleNumber permit|deny Ipaddress/NM =ListName
[esp|ah|ipip|ospf] [log] [notify]

- see page 15-6

set filter Filtername RuleNumber permit|deny Ipaddress/NM =ListName
[protocol Number] [log] [notify]

- see page 15-6

set filter Filtername RuleNumber permit|deny
[Ipaddress/NM Ipaddress(dest)/NM] tcp [src eq|lt|gt Tport]
[dst eq|lt|gt Tport] [established] [log] [notify]

- see page 15-9

set filter Filtername RuleNumber permit|deny
=ListName Ipaddress(dest)/NM tcp [src eq|lt|gt Tport]
[dst eq|lt|gt Tport] [established] [log] [notify]

- see page 15-9

set filter Filtername RuleNumber permit|deny
Ipaddress/NM =ListName tcp [src eq|lt|gt Tport]
[dst eq|lt|gt Tport] [established] [log] [notify]

- see page 15-9

set filter Filtername RuleNumber permit|deny
[Ipaddress/NM Ipaddress(dest)/NM] udp [src eq|lt|gt Uport]
[dst eq|lt|gt Uport] [log] [notify]

- see page 15-15

set filter Filtername RuleNumber permit|deny
=ListName Ipaddress(dest)/NM udp [src eq|lt|gt Uport]
[dst eq|lt|gt Uport] [log] [notify]

- see page 15-15

set filter Filtername RuleNumber permit|deny
Ipaddress/NM =ListName udp [src eq|lt|gt Uport]
[dst eq|lt|gt Uport] [log] [notify]

- see page 15-15

set filter Filtername RuleNumber permit|deny
[Ipaddress/NM Ipaddress(dest)/NM] icmp [type Itype] [log] [notify]

- see page 15-18

set filter Filtername RuleNumber permit|deny
=ListName Ipaddress(dest)/NM icmp [type Itype] [log] [notify]

- see page 15-18

set filter Filtername RuleNumber permit|deny
Ipaddress/NM =ListName icmp [type Itype] [log] [notify]

- see page 15-18

set ipxfilter Filtername RuleNumber permit|deny
[srcnet Ipxnetwork] [srchost Ipxnode] [srcsocket eq|gt|lt Ipxsock]
[dstnet Ipxnetwork] [dsthost Ipxnode] [dstsocket eq|gt|lt Ipxsock]

- see page 15-20

set sapfilter Filtername RuleNumber permit|deny
[server String] [network Ipxnetwork] [host Ipxnode] [socket eq|gt|lt Ipxsock]

- see page 15-23

show filter|ipxfilter|sapfilter Filtername

- see page 15-25

show table filter

- see page 15-26

Filter Commands

The following commands create, delete, and modify, and display filters.

Note ¯ If a filter rule is set with no arguments, the rule is removed. If a filter rule is set with arguments without specifying permit or deny, permit is chosen by default.

 

add filter

This command creates a new filter name and adds it to the filter table.

add filter Filtername

Filtername

Name for a filter-up to 15 characters.

Usage

If the filter is to be used by RADIUS, it must end in .in if it is an input filter and .out if it is an output filter. Consider using the same convention to distinguish all input and output filters.

Example

Command> add filter s1.in
New Filter successfully added

delete filter

This command deletes an existing filter from the filter table.

delete filter Filtername

Filtername

Name of a filter in the filter table.

Usage

Use caution when removing filters from the filter table. Make sure that they are no longer needed for any packet filtering.

Example

Command> delete filter s1.in

ComOS provides no automatic response to this command, but you can use the show table filter command to confirm that the filter has been removed from the filter table.

See Also

add filter - page 15-4

show table filter- page 15-26

save filter

This command writes any changes in the filter table to the nonvolatile RAM of the PortMaster.

save filter

Usage

The save all command can also be used.

Example

Command> save filter
Filter table successfully saved
New configurations successfully saved.

set filter (IP)

These commands configure a filter that controls passage of a packet through an interface.

Note ¯ Enter this command on one line, without any breaks. The line breaks shown here are due to the limited space available.

set filter Filtername RuleNumber permit|deny
[Ipaddress/NM Ipaddress(dest)/NM] [esp|ah|ipip|ospf] [log] [notify]

set filter Filtername RuleNumber permit|deny
[Ipaddress/NM Ipaddress(dest)/NM] [protocol Number] [log] [notify]

set filter Filtername RuleNumber permit|deny
=ListName Ipaddress(dest)/NM [esp|ah|ospf] [log] [notify]

set filter Filtername RuleNumber permit|deny
=ListName Ipaddress(dest)/NM [protocol Number] [log] [notify]

set filter Filtername RuleNumber permit|deny
Ipaddress/NM =ListName [esp|ah|ipip] [log] [notify]

set filter Filtername RuleNumber permit|deny
Ipaddress/NM =ListName [protocol Number][log] [notify]

Filtername

Name of an existing filter that is in the filter table.

RuleNumber

Filter rule number-between 1 and 256 for the PortMaster 3 and IRX, and between 1 and 100 for other PortMaster products.

permit

Permits a packet that matches the filter to pass through the interface. This is the default.

deny

Stops a packet that matches the filter from passing through the interface. The packet is dropped, and an ICMP "Host Unreachable" message is sent to the source address.

Ipaddress

IP address expressed in dotted decimal notation or as a hostname, to compare with the source IP address of the packet.

/NM

Netmask that indicates the number of high-order bits of the source or destination IP address of the packet that must match an address in the filter. Any value between 0 and 32 can be used; common mask values are

/0-To match all packets with any address.
/16-Looks at high-order 16 bits of the address.
/24-Looks at high-order 24 bits of the address.
/32-Looks at the entire IP address.

Ipaddress(dest)

IP address expressed in dotted decimal notation, to compare with the destination IP address of the packet. Hostnames are not recognized.

esp

Matches packets using the Encapsulating Security Payload (ESP) protocol. See RFC 1827 for more information on this protocol.

ah

Matches packets using the Authentication Header (AH) protocol. See RFC 1826 for more information on this protocol.

ipip

Matches packets using the IP Encapsulation within IP (IPIP). See RFC 2003 for more information on this protocol.

ospf

Matches packets using OSPF protocol.

log

Packets matching the rule are logged by syslog to the loghost.

notify

Packets matching the rule are logged by syslog to the source of the packet. If you have the ChoiceNet notifier installed, this keyword is used to cause a notification pop-up to appear on your computer.

protocol Number

Matches packets using the specified Internet Protocol. Number is a specified protocol number, as listed in Assigned Numbers RFC 1700.

=ListName

Specifies a list of sites in the /etc/choicenet/lists directory on the ChoiceNet server. The equal sign (=) must immediately precede the value.

Usage

You construct filters by first creating the filter using the command add filter, and then adding rules that permit or deny packets that match the criteria in the rules. You can update an existing filter by setting additional rules with new rule numbers and new filter criteria, or you can edit the existing rules.

You can delete a rule by specifying only the rule number-for example set filter s0.in 4. You cannot use the command line interface to insert a rule between other rules, although you can do so with the PMVision GUI.

Zero-length filters are treated as permit filters. That is, if a filter has no rules at all it permits everything through. If a filter has one or more rules, anything not explicitly permitted by a rule is denied at the end of the filter.

Note ¯ Entering the command set filter Filtername without any arguments removes all filter rules from the filter.

 

Example

Command> set filter w1.in 1 deny 192.168.1.0/24 0.0.0.0/0 log
Filter w1.in updated

See Also

add filter - page 15-4

set choicenet - page 3-29

set loghost - page 3-10

set filter (TCP)

These commands set filtering rules for TCP packets.

Note ¯ Enter this command on one line, without any breaks. The line breaks shown here are due to the limited space available.

set filter Filtername RuleNumber permit|deny
[Ipaddress/NM Ipaddress(dest)/NM] tcp [src eq|lt|gt Tport]
[dst eq|lt|gt Tport] [established] [log] [notify]

set filter Filtername RuleNumber permit|deny
=ListName Ipaddress(dest)/NM tcp [src eq|lt|gt Tport]
[dst eq|lt|gt Tport] [established] [log] [notify]

set filter Filtername RuleNumber permit|deny
Ipaddress/NM =ListName tcp [src eq|lt|gt Tport]
[dst eq|lt|gt Tport] [established] [log] [notify]

Filtername

Name of an existing filter that is in the filter table.

RuleNumber

Filter rule number-between 1 and 256 for the PortMaster 3 and IRX, and between 1 and 100 for other PortMaster products.

permit

Permits a packet that matches the filter to pass through the interface. This is the default.

deny

Stops a packet that matches the filter from passing through the interface. The packet is dropped, and an ICMP "Host Unreachable" message is sent to the source address.

Ipaddress

IP address expressed in dotted decimal notation or as a hostname, to compare with the source IP address of the packet.

/NM

Netmask that indicates the number of high-order bits of the source or destination IP address of the packet that must match an address in the filter. Any value between 0 and 32 can be used; common mask values are

/0-To match all packets with any address.
/16-Looks at high-order 16 bits of the address.
/24-Looks at high-order 24 bits of the address.
/32-Looks at the entire IP address.

Ipaddress(dest)

An IP address expressed in dotted decimal notation or as a hostname, to compare with the destination IP address of the packet.

src

Specifies that the packet source port number be tested; see "Usage" for test criteria.

eq, lt, or gt

Mode of comparison of port numbers; equal to (eq), less than (lt), or greater than (gt).

Tport

Number of the designated TCP port. See Table 15-2 for a list of the port numbers 20 through 1647 commonly assigned to TCP and UDP services.

dst

Specifies that the packet destination port number be tested; see "Usage" for test criteria.

established

Accepts only packets being sent to an established TCP network connection, and denies packets sent to establish new TCP connections.

log

Packets matching the rule are logged by syslog to the loghost.

notify

Packets matching the rule are logged by syslog to the source of the packet. If you have the ChoiceNet notifier installed, this keyword is used to cause a notification pop-up to appear on your computer.

=ListName

Specifies a list of source or destination sites in the /etc/choicenet/lists directory on the ChoiceNet server. The equal sign (=) must immediately precede the value.

 
TCP and UDP Port Services

Service

Port

Protocol

Description

ftp-data

20

TCP

File Transfer Protocol (FTP) (default data)

ftp

21

TCP

FTP (control)

telnet

23

TCP

Telnet

smtp

25

TCP

Simple Mail Transfer Protocol (SMTP) (email)

nicname

43

TCP

whois Internet directory service

nicname

43

UDP

whois Internet directory service

domain

53

TCP

Domain Name System (DNS)

domain

53

UDP

DNS

tftp

69

UDP

Trivial File Transfer Protocol (TFTP)

gopher

70

TCP

Gopher

gopher

70

UDP

Gopher

finger

79

TCP

Finger Protocol

finger

79

UDP

Finger Protocol

www-http

80

TCP

World Wide Web Hypertext Transfer Protocol (HTTP)

kerberos

88

TCP

Kerberos authentication

kerberos

88

UDP

Kerberos authentication

pop3

110

TCP

Post Office Protocol (POP) version 3

sunrpc

111

TCP

SUN Remote Procedure Call (RPC)

sunrpc

111

UDP

SUN RPC

auth

113

TCP

Authentication service

auth

113

UDP

Authentication service

nntp

119

TCP

Network News Transfer Protocol (NNTP)

ntp

123

TCP

Network Time Protocol (NTP)

ntp

123

UDP

NTP

snmp

161

TCP

Simple Network Management Protocol (SNMP)

snmp

161

UDP

SNMP

snmptrap

162

TCP

SNMP system management messages

snmptrap

162

UDP

SNMP system management messages

imap3

220

TCP

Interactive Mail Access Protocol (IMAP) version 3

imap3

220

UDP

IMAP version 3

exec

512

TCP

Remote process execution

login

513

TCP

Remote login

who

513

UDP

Remote who daemon (rwhod)

cmd

514

TCP

Remote command (rsh)

syslog

514

UDP

System log facility

printer

515

TCP

Line printer daemon (LPD) spooler

talk

517

TCP

Terminal-to-terminal chat

talk

517

UDP

Terminal-to-terminal chat

ntalk

518

TCP

Newer version of Terminal-to-terminal chat

router

520

UDP

Routing Information Protocol (RIP)

uucp

540

TCP

UNIX-to-UNIX Copy Protocol (UUCP)

uucp

540

UDP

UUCP

uucp-rlogin

541

TCP

Variant of UUCP/TCP

uucp-rlogin

541

UDP

Variant of UUCP/IP

klogin

543

TCP

Kerberized login

klogin

543

UDP

Kerberized login

pmd

1642

TCP

PortMaster daemon in.pmd

pmconsole

1643

TCP

PortMaster Console Protocol

radius

1645

UDP

Remote Authentication Dial-In User Service (RADIUS)

radacct

1646

UDP

RADIUS accounting

choicenet

1647

UDP

ChoiceNet

Usage

The filtering rules are based on source and destination port numbers, and the established state of a connection.

The order of rules in a filter is important because the PortMaster evaluates the rules in the order that they are numbered. Refer to the PortMaster Configuration Guide for more information.

The src and dst keywords allow you to test the source or destination port number in the packet to determine whether it does the following:

[src|dst eq]

Equals the port number in the filter.

[src|dst gt]

Is greater than the port number in the filter.

[src|dst lt]

Is less than the port number in the filter.

Note ¯ Entering the command set filter Filtername without any arguments removes all filter rules from the filter.

 

Examples

Command> set filter w1.in 1 deny 192.168.1.0/24 0.0.0.0./0 log
Filter w1.in updated

Command> set filter w1.in 2 permit tcp estab
Filter w1.in updated

Command> set filter w1.in 3 permit tcp dst eq 80
Filter w1.in updated

Command> set filter w1.in 4 permit tcp dst eq 25
Filter w1.in updated

At any point, you can see the updates made to the filter by using the following command (shown with response):

Command> show filter w1.in
1 deny 192.168.1.0/24 0.0.0.0/0 ip log
2 permit 0.0.0.0/0 0.0.0.0/0 tcp estab
3 permit 0.0.0.0/0 0.0.0.0/0 tcp dst eq 80
4 permit 0.0.0.0/0 0.0.0.0/0 tcp dst eq 25

See Also

add filter - page 15-4

set loghost - page 3-10

set filter (UDP)

This command sets filtering rules for User Datagram Protocol (UDP) packets.

Note ¯ Enter this command on one line, without any breaks. The line breaks shown here are due to the limited space available.

set filter Filtername RuleNumber permit|deny
[Ipaddress/NM Ipaddress(dest)/NM] udp [src eq|lt|gt Uport]
[dst eq|lt|gt Uport] [log] [notify]

set filter Filtername RuleNumber permit|deny
=ListName Ipaddress(dest)/NM udp [src eq|lt|gt Uport]
[dst eq|lt|gt Uport] [log] [notify]

set filter Filtername RuleNumber permit|deny
Ipaddress/NM =ListName udp [src eq|lt|gt Uport]
[dst eq|lt|gt Uport] [log] [notify]

Filtername

Name of an existing filter that is in the filter table.

RuleNumber

Filter rule number-between 1 and 256 for the PortMaster 3 and IRX, and between 1 and 100 for other PortMaster products.

permit

Permits a packet that matches the filter to pass through the interface. This is the default.

deny

Stops a packet that matches the filter from passing through the interface. The packet is dropped, and an ICMP "Host Unreachable" message is sent to the source address.

Ipaddress

IP address expressed in dotted decimal notation or as a hostname, to compare with the source IP address of the packet.

/NM

Netmask that indicates the number of high-order bits of the source or destination IP address of the packet that must match an address in the filter. Any value between 0 and 32 can be used; common mask values are

/0-To match all packets with any address.
/16-Looks at high-order 16 bits of the address.
/24-Looks at high-order 24 bits of the address.
/32-Looks at the entire IP address.

Ipaddress(dest)

IP address expressed in dotted decimal notation or as a hostname, to compare with the destination IP address of the packet.

src

Specifies that the packet source port number be tested; see "Usage" for test criteria.

eq, lt, or gt

Mode of comparison of port numbers; equal (eq), less than (lt), or greater than (gt).

Uport

Designated UDP port. See Table 15-2 for a list of the port numbers 20 through 1647 commonly assigned to TCP and UDP services.

dst

Specifies that the packet destination UDP port number be tested; see "Usage" for test criteria.

log

Packets matching the rule are logged by syslog to the loghost.

notify

Packets matching the rule are logged by syslog to the source of the packet. If you have the ChoiceNet notifier installed, this keyword is used to cause a notification pop-up to appear on your computer.

=ListName

Specifies a list of source or destination sites in the /etc/choicenet/lists directory on the ChoiceNet server. The equal sign (=) must immediately precede the value.

Usage

The filtering rules are very similar to those used for TCP packets, except that there is no established keyword for UDP. The order of rules in a filter is important because the PortMaster evaluates the rules in the order that they are numbered. Refer to the PortMaster Configuration Guide for more information.

The src and dst keywords allow you to test the source or destination port number in the packet to determine whether it does the following:

[src|dst eq]

Equals the port number in the filter.

[src|dst gt]

Is greater than the port number in the filter.

[src|dst lt]

Is less than the port number in the filter.

Note ¯ Entering the command set filter Filtername without any arguments removes all filter rules from the filter.

Examples

Command> set filter w1.in 5 permit udp src eq 53
Filter w1.in updated

Command> set filter w1.in 6 permit udp dst eq 53
Filter w1.in updated

See Also

add filter - page 15-4

set loghost - page 3-10

set filter (ICMP)

These commands set filtering rules for Internet Control Message Protocol (ICMP) packets.

Note ¯ Enter this command on one line, without any breaks. The line breaks shown here are due to the limited space available.

 

Note ¯ Entering the command set filter Filtername without any arguments removes all filter rules from the filter.

 

set filter Filtername RuleNumber permit|deny
[Ipaddress/NM Ipaddress(dest)/NM] icmp [type Itype] [log] [notify]

set filter Filtername RuleNumber permit|deny
=ListName Ipaddress(dest)/NM icmp [type Itype] [log] [notify]

set filter Filtername RuleNumber permit|deny
Ipaddress/NM =ListName icmp [type Itype] [log] [notify]

Filtername

Name of an existing filter that is in the filter table.

RuleNumber

Filter rule number-between 1 and 256 for the PortMaster 3 and IRX, and between 1 and 100 for other PortMaster products.

permit

Permits a packet that matches the filter to pass through the interface. This is the default.

deny

Stops the packet from passing through the interface. The packet is dropped, and an ICMP "Host Unreachable" message is sent to the source address.

Ipaddress

IP address expressed in dotted decimal notation or as a hostname, to compare with the source IP address of the packet.

/NM

Netmask that indicates the number of high-order bits of the source or destination IP address of the packet that must match an address in the filter. Any value between 0 and 32 can be used; common mask values are

/0-To match all packets with any address.
/16-Looks at high-order 16 bits of the address.
/24-Looks at high-order 24 bits of the address.
/32-Looks at the entire IP address.

Ipaddress(dest)

IP address expressed in dotted decimal notation or as a hostname, to compare with the destination IP address of the packet.

Itype

ICMP message type to compare against the ICMP message type contained in the packet. ICMP message types are defined in RFC 1700, Assigned Numbers. Common ICMP types are the following:

0-Echo reply

3-Destination Unreachable

4-Source Quench

5-Redirect

8-Echo

11-Time Exceeded

12-Parameter Problem

13-Timestamp

14-Timestamp Reply

15-Information Request

16-Information Reply

log

Packets matching the rule are logged by syslog to the loghost.

notify

Packets matching the rule are logged by syslog to the source of the packet. If you have the ChoiceNet notifier installed, this keyword is used to cause a notification pop-up to appear on your computer.

=ListName

Specifies a list of source or destination sites in the /etc/choicenet/lists directory on the ChoiceNet server. The equal sign (=) must immediately precede the value.

Examples

Command> set filter w1.in 1 permit icmp
Filter w1.in updated

See Also

add filter - page 15-4

set loghost - page 3-10

set ipxfilter

This command sets filtering rules for IPX packets.

Note ¯ Enter this command on one line, without any breaks. The line breaks shown here are due to the limited space available.

set ipxfilter Filtername RuleNumber permit|deny
[srcnet Ipxnetwork] [srchost Ipxnode] [srcsocket eq|gt|lt Ipxsock]
[dstnet Ipxnetwork] [dsthost Ipxnode] [dstsocket eq|gt|lt Ipxsock]

Filtername

Name of an existing filter that is in the filter table.

RuleNumber

Filter rule number-between 1 and 256 for the PortMaster 3 and IRX, and between 1 and 100 for other PortMaster products.

permit

Permits a packet that matches the filter to pass through the interface. This is the default

deny

Stops a packet that matches the filter from passing through the interface.

srcnet

Specifies the comparison with the source IPX network number contained in the packet, a 32-bit hexadecimal value

Ipxnetwork

IPX network number, a 32-bit hexadecimal value.

srchost

Specifies the comparison with the source IPX node address contained in the packet, a 48-bit hexadecimal value-usually the MAC address of the host.

Ipxnode

IPX node address, a 48-bit hexadecimal value-usually the MAC address of the host.

srcsocket

Specifies that the source IPX socket number contained in the packet must be compared with the IPX socket number specified in the filter. A second keyword-eq, lt, or gt-must be used to indicate the mode of comparison, an integer from 0 to 65535.

eq, lt, or gt

Mode of comparison of socket numbers; equal (eq), less than (lt), or greater than (gt).

Ipxsock

A socket number specified for the comparison, an integer from 1 to 65535.

dstnet

Specifies the comparison with the destination IPX network number contained in the packet. A 32-bit hexadecimal number.

dsthost

Specifies the comparison with the destination IPX node address contained in the packet. A 32-bit hexadecimal number.

dstsocket

Specifies that the destination IPX socket number contained in the packet must be compared with the IPX socket number specified in the filter. A second keyword-eq, lt, or gt-must be used to indicate the mode of comparison, an integer from 0 to 65535.

Usage

The filtering rules are based on source or destination host, network, or socket.

The eq, gt and lt keywords allow you to test the source or destination socket number in the packet to determine whether it does the following:

eq

Equals the socket number in the filter.

gt

Is greater than the socket number in the filter.

lt

Is less than the socket number in the filter.

Note ¯ Entering the command set filter Filtername without any arguments removes all filter rules from the filter.

 

Examples

Command> set ipxfilter e0.in 1 permit dstnet OXC009C901
Filter e0.in updated

Command> set ipxfilter e0.in 2 permit srcnet OXC009C905
Filter e0.in updated

Command> set ipxfilter e0.in 3 permit srchost OXA0B1C2D3
Filter e0.in updated

Command> set ipxfilter e0.in 4 permit dsthost OXA1B2C3D4
Filter e0.in updated

Command> set ipxfilter e0.in 5 deny dstsocket eq 451
Filter e0.in updated

Command> set ipxfilter e0.in 6 permit srcsocket gt 455
Filter e0.in updated

Command> show ipxfilter e0.in
- IPX Rules -
1 permit dstnet C009C901
2 permit srcnet C009C905
3 permit srchost A0B1C2D3
4 permit dsthost A1B2C3D4
5 deny dstsocket eq 0451
6 permit srcsocket gt 0455

See Also

add filter - page 15-4

set sapfilter

This command sets filtering rules for IPX Service Advertising Protocol (SAP) packets.

Note ¯ Enter this command on one line, without any breaks. The line breaks shown here are due to the limited space available.

set sapfilter Filtername RuleNumber permit|deny [server String]
[network Ipxnetwork] [host Ipxnode] [socket eq|gt|lt Ipxsock]

Filtername

Name of an existing filter that is in the filter table.

RuleNumber

Filter rule number-between 1 and 256 for the PortMaster 3 and IRX, and between 1 and 100 for other PortMaster products.

permit

Permits an SAP packet that matches the filter to pass through the interface. This is the default.

deny

Stops an SAP packet that matches the filter from passing through the interface.

server

Specifies the comparison with the name of the server that is advertising its service.

String

SAP server name.

network

Specifies the comparison with the server's IPX network number.

Ipxnetwork

IPX network number, a 32-bit hexadecimal value.

host

Specifies the comparison with the server's IPX node address.

Ipxnode

IPX node address, a 48-bit hexadecimal value-usually the MAC address of the host.

socket

Specifies that the server's IPX socket number must be compared with the IPX socket number specified in the filter. A second keyword-eq, lt, or gt-must be used to indicate the mode of comparison.

eq, lt, or gt

Mode of comparison of socket numbers; equal (eq), less than (lt), or greater than (gt).

Ipxsock

Socket number specified for the comparison, an integer from 1 to 65535.

Usage

The filtering rules are based on server, network, host, or socket. SAP packets can be filtered only on output, not on input. Sap filter rules used as inbound packet filters are ignored.

The eq, gt and lt keywords allow you to test the destination socket number in the packet to determine whether it does the following:

eq

Equals the socket number in the filter.

gt

Is greater than the socket number in the filter.

lt

Is less than the socket number in the filter.

Note ¯ Entering the command set filter Filtername without any arguments removes all filter rules from the filter.

 

Example

Command> set sapfilter e0.out 1 permit network C009C901
Filter e0.out updated

Command> set sapfilter e0.out 2 permit host A0B1C2D3E4F5
Filter e0.out updated

Command> set sapfilter e0.out 3 deny socket eq 452
Filter e0.out updated

Command> show sapfilter e0.out
1 permit network C009C901
2 permit host A0B1C2D3E4F5
3 deny socket eq 0452

See Also

add filter - page 15-4

show filter

This command shows the configuration of a specified filter.

show filter|ipxfilter|sapfilter Filtername

filter

Displays IP and IPX rules.

ipxfilter

Displays IPX rules only.

sapfilter

Displays SAP rules.

Filtername

Name of a filter that is in the filter table.

Example

Command> show filter internet.in
1 deny 192.168.200.0/24 0.0.0.0/0 ip
2 permit 0.0.0.0/0 0.0.0.0/0 tcp estab
3 permit 0.0.0.0/0 0.0.0.0/0 udp dst eq 53
4 permit 0.0.0.0/0 0.0.0.0/0 tcp dst eq 53
5 permit 0.0.0.0/0 0.0.0.0/0 tcp dst eq 25
6 permit 0.0.0.0/0 0.0.0.0/0 icmp

show table filter

This command shows a list of the filters in the filter table.

show table filter

Example

Command> show table filter

 

internet.in

ether0.in

check.in

pingtr.in

internet.out

ether.out

 

 

See Also

show filter - page 15-25



[Top] [Table Of Contents] [Prev] [Next] [Index]

spider@livingston.com
Copyright © 1998, Lucent Technologies. All rights reserved.