nanog mailing list archives
Re: BCP38 tester?
From: Matt Palmer <mpalmer () hezmatt org>
Date: Tue, 2 Apr 2013 07:33:45 +1100
On Mon, Apr 01, 2013 at 12:31:05PM -0400, Jay Ashworth wrote:
From: "Jimmy Hess" <mysidia () gmail com>Ah, but did you actually test your guess on a reasonably large variety of NAT platforms?He may not have, but now that I'm thinking (caffeine is a wonder drug), I have: I've worked on, for customers, nearly every brand of consumer router on the market, and all of them do outbound NAT the same way: Pick up a DHCP address from the carrier, and use that as the source IP on all translated outbound packets.
The key issue at hand (I believe; please correct me if I'm wrong) is that
"all translated outbound packets" may not equal "all outbound packets".
Depending on how a NAT device is configured, it may pass some packets
*untranslated*, and that allows a malicious actor behind the NAT device to
still get their spoofed traffic out.
To relate it back to something concrete, imagine this iptables rule in an
otherwise "fully open" configuration:
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o wan -j MASQUERADE
Now, spoof a packet from behind this NAT box as coming from 192.0.2.12...
what happens? It gets passed through the NAT box, *without* being NATed.
Oops.
Of course, it isn't hard to stop this sort of thing...
iptables -A INPUT ! -s 192.168.1.0/24 -i lan -j DROP
(or any number of other equivalent rules) The question is, how many
in-common-use CPEs have considered this attack vector and are actually doing
something functionally equivalent to the DROP rule above?
I don't know, because I haven't tried it, but I'd only be surprised if the
answer was "none" or "all of them".
- Matt
Current thread:
- Re: BCP38 tester? Dobbins, Roland (Apr 01)
- <Possible follow-ups>
- Re: BCP38 tester? Karl Auer (Apr 01)
- Re: BCP38 tester? Dobbins, Roland (Apr 01)
- Re: BCP38 tester? Jimmy Hess (Apr 01)
- Re: BCP38 tester? Jay Ashworth (Apr 01)
- Re: BCP38 tester? Matt Palmer (Apr 01)
- Re: BCP38 tester? Jimmy Hess (Apr 02)
- Re: BCP38 tester? Jay Ashworth (Apr 02)
- Re: BCP38 tester? Alain Hebert (Apr 01)
- Re: BCP38 tester? Valdis . Kletnieks (Apr 01)
- Re: BCP38 tester? Alain Hebert (Apr 01)
- Message not available
- Re: BCP38 tester? Peter Baldridge (Apr 01)
- Re: BCP38 tester? Alain Hebert (Apr 01)
