16.03.2014 Views

Policy Framework Configuration Guide - Juniper Networks

Policy Framework Configuration Guide - Juniper Networks

Policy Framework Configuration Guide - Juniper Networks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 9: Firewall Filter <strong>Configuration</strong><br />

Prefixes in Match Conditions<br />

To specify multiple values in a single match condition, group the values within square<br />

brackets following the keyword. A match occurs if the value of the field matches the<br />

number that corresponds to either of the text synonyms or any of the configured numerical<br />

values. For example:<br />

source-port [ smtp ftp-data 25 1024-65535 ];<br />

A match occurs if the value of the field in a packet matches any of the following values:<br />

20 (since it corresponds to the text synonym ftp-data; 25 since it matches the text<br />

synonym smtp); or any value from 1024 through 65535.<br />

Address filter conditions match prefix values in a packet, such as IP source and destination<br />

prefixes. For address filter match conditions, you specify a keyword, such as<br />

destination-address or destination-prefix, that identifies the field and one or more prefixes<br />

of that type that a packet must match.<br />

You can specify the address in one of the following ways:<br />

• Single prefix—A match occurs if the value of the field matches the prefix. For example:<br />

[edit firewall family family-name filter filter-name term term-name from]<br />

destination-address 10.0.0.0/8;<br />

In this example, a match occurs if a destination address matches the prefix 10.0.0.0/8<br />

• Multiple prefixes—A match occurs if any one of the prefixes in the list matches the<br />

packet. For example:<br />

[edit firewall family family-name filter filter-name term term-name from]<br />

destination-address {<br />

10.0.0.0/8;<br />

192.168.0.0/32;<br />

}<br />

In this example, a match occurs if a destination address matches either the 10.0.0.0/8<br />

or the 192.168.0.0/32 prefix.<br />

To exclude a prefix, specify the string except after the prefix. In the following example,<br />

any addresses that fall under the 192.168.10.0/8 prefix match, except for addresses<br />

that fall under 192.168.0.0/16. All other addresses implicitly do not match this condition.<br />

[edit firewall family family-name filter filter-name term term-name from]<br />

destination-address {<br />

192.168.0.0/16 except;<br />

192.168.10.0/8;<br />

}<br />

To match all destinations except one, in this example 10.1.1.0/24, configure the match<br />

conditions as follows:<br />

[edit firewall family family-name filter filter-name term term-name from]<br />

destination-address {<br />

0.0.0.0/0;<br />

10.1.1.0/24 except;<br />

}<br />

Copyright © 2010, <strong>Juniper</strong> <strong>Networks</strong>, Inc.<br />

221

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!