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 />

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

Block all TCP connection attempts to port 179 from all requesters except the specified<br />

BGP peers:<br />

[edit]<br />

firewall {<br />

family inet {<br />

filter bgp179 {<br />

term 1 {<br />

from {<br />

source-address {<br />

0.0.0.0/0;<br />

}<br />

source-prefix-list {<br />

bgp179 except;<br />

}<br />

destination-port bgp;<br />

}<br />

then {<br />

reject;<br />

}<br />

}<br />

term 2 {<br />

then {<br />

accept;<br />

}<br />

}<br />

}<br />

}<br />

}<br />

Expand the prefix list bgp179 to include all BGP group neighbors:<br />

[edit policy-options]<br />

prefix-list bgp179 {<br />

apply-path "protocols bgp group neighbor ";<br />

}<br />

Apply the filter bgp179 to interface lo0:<br />

[edit interfaces lo0]<br />

unit 0 {<br />

family inet {<br />

filter {<br />

input bgp179;<br />

}<br />

address 10.0.0.1/32;<br />

}<br />

}<br />

Example: Accepting Packets with Specific IPv6 TCP Flags<br />

Configure a filter to match on IPv6 TCP flags:<br />

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