public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* iptables, NAT, DNS & Dan Kaminsky
@ 2008-07-30 14:53 Richard Hartmann
  2008-07-30 19:55 ` Willy Tarreau
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Hartmann @ 2008-07-30 14:53 UTC (permalink / raw)
  To: linux-kernel

Hi all,

as you are very likely all aware, Dan Kaminsky uncovered a major exploit
in RFC-compliant DNS caching servers the successful execution of which
relies on port prediction/guessing.

After quite some research, I have come up with the following facts which
I want to cross-check with you guys so I can be _sure_.


1) The --random target for SNAT exists since 2.6.22 to allow 'fixing' of
broken DNS servers in your NATted LAN along the lines of

iptables -t nat -I POSTROUTING 1 -p udp -s 1.2.3.4 --dport 53 -j SNAT \
--to 1.2.3.4 --random

Is that correct?


2) Unless there is a collision, the original UDP source ports for
requests are kept the same. I.e. boxes within the NATted LAN which use
random UDP ports are secure and neither the 2.4.x nor the 2.6.x series
of kernels will make those ports predictable while NATting the packets.
Is that correct?


3) Ever since a commit that went into 2.6.24 [1], UDP ports that are
NATted are randomized by the NATting forewarder, anyway. This means that
any DNS lookup made from within a NATted LAN secured with iptables to a
DNS server outside of said NAT is secure by default.
Is that correct?


Thanks for any and all input. I am sure many people would like
clarification on those points.

Richard


[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=32c1da70810017a98aa6c431a5494a302b6b9a30

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-08-01 12:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-30 14:53 iptables, NAT, DNS & Dan Kaminsky Richard Hartmann
2008-07-30 19:55 ` Willy Tarreau
2008-07-31 14:59   ` Richard Hartmann
2008-07-31 21:14     ` Willy Tarreau
2008-07-31 21:36       ` Ray Lee
2008-08-01 12:30         ` Richard Hartmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox