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 the traffic to these networks is dropped silently. (When there is a reason to have<br />

the router send ICMP unreachable messages, use a next hop of reject instead.)<br />

Routes with a discard next hop are placed in the forwarding table with a next-hop<br />

type of dscd (discard).<br />

Verify that the routes are in the routing table:<br />

aviva@router1> show route<br />

inet.0: 23 destinations, 23 routes (22 active, 0 holddown, 1 hidden)<br />

+ = Active Route, - = Last Active, * = Both<br />

1.0.0.0/8 *[Static/5] 00:03:41<br />

Discard<br />

2.0.0.0/8 *[Static/5] 00:00:02<br />

Discard<br />

They are installed in the forwarding table as discard routes:<br />

aviva@router1> show route forwarding-table<br />

Routing table: inet<br />

Internet:<br />

Destination Type RtRef Next hop Type Index NhRef Netif<br />

1.0.0.0/8 user 0 dscd 12 3<br />

2.0.0.0/8 user 0 dscd 12 3<br />

A good security practice is to blackhole addresses that have not yet been allocated<br />

by one of the domain registries, such as ARIN or RIPE (see http://www.iana.<br />

org/assignments/ipv4-address-space). This recipe shows two of those addresses. For a<br />

complete list, see http://www.cymru.com/gillsr/documents/junos-discard-routes.txt.<br />

Because these addresses are not allocated and no traffic should be destined for them<br />

anyway, you might wonder why you should bother blackholing traffic to them. One<br />

reason is to limit a malicious hacker’s ability to attack your router with a DoS attack<br />

from external spoofed sources. It also reduces the potential for outbound spoofing<br />

from your network. Certain spammers may also use unallocated space to send spam,<br />

first by announcing a prefix from unallocated space and sending their spam, then<br />

quickly withdrawing the route. Another reason to blackhole unallocated addresses is to<br />

reduce the possibility of prefix hijacking. For example, an AS might announce a /16,<br />

and the spammer can announce some unused (or even used) space within the /16.<br />

As a note of caution, unallocated-addresses space changes from time to time as new<br />

allocations are made. You need to pay close attention to the changes and change<br />

your filters accordingly so as not to block legitimate traffic.<br />

See Also<br />

Internet Assigned Numbers Authority (IANA) (http://www.iana.org/assignments/ipv4-<br />

address-space) and Team Cymru (http://www.cymru.com/gillsr/documents/junosdiscard-routes.txt)<br />

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

Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.<br />

Blackholing Routes | 265

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

Saved successfully!

Ooh no, something went wrong!