28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8.7 Filtering Traffic Using Unicast Reverse-Path<br />

Forwarding<br />

Problem<br />

You want to more adequately filter traffic that is not coming through the proper<br />

interfaces to better prevent spoofing.<br />

Solution<br />

Turn on unicast reverse-path forwarding (RPF) on the router:<br />

[edit routing-options]<br />

aviva@router1# set forwarding-table unicast-reverse-path active-paths<br />

Then enable it on the desired interface:<br />

[edit interfaces so-0/0/0 unit 0 family inet]<br />

aviva@router1# set rpf-check<br />

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

Unicast RPF is an extension of RPF, which is used by IP multicast routing protocols<br />

to prevent multicast routing loops. As the name implies, unicast RPF verifies unicast<br />

source addresses. When a router receives a packet, unicast RPF performs a route<br />

lookup on the source address to determine the interface closest to the source address<br />

(the reverse path to the source). If the receiving interface is not the closest interface,<br />

the packet is dropped.<br />

Unicast RPF is one mechanism for dealing with address-spoofing DoS attacks. In<br />

these attacks, an intruder floods its target with packets that contain a spoofed source<br />

address, essentially impersonating another system’s IP address. The flooding results<br />

in a DoS at the target, and because the source address is spoofed, the true source of<br />

the traffic is difficult to trace. UDP applications are more vulnerable to spoofing<br />

attacks than TCP applications because, though TCP uses sequence numbers and<br />

handshakes that require more than a single packet to establish and maintain a session,<br />

UDP applications perform their own internal verification to ensure that a given<br />

source is who it says it is and that the IP headers in the source of the packets have<br />

not been forged. rlogin and other Unix r-utilities and X Windows are commonly subject<br />

to spoofing attacks. DNS servers are also vulnerable to spoofing, because they<br />

regularly send queries to obtain the IP addresses of hosts, and cache this information,<br />

but do not authenticate the source of the answers they receive. This operation<br />

makes it possible for an attacker to send false or improper answers to DNS queries,<br />

thus poisoning the cache.<br />

Figure 8-1 illustrates how a spoofing attack might work. The attacker, somewhere on<br />

the Internet at 10.0.0.1, sends packets through your router to one of your customers<br />

at 172.16.0.2.<br />

266 | Chapter 8: IP Routing<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!