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.

and 192.168.0.0/16. Malware, which is malicious software designed to damage or<br />

disrupt network equipment, often targets random IP addresses and chooses bogon<br />

prefixes to launch or propagate network attacks. Because of this, and because you<br />

should never receive legitimate traffic from unallocated prefixes, it is good preventive<br />

security practice to put in place routing policies that reject bogon routes so that<br />

they are never added to the routing table.<br />

This recipe shows a snippet of a routing policy that uses route lists to identify each<br />

unallocated bogon prefix. Each set route-filter command includes a reject action<br />

to quickly and immediately reject any matching incoming prefix. The recipe applies<br />

this policy to an EBGP group with an import command so that the policy is evaluated<br />

when incoming routes are received by the EBGP group.<br />

The bogon filter in this example uses routing policy. Another way to filter them is<br />

with firewall filters (see Recipe 9.8), providing bogon filters on the network’s ingress<br />

and egress interfaces. Firewall filters let you log and syslog traffic (see Recipe 9.13)<br />

and maintain SNMP counters about traffic that comes from bogon space (see Recipe<br />

9.12), giving you data to graph network attacks that come from bogon space, which<br />

is a very common occurrence, and helping you be more aware of what’s happening<br />

on your network. With a firewall filter, you can do bogon filtering by referring to<br />

bogon prefixes in prefix lists and then counting and discarding any matches.<br />

Over time, the list of bogons changes, mostly because IANA allocates IP prefixes and<br />

less often because of changes to reserved addresses. If a configuration includes a policy<br />

to filter bogons, you must update it to keep it in sync with current address allocations.<br />

Every time a bogon is allocated, many people, including big ISPs, forget to<br />

update their filters for some reason or another and they often need specific reminders<br />

sent directly to them. If you do not actively monitor for bogon changes on a regular<br />

basis, you will be blocking future allocations from functioning properly. One way<br />

to update the bogon list automatically is to peer with Team Cymru, which maintains<br />

a current list of JUNOS bogon route lists, as well as a list of reserved prefixes. See<br />

http://www.cymru.com/BGP/bogon-rs.html for information about the BGP bogon<br />

project.<br />

One caveat in using the Team Cymru bogon lists is that you should examine the prefixes<br />

to make sure they are not blocking traffic that you want to receive. For example,<br />

one of the bogon lists, http://www.cymru.com/Documents/bogon-bn-agg.txt, contains<br />

224.0.0.0/3 as an entry. If you do not specify that your firewall terms are for unicast<br />

IPv4 traffic only, using this prefix in a prefix list for a firewall filter will break OSPF,<br />

because this is the OSPF multicast address and must be present for OSPF to operate<br />

(see Recipe 12.1).<br />

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