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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

protocol ospf;<br />

}<br />

}<br />

term address-match {<br />

from {<br />

source-address {<br />

10.108.0.0/16;<br />

}<br />

}<br />

}<br />

}<br />

}<br />

}<br />

Example: Counting Both Accepted and Rejected Packets<br />

Reject all addresses except 192.168.5.0/24. In the first term, the statement 192.168.5.2/24<br />

except causes this address to be considered a mismatch and this address is passed to<br />

the next term in the filter. The address 0.0.0.0/0 in the first term matches all other<br />

packets, and these are counted, logged, and rejected. In the second term, all packets<br />

that passed though the first term (that is, packets whose address matches 192.168.5.2/24)<br />

are counted, logged, and accepted.<br />

[edit]<br />

firewall {<br />

family inet {<br />

filter fire1 {<br />

term 1 {<br />

from {<br />

address {<br />

192.168.5.0/24 except;<br />

0.0.0.0/0;<br />

}<br />

}<br />

then {<br />

count reject-pref1-1;<br />

log;<br />

reject;<br />

}<br />

}<br />

term 2 {<br />

then {<br />

count reject-pref1-2;<br />

log;<br />

accept;<br />

}<br />

}<br />

}<br />

}<br />

}<br />

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

249

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

Saved successfully!

Ooh no, something went wrong!