Last Updated: 2012-05-17 02:58:11 UTC
by Johannes Ullrich (Version: 1)
As we are running out of IPv4 address space, many networks, instead of embracing IPv6, stretch existing IPv4 space via multiple levels of NAT. NAT then uses "reserved" IP address space. However, there are more address ranges reserved then listed in RFC1918, and not all of them should be used in internal networks. Here is a (probably incomplete) list of address ranges that are reserved, and which once are usable inside your network behind a NAT gateway.
|Address Range||RFC||Suitable for Internal Network|
|0.0.0.0/8||RFC1122||no ("any" address)|
|100.64.0.0/10||RFC6598||yes (with caution: If you are a "carrier")|
|169.254.0.0/16||RFC3927||yes (with caution: zero configuration)|
|192.0.0.0/24||RFC5736||no (not used now, may be used later)|
|192.0.2.0/24||RFC5737||yes (with caution: for use in examples)|
|188.8.131.52/24||RFC3068||no (6-to-4 anycast)|
|198.18.0.0/15||RFC2544||yes (with caution: for use in benchmark tests)|
|198.51.100.0/24||RFC5737||yes (with caution: test-net used in examples)|
|203.0.113.0/24||RFC5737||yes (with caution: test-net used in examples)|
|240.0.0.0/4||RFC1700||no (or "unwise"? reserved for future use)|
Most interesting in this context is RFC6598 (100.64.0.0/10), which was recently assigned to provide ISPs with a range for NAT that is not going to conflict with their customers NAT networks. It has been a more and more common problem that NAT'ed networks once connected with each other via for example a VPN tunnel, have conflicting assignments.
Which networks did I forget? I will update the table for a couple days as comments come in.
Last Updated: 2012-05-16 11:48:23 UTC
by Johannes Ullrich (Version: 1)
This is a clarification to Dan's diary from yesterday. We are interested to hear, if anybody else is seeing DNS replies from RFC1918 non-routable IP addresses, in particular from 10.0.0.0/8. So far, we only have one report, and we are trying to figure out if this is something wide spread, or something unique to this user.
This reader first noticed the problem when the firewall reported more dropped packets from 10.x addresses. Two example queries that caused the problem are A queries for 25280.ftp.download.akadns.net and adfarm.mplx.akadns.net. The reader receives two responses: One "normal" response from the IP address the query was sent to, and a second response from the 10.x address. As a result, the problem would go unnoticed even if the 10.x response is dropped. Both responses provide the same answer, so this may not be an attack, but more of a misconfiguration.
As a side note, initially the DNS protocol specifically allowed for replies to arrive from an IP address different then the one the query was sent to:
"Some name servers send their responses from different addresses than the one used to receive the query. That is, a resolver cannot rely that a response will come from the same address which it sent the corresponding query to. This name server bug is typically encountered in UNIX systems." (RFC1035)
However, later in RFC2181, this requirement was removed:
"Most, if not all, DNS clients, expect the address from which a reply is received to be the same address as that to which the query eliciting the reply was sent. This is true for servers acting as clients for the purposes of recursive query resolution, as well as simple resolver clients. The address, along with the identifier (ID) in the reply is used for disambiguating replies, and filtering spurious responses. This may, or may not, have been intended when the DNS was designed, but is now a fact of life." (RFC2181)
But we are NOT looking for responses that are coming from the wrong source, but duplicate responses. Once from the correct and once from the incorrect address.
Here an example "stray" packet submitted by the reader (slightly modified for privacy reasons and to better fit the screen)
Internet Protocol Version 4, Src: 10.17.x.y, Dst: ---removed--- Version: 4 Header length: 20 bytes Differentiated Services Field: 0x00 Total Length: 84 Identification: 0x2a7e (10878) Flags: 0x00 Fragment offset: 0 Time to live: 59 Protocol: UDP (17) Header checksum: correct User Datagram Protocol, Src Port: domain (53), Dst Port: antidotemgrsvr (2247) Domain Name System (response) Transaction ID: 0xb326 Flags: 0x8400 (Standard query response, No error) 1... .... .... .... = Response: Message is a response .000 0... .... .... = Opcode: Standard query (0) .... .1.. .... .... = Authoritative: Server is an authority for domain .... ..0. .... .... = Truncated: Message is not truncated .... ...0 .... .... = Recursion desired: Don't do query recursively .... .... 0... .... = Recursion available: Server can't do recursive queries .... .... .0.. .... = Z: reserved (0) .... .... ..0. .... = Answer not authenticated .... .... ...0 .... = Non-authenticated data: Unacceptable .... .... .... 0000 = Reply code: No error (0) Questions: 1 Answer RRs: 1 Authority RRs: 0 Additional RRs: 0 Queries ads.adsonar.akadns.net: type A, class IN Name: ads.adsonar.akadns.net Type: A (Host address) Class: IN (0x0001) Answers ads.adsonar.akadns.net: type A, class IN, addr 184.108.40.206 Name: ads.adsonar.akadns.net Type: A (Host address) Class: IN (0x0001) Time to live: 5 minutes Data length: 4 Addr: 220.127.116.11 (18.104.22.168)
Please choose a specific diary above to comment