28.06.2014 Views

Discussion

Discussion

Discussion

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.

You can also save the activity records to a standard system logfile with a set then<br />

syslog command. Then configure a system logfile to accept the log messages. This<br />

recipe places all firewall logging messages in the messages file. The firewall facility<br />

captures firewall-related messages. Use the show log command to view the messages:<br />

aviva@RouterF> show log messages<br />

Sep 7 04:59:13 RouterF fwdd[2498]: PFE_FW_SYSLOG_IP: FW: t1-0/0/3.0<br />

172.19.121.114 172.17.28.108 5888 18695 (1 packets)<br />

Sep 7 04:59:13 RouterF last message repeated 5 times<br />

Sep 7 04:59:13 RouterF fwdd[2498]: PFE_FW_SYSLOG_IP: FW: t1-0/0/3.0<br />

192.168.14.1 192.168.18.1 54532 45824 (1 packets)<br />

A tcp<br />

A tcp<br />

The fwdd after the router name means that the message was generated by the JUNOS<br />

forwarding process (daemon). The message code for firewall logs is PFE_FW_SYSLOG_IP,<br />

and the FW: indicates that the message is present in the logs as the result of a firewall<br />

configuration. Some of the remaining information in the system log message is similar<br />

to what is displayed by the show firewall log command. First is the interface<br />

name, followed by an A to report that the packet was accepted, and tcp, which is the<br />

type of packet. The two IP addresses are the packet’s source and destination<br />

addresses, respectively, and the last two numbers are the source and destination ports.<br />

See Also<br />

Recipe 5.1<br />

9.14 Limiting Traffic on an Interface<br />

Problem<br />

You want to throttle traffic to make sure that the Routing Engine and protocol adjacencies<br />

won’t go down because the router is being overwhelmed by other types of<br />

traffic.<br />

Solution<br />

Create a policer to limit the rate of traffic:<br />

[edit firewall]<br />

aviva@RouterF# set policer limit-icmp if-exceeding bandwidth-limit 1m<br />

aviva@RouterF# set policer limit-icmp if-exceeding burst-size-limit 50k<br />

aviva@RouterF# set policer limit-icmp then discard<br />

Then apply the policer to a filter term:<br />

[edit firewall filter incoming-to-me]<br />

aviva@RouterF# set term icmp then policer limit-icmp<br />

<strong>Discussion</strong><br />

A more secure way to protect an interface is to rate-limit the incoming traffic, especially<br />

the nonessential traffic. Rate limiting is an additional mechanism that prioritizes<br />

318 | Chapter 9: Routing Policy and Firewall Filters<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.

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

Saved successfully!

Ooh no, something went wrong!