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.

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

Firewall Filter Examples<br />

The following examples illustrate how to define firewall filters:<br />

• Example: Blocking Telnet and SSH Access on page 244<br />

• Example: Blocking TFTP Access on page 245<br />

• Example: Accepting DHCP Packets with Specific Addresses on page 245<br />

• Example: Defining a Policer for a Destination Class on page 246<br />

• Example: Counting IP Option Packets on page 246<br />

• Example: Accepting OSPF Packets from Certain Addresses on page 248<br />

• Example: Matching Packets Based on Two Unrelated Criteria on page 248<br />

• Example: Counting Both Accepted and Rejected Packets on page 249<br />

• Example: Blocking TCP Connections to a Certain Port Except from BGP Peers on<br />

page 250<br />

• Example: Accepting Packets with Specific IPv6 TCP Flags on page 250<br />

• Example: Setting a Rate Limit for Incoming Layer 2 Control Packets on page 251<br />

Example: Blocking Telnet and SSH Access<br />

Block telnet and SSH access to all but the 192.168.1.0/24 subnet. This filter also logs any<br />

SSH or telnet traffic attempts from other subnets to the firewall log buffer:<br />

[edit]<br />

firewall {<br />

family inet {<br />

filter local-access-control {<br />

term terminal-access {<br />

from {<br />

address {<br />

192.168.1.0/24;<br />

}<br />

protocol tcp;<br />

port [ssh telnet];<br />

}<br />

then accept;<br />

}<br />

term terminal-access-denied {<br />

from {<br />

protocol tcp;<br />

port [ssh telnet];<br />

}<br />

then {<br />

log;<br />

reject;<br />

}<br />

}<br />

244<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!