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.

Junos 10.4 <strong>Policy</strong> <strong>Framework</strong> <strong>Configuration</strong> <strong>Guide</strong><br />

}<br />

}<br />

}<br />

This configuration causes the system log to write any messages with the syslog facility<br />

of firewall to the file /var/log/filter. This keeps the messages out of the main system log<br />

file and makes them easier to find.<br />

Example: Configuring Firewall Filter System Logging<br />

Create a filter that logs and counts ICMP packets that have 192.168.207.222 as either<br />

their source or destination:<br />

[edit]<br />

firewall {<br />

family inet {<br />

filter icmp-syslog {<br />

term icmp-match {<br />

from {<br />

address {<br />

192.168.207.222/32;<br />

}<br />

protocol icmp;<br />

}<br />

then {<br />

count packets;<br />

syslog;<br />

accept;<br />

}<br />

}<br />

term default {<br />

then accept;<br />

}<br />

}<br />

}<br />

}<br />

Enter the show log filter command to display the results:<br />

root@hostname> show log filter<br />

Mar 20 08:03:11 hostname feb FW: so-0/1/0.0 A icmp 192.168.207.222<br />

192.168.207.223 0 0 (1 packets)<br />

This output file contains the following fields:<br />

• Date and Time—Date and time at which the packet was received (not shown in the<br />

default).<br />

• Filter action:<br />

• A—Accept (or next term)<br />

• D—Discard<br />

• R—Reject<br />

• Protocol—Packet’s protocol name or number.<br />

274<br />

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

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

Saved successfully!

Ooh no, something went wrong!