draft-ietf-dnsext-dnsproxy-06.txt   rfc5625.txt 
DNSEXT R. Bellis Network Working Group R. Bellis
Internet-Draft Nominet UK Request for Comments: 5625 Nominet UK
Intended status: BCP July 1, 2009 BCP: 152 August 2009
Expires: January 2, 2010 Category: Best Current Practice
DNS Proxy Implementation Guidelines DNS Proxy Implementation Guidelines
draft-ietf-dnsext-dnsproxy-06
Status of this Memo
This Internet-Draft is submitted to IETF in full conformance with the Abstract
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet-
Drafts.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at This document provides guidelines for the implementation of DNS
http://www.ietf.org/ietf/1id-abstracts.txt. proxies, as found in broadband gateways and other similar network
devices.
The list of Internet-Draft Shadow Directories can be accessed at Status of This Memo
http://www.ietf.org/shadow.html.
This Internet-Draft will expire on January 2, 2010. This document specifies an Internet Best Current Practices for the
Internet Community, and requests discussion and suggestions for
improvements. Distribution of this memo is unlimited.
Copyright Notice Copyright Notice
Copyright (c) 2009 IETF Trust and the persons identified as the Copyright (c) 2009 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents in effect on the date of Provisions Relating to IETF Documents in effect on the date of
publication of this document (http://trustee.ietf.org/license-info). publication of this document (http://trustee.ietf.org/license-info).
Please review these documents carefully, as they describe your rights Please review these documents carefully, as they describe your rights
and restrictions with respect to this document. and restrictions with respect to this document.
Abstract
This document provides guidelines for the implementation of DNS
proxies, as found in broadband gateways and other similar network
devices.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction ....................................................2
2. Terminology .....................................................3
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. The Transparency Principle ......................................3
4. Protocol Conformance ............................................4
3. The Transparency Principle . . . . . . . . . . . . . . . . . . 3 4.1. Unexpected Flags and Data ..................................4
4.2. Label Compression ..........................................4
4. Protocol Conformance . . . . . . . . . . . . . . . . . . . . . 4 4.3. Unknown Resource Record Types ..............................4
4.1. Unexpected Flags and Data . . . . . . . . . . . . . . . . 4 4.4. Packet Size Limits .........................................4
4.2. Label Compression . . . . . . . . . . . . . . . . . . . . 4 4.4.1. TCP Transport .......................................5
4.3. Unknown Resource Record Types . . . . . . . . . . . . . . 5 4.4.2. Extension Mechanisms for DNS (EDNS0) ................6
4.4. Packet Size Limits . . . . . . . . . . . . . . . . . . . . 5 4.4.3. IP Fragmentation ....................................6
4.4.1. TCP Transport . . . . . . . . . . . . . . . . . . . . 6 4.5. Secret Key Transaction Authentication for DNS (TSIG) .......7
4.4.2. Extension Mechanisms for DNS (EDNS0) . . . . . . . . . 6 5. DHCP's Interaction with DNS .....................................7
4.4.3. IP Fragmentation . . . . . . . . . . . . . . . . . . . 6 5.1. Domain Name Server (DHCP Option 6) .........................7
4.5. Secret Key Transaction Authentication for DNS (TSIG) . . . 7 5.2. Domain Name (DHCP Option 15) ...............................8
5.3. DHCP Leases ................................................8
5. DHCP's Interaction with DNS . . . . . . . . . . . . . . . . . 7 6. Security Considerations .........................................9
5.1. Domain Name Server (DHCP Option 6) . . . . . . . . . . . . 8 6.1. Forgery Resilience .........................................9
5.2. Domain Name (DHCP Option 15) . . . . . . . . . . . . . . . 8 6.2. Interface Binding .........................................10
5.3. DHCP Leases . . . . . . . . . . . . . . . . . . . . . . . 9 6.3. Packet Filtering ..........................................10
7. Acknowledgements ...............................................10
6. Security Considerations . . . . . . . . . . . . . . . . . . . 9 8. References .....................................................11
6.1. Forgery Resilience . . . . . . . . . . . . . . . . . . . . 9 8.1. Normative References ......................................11
6.2. Interface Binding . . . . . . . . . . . . . . . . . . . . 10 8.2. Informative References ....................................12
6.3. Packet Filtering . . . . . . . . . . . . . . . . . . . . . 10
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11
8. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . . 11
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 12
10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 12
10.1. Normative References . . . . . . . . . . . . . . . . . . . 12
10.2. Informative References . . . . . . . . . . . . . . . . . . 13
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 13
1. Introduction 1. Introduction
Research has found ([SAC035], [DOTSE]) that many commonly-used Research has found ([SAC035], [DOTSE]) that many commonly used
broadband gateways (and similar devices) contain DNS proxies which broadband gateways (and similar devices) contain DNS proxies that are
are incompatible in various ways with current DNS standards. incompatible in various ways with current DNS standards.
These proxies are usually simple DNS forwarders, but typically do not These proxies are usually simple DNS forwarders, but typically do not
have any caching capabilities. The proxy serves as a convenient have any caching capabilities. The proxy serves as a convenient
default DNS resolver for clients on the LAN, but relies on an default DNS resolver for clients on the LAN, but relies on an
upstream resolver (e.g. at an ISP) to perform recursive DNS lookups. upstream resolver (e.g., at an ISP) to perform recursive DNS lookups.
Note that to ensure full DNS protocol interoperability it is Note that to ensure full DNS protocol interoperability it is
preferred that client stub resolvers should communicate directly with preferred that client stub resolvers should communicate directly with
full-feature upstream recursive resolvers wherever possible. full-feature, upstream recursive resolvers wherever possible.
That notwithstanding, this document describes the incompatibilities That notwithstanding, this document describes the incompatibilities
that have been discovered and offers guidelines to implementors on that have been discovered and offers guidelines to implementors on
how to provide better interoperability in those cases where the how to provide better interoperability in those cases where the
client must use the broadband gateway's DNS proxy. client must use the broadband gateway's DNS proxy.
2. Terminology 2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119]. document are to be interpreted as described in [RFC2119].
3. The Transparency Principle 3. The Transparency Principle
It is not considered practical for a simple DNS proxy to implement It is not considered practical for a simple DNS proxy to implement
all current and future DNS features. all current and future DNS features.
There are several reasons why this is the case: There are several reasons why this is the case:
o broadband gateways usually have limited hardware resources o Broadband gateways usually have limited hardware resources.
o firmware upgrade cycles are long, and many users do not routinely
apply upgrades when they become available
o no-one knows what those future DNS features will be, nor how they
might be implemented
o it would substantially complicate the configuration UI of the
device
Furthermore some modern DNS protocol extensions (see e.g. EDNS0, o Firmware upgrade cycles are long, and many users do not routinely
apply upgrades when they become available.
o No one knows what those future DNS features will be or how they
might be implemented.
o Doing so would substantially complicate the configuration user
interface (UI) of the device.
Furthermore, some modern DNS protocol extensions (see, e.g., EDNS0
below) are intended to be used as "hop-by-hop" mechanisms. If the below) are intended to be used as "hop-by-hop" mechanisms. If the
DNS proxy is considered to be such a "hop" in the resolution chain, DNS proxy is considered to be such a "hop" in the resolution chain,
then for it to function correctly, it would need to be fully then for it to function correctly, it would need to be fully
compliant with all such mechanisms. compliant with all such mechanisms.
[SAC035] shows that the more actively a proxy participates in the DNS [SAC035] shows that the more actively a proxy participates in the DNS
protocol then the more likely it is that it will somehow interfere protocol, the more likely it is that it will somehow interfere with
with the flow of messages between the DNS client and the upstream the flow of messages between the DNS client and the upstream
recursive resolvers. recursive resolvers.
The role of the proxy should therefore be no more and no less than to The role of the proxy should therefore be no more and no less than to
receive DNS requests from clients on the LAN side, forward those receive DNS requests from clients on the LAN side, forward those
verbatim to one of the known upstream recursive resolvers on the WAN verbatim to one of the known upstream recursive resolvers on the WAN
side, and ensure that the whole response is returned verbatim to the side, and ensure that the whole response is returned verbatim to the
original client. original client.
It is RECOMMENDED that proxies should be as transparent as possible, It is RECOMMENDED that proxies should be as transparent as possible,
such that any "hop-by-hop" mechanisms or newly introduced protocol such that any "hop-by-hop" mechanisms or newly introduced protocol
skipping to change at page 4, line 40 skipping to change at page 4, line 21
The Transparency Principle above, when combined with Postel's The Transparency Principle above, when combined with Postel's
Robustness Principle [RFC0793], suggests that DNS proxies should not Robustness Principle [RFC0793], suggests that DNS proxies should not
arbitrarily reject or otherwise drop requests or responses based on arbitrarily reject or otherwise drop requests or responses based on
perceived non-compliance with standards. perceived non-compliance with standards.
For example, some proxies have been observed to drop any packet For example, some proxies have been observed to drop any packet
containing either the "Authentic Data" (AD) or "Checking Disabled" containing either the "Authentic Data" (AD) or "Checking Disabled"
(CD) bits from DNSSEC [RFC4035]. This may be because [RFC1035] (CD) bits from DNSSEC [RFC4035]. This may be because [RFC1035]
originally specified that these unused "Z" flag bits "MUST" be zero. originally specified that these unused "Z" flag bits "MUST" be zero.
However these flag bits were always intended to be reserved for However, these flag bits were always intended to be reserved for
future use, so refusing to proxy any packet containing these flags future use, so refusing to proxy any packet containing these flags
(now that uses for those flags have indeed been defined) is not (now that uses for those flags have indeed been defined) is not
appropriate. appropriate.
Therefore proxies MUST ignore any unknown DNS flags and proxy those Therefore, proxies MUST ignore any unknown DNS flags and proxy those
packets as usual. packets as usual.
4.2. Label Compression 4.2. Label Compression
Compression of labels as per Section 4.1.4 of [RFC1035] is optional. Compression of labels as per Section 4.1.4 of [RFC1035] is optional.
Proxies MUST forward packets regardless of the presence or absence of Proxies MUST forward packets regardless of the presence or absence of
compressed labels therein. compressed labels therein.
4.3. Unknown Resource Record Types 4.3. Unknown Resource Record Types
[RFC3597] requires that resolvers MUST handle Resource Records (RRs) [RFC3597] requires that resolvers MUST handle Resource Records (RRs)
of unknown type transparently. of unknown type transparently.
All requests and responses MUST be proxied regardless of the values All requests and responses MUST be proxied regardless of the values
of the QTYPE and QCLASS fields. of the QTYPE and QCLASS fields.
Similarly all responses MUST be proxied regardless of the values of Similarly, all responses MUST be proxied regardless of the values of
the TYPE and CLASS fields of any Resource Record therein. the TYPE and CLASS fields of any Resource Record therein.
4.4. Packet Size Limits 4.4. Packet Size Limits
[RFC1035] specifies that the maximum size of the DNS payload in a UDP [RFC1035] specifies that the maximum size of the DNS payload in a UDP
packet is 512 octets. Where the required portions of a response packet is 512 octets. Where the required portions of a response
would not fit inside that limit the DNS server MUST set the would not fit inside that limit, the DNS server MUST set the
"TrunCation" (TC) bit in the DNS response header to indicate that "TrunCation" (TC) bit in the DNS response header to indicate that
truncation has occurred. There are however two standard mechanisms truncation has occurred. There are however two standard mechanisms
(described in Section 4.4.1 and Section 4.4.2) for transporting (described in Sections 4.4.1 and 4.4.2) for transporting responses
responses larger than 512 octets. larger than 512 octets.
Many proxies have been observed to truncate all responses at 512 Many proxies have been observed to truncate all responses at 512
octets, and others at a packet size related to the WAN MTU, in either octets, and others at a packet size related to the WAN MTU, in either
case doing so without correctly setting the TC bit. case doing so without correctly setting the TC bit.
Other proxies have been observed to remove the TC bit in server Other proxies have been observed to remove the TC bit in server
responses which correctly had the TC bit set by the server. responses that correctly had the TC bit set by the server.
If a DNS response is truncated but the TC bit is not set then client If a DNS response is truncated but the TC bit is not set, then client
failures may result. In particular a naive DNS client library might failures may result. In particular, a naive DNS client library might
suffer crashes due to reading beyond the end of the data actually suffer crashes due to reading beyond the end of the data actually
received. received.
Since UDP packets larger than 512 octets are now expected in normal Since UDP packets larger than 512 octets are now expected in normal
operation, proxies SHOULD NOT truncate UDP packets that exceed that operation, proxies SHOULD NOT truncate UDP packets that exceed that
size. See Section 4.4.3 for recommendations for packet sizes size. See Section 4.4.3 for recommendations for packet sizes
exceeding the WAN MTU. exceeding the WAN MTU.
If a proxy must unilaterally truncate a response then the proxy MUST If a proxy must unilaterally truncate a response, then the proxy MUST
set the TC bit. Similarly, proxies MUST NOT remove the TC bit from set the TC bit. Similarly, proxies MUST NOT remove the TC bit from
responses. responses.
4.4.1. TCP Transport 4.4.1. TCP Transport
Should a UDP query fail because of truncation, the standard fail-over Should a UDP query fail because of truncation, the standard fail-over
mechanism is to retry the query using TCP, as described in section mechanism is to retry the query using TCP, as described in Section
6.1.3.2 of [RFC1123]. 6.1.3.2 of [RFC1123].
Whilst TCP transport is not strictly mandatory, it is supported by Whilst TCP transport is not strictly mandatory, it is supported by
the vast majority of stub resolvers and recursive servers. Lack of the vast majority of stub resolvers and recursive servers. Lack of
support in the proxy prevents this fail-over mechanism from working. support in the proxy prevents this fail-over mechanism from working.
DNS proxies MUST therefore be prepared to receive and forward queries DNS proxies MUST therefore be prepared to receive and forward queries
over TCP. over TCP.
Note that it is unlikely that a client would send a request over TCP Note that it is unlikely that a client would send a request over TCP
unless it had already received a truncated UDP response. Some unless it had already received a truncated UDP response. Some
"smart" proxies have been observed to first forward any request "smart" proxies have been observed to first forward any request
received over TCP to an upstream resolver over UDP, only for the received over TCP to an upstream resolver over UDP, only for the
response to be truncated, causing the proxy to retry over TCP. Such response to be truncated, causing the proxy to retry over TCP. Such
behaviour increases network traffic and causes delay in DNS behaviour increases network traffic and causes delay in DNS
resolution since the initial UDP request is doomed to fail. resolution since the initial UDP request is doomed to fail.
Therefore whenever a proxy receives a request over TCP, the proxy Therefore, whenever a proxy receives a request over TCP, the proxy
SHOULD forward the query over TCP and SHOULD NOT attempt the same SHOULD forward the query over TCP and SHOULD NOT attempt the same
query over UDP first. query over UDP first.
4.4.2. Extension Mechanisms for DNS (EDNS0) 4.4.2. Extension Mechanisms for DNS (EDNS0)
The Extension Mechanism for DNS [RFC2671] was introduced to allow the The "Extension Mechanism for DNS" [RFC2671] was introduced to allow
transport of larger DNS packets over UDP and also to allow for the transport of larger DNS packets over UDP and also to allow for
additional request and response flags. additional request and response flags.
A client may send an OPT Resource Record (OPT RR) in the Additional A client may send an OPT Resource Record (OPT RR) in the Additional
Section of a request to indicate that it supports a specific receive Section of a request to indicate that it supports a specific receive
buffer size. The OPT RR also includes the "DNSSEC OK" (DO) flag used buffer size. The OPT RR also includes the "DNSSEC OK" (DO) flag used
by DNSSEC to indicate that DNSSEC-related RRs should be returned to by DNSSEC to indicate that DNSSEC-related RRs should be returned to
the client. the client.
However some proxies have been observed to either reject (with a However, some proxies have been observed to either reject (with a
FORMERR response code) or black-hole any packet containing an OPT RR. FORMERR response code) or black-hole any packet containing an OPT RR.
As per Section 4.1 proxies MUST NOT refuse to proxy such packets. As per Section 4.1, proxies MUST NOT refuse to proxy such packets.
4.4.3. IP Fragmentation 4.4.3. IP Fragmentation
Support for UDP packet sizes exceeding the WAN MTU depends on the Support for UDP packet sizes exceeding the WAN MTU depends on the
gateway's algorithm for handling fragmented IP packets. Several gateway's algorithm for handling fragmented IP packets. Several
methods are possible: methods are possible:
1. fragments are dropped 1. Fragments are dropped.
2. fragments are forwarded individually as they're received
3. complete packets are reassembled on the gateway, and then re- 2. Fragments are forwarded individually as they're received.
fragmented (if necessary) as they're forwarded to the client
3. Complete packets are reassembled on the gateway and then re-
fragmented (if necessary) as they're forwarded to the client.
Method 1 above will cause compatibility problems with EDNS0 unless Method 1 above will cause compatibility problems with EDNS0 unless
the DNS client is configured to advertise an EDNS0 buffer size the DNS client is configured to advertise an EDNS0 buffer size
limited to the WAN MTU less the size of the IP header. Note that RFC limited to the WAN MTU less the size of the IP header. Note that RFC
2671 does recommend that the path MTU should be taken into account 2671 does recommend that the path MTU should be taken into account
when using EDNS0. when using EDNS0.
Also, whilst the EDNS0 specification allows for a buffer size of up Also, whilst the EDNS0 specification allows for a buffer size of up
to 65535 octets, most common DNS server implementations do not to 65535 octets, most common DNS server implementations do not
support a buffer size above 4096 octets. support a buffer size above 4096 octets.
Therefore (irrespective of which of the methods above is in use) Therefore (irrespective of which of the above methods is in use),
proxies SHOULD be capable of forwarding UDP packets up to a payload proxies SHOULD be capable of forwarding UDP packets up to a payload
size of at least 4096 octets. size of at least 4096 octets.
NB: in theory IP fragmentation may also occur if the LAN MTU is NB: in theory, IP fragmentation may also occur if the LAN MTU is
smaller than the WAN MTU, although the author has not observed such a smaller than the WAN MTU, although the author has not observed such a
configuration in use on any residential broadband service. configuration in use on any residential broadband service.
4.5. Secret Key Transaction Authentication for DNS (TSIG) 4.5. Secret Key Transaction Authentication for DNS (TSIG)
[RFC2845] defines TSIG, which is a mechanism for authenticating DNS [RFC2845] defines TSIG, which is a mechanism for authenticating DNS
requests and responses at the packet level. requests and responses at the packet level.
Any modifications made to the DNS portions of a TSIG-signed query or Any modifications made to the DNS portions of a TSIG-signed query or
response packet (with the exception of the Query ID) will cause a response packet (with the exception of the Query ID) will cause a
TSIG authentication failure. TSIG authentication failure.
DNS proxies MUST implement Section 4.7 of [RFC2845] and either DNS proxies MUST implement Section 4.7 of [RFC2845] and either
forward packets unchanged (as recommended above) or fully implement forward packets unchanged (as recommended above) or fully implement
TSIG. TSIG.
As per Section 4.3, DNS proxies MUST be capable of proxying packets As per Section 4.3, DNS proxies MUST be capable of proxying packets
containing TKEY [RFC2930] Resource Records. containing TKEY [RFC2930] Resource Records.
NB: any DNS proxy (such as those commonly found in WiFi hotspot NB: any DNS proxy (such as those commonly found in WiFi hotspot
"walled gardens") which transparently intercepts all DNS queries, and "walled gardens") that transparently intercepts all DNS queries and
which returns unsigned responses to signed queries, will also cause that returns unsigned responses to signed queries, will also cause
TSIG authentication failures. TSIG authentication failures.
5. DHCP's Interaction with DNS 5. DHCP's Interaction with DNS
Whilst this document is primarily about DNS proxies, most consumers Whilst this document is primarily about DNS proxies, most consumers
rely on DHCP [RFC2131] to obtain network configuration settings. rely on DHCP [RFC2131] to obtain network configuration settings.
Such settings include the client machine's IP address, subnet mask Such settings include the client machine's IP address, subnet mask,
and default gateway, but also include DNS related settings. and default gateway, but also include DNS-related settings.
It is therefore appropriate to examine how DHCP affects client DNS It is therefore appropriate to examine how DHCP affects client DNS
configuration. configuration.
5.1. Domain Name Server (DHCP Option 6) 5.1. Domain Name Server (DHCP Option 6)
Most gateways default to supplying their own IP address in the DHCP Most gateways default to supplying their own IP address in the DHCP
"Domain Name Server" option [RFC2132]. The net result is that "Domain Name Server" option [RFC2132]. The net result is that
without explicit re-configuration many DNS clients will by default without explicit re-configuration many DNS clients will, by default,
send queries to the gateway's DNS proxy. This is understandable send queries to the gateway's DNS proxy. This is understandable
behaviour given that the correct upstream settings are not usually behaviour given that the correct upstream settings are not usually
known at boot time. known at boot time.
Most gateways learn their own DNS settings via values supplied by an Most gateways learn their own DNS settings via values supplied by an
ISP via DHCP or PPP over the WAN interface. However whilst many ISP via DHCP or PPP over the WAN interface. However, whilst many
gateways do allow the device administrator to override those values, gateways do allow the device administrator to override those values,
some gateways only use those supplied values to affect the proxy's some gateways only use those supplied values to affect the proxy's
own forwarding function, and do not offer these values via DHCP. own forwarding function, and do not offer these values via DHCP.
When using such a device the only way to avoid using the DNS proxy is When using such a device, the only way to avoid using the DNS proxy
to hard-code the required values in the client operating system. is to hard-code the required values in the client operating system.
This may be acceptable for a desktop system but it is inappropriate This may be acceptable for a desktop system but it is inappropriate
for mobile devices which are regularly used on many different for mobile devices that are regularly used on many different
networks. networks.
As per Section 3, end-users SHOULD be able to send their DNS queries As per Section 3, end-users SHOULD be able to send their DNS queries
directly to specified upstream resolvers, ideally without hard-coding directly to specified upstream resolvers, ideally without hard-coding
those settings in their stub resolver. those settings in their stub resolver.
It is therefore RECOMMENDED that gateways SHOULD support device It is therefore RECOMMENDED that gateways SHOULD support device-
administrator configuration of values for the "Domain Name Server" administrator configuration of values for the "Domain Name Server"
DHCP option. DHCP option.
5.2. Domain Name (DHCP Option 15) 5.2. Domain Name (DHCP Option 15)
A significant amount of traffic to the DNS Root Name Servers is for A significant amount of traffic to the DNS Root Name Servers is for
invalid top-level domain names, and some of that traffic can be invalid top-level domain names, and some of that traffic can be
attributed to particular equipment vendors whose firmware defaults attributed to particular equipment vendors whose firmware defaults
this DHCP option to specific values. this DHCP option to specific values.
Since no standard exists for a "local" scoped domain name suffix it Since no standard exists for a "local" scoped domain name suffix, it
is RECOMMENDED that the default value for this option SHOULD be is RECOMMENDED that the default value for this option SHOULD be
empty, and that this option MUST NOT be sent to clients when no value empty, and that this option MUST NOT be sent to clients when no value
is configured. is configured.
5.3. DHCP Leases 5.3. DHCP Leases
It is noted that some DHCP servers in broadband gateways by default It is noted that some DHCP servers in broadband gateways offer, by
offer their own IP address for the "Domain Name Server" option (as default, their own IP address for the "Domain Name Server" option (as
described above) but then automatically start offering the upstream described above) but then automatically start offering the upstream
servers' addresses once they've been learnt over the WAN interface. servers' addresses once they've been learnt over the WAN interface.
In general this behaviour is highly desirable, but the effect for the In general, this behaviour is highly desirable, but the effect for
end-user is that the settings used depend on whether the DHCP lease the end-user is that the settings used depend on whether the DHCP
was obtained before or after the WAN link was established. lease was obtained before or after the WAN link was established.
If the DHCP lease is obtained whilst the WAN link is down then the If the DHCP lease is obtained whilst the WAN link is down, then the
DHCP client (and hence the DNS client) will not receive the correct DHCP client (and hence the DNS client) will not receive the correct
values until the DHCP lease is renewed. values until the DHCP lease is renewed.
Whilst no specific recommendations are given here, vendors may wish Whilst no specific recommendations are given here, vendors may wish
to give consideration to the length of DHCP leases, and whether some to give consideration to the length of DHCP leases and to whether
mechanism for forcing a DHCP lease renewal might be appropriate. some mechanism for forcing a DHCP lease renewal might be appropriate.
Another possibility is that the learnt upstream values might be Another possibility is that the learnt upstream values might be
persisted in non-volatile memory such that on reboot the same values persisted in non-volatile memory such that on reboot the same values
can be automatically offered via DHCP. However this does run the can be automatically offered via DHCP. However, this does run the
risk that incorrect values are initially offered if the device is risk that incorrect values are initially offered if the device is
moved or connected to another ISP. moved or connected to another ISP.
Alternatively, the DHCP server might only issue very short (i.e. 60 Alternatively, the DHCP server might only issue very short (i.e., 60
second) leases while the WAN link is down, only reverting to more second) leases while the WAN link is down, only reverting to more
typical lease lengths once the WAN link is up and the upstream DNS typical lease lengths once the WAN link is up and the upstream DNS
servers are known. Indeed with such a configuration it may be servers are known. Indeed, with such a configuration it may be
possible to avoid the need to implement a DNS proxy function in the possible to avoid the need to implement a DNS proxy function in the
broadband gateway at all. broadband gateway at all.
6. Security Considerations 6. Security Considerations
This document introduces no new protocols. However there are some This document introduces no new protocols. However, there are some
security related recommendations for vendors that are listed here. security-related recommendations for vendors that are listed here.
6.1. Forgery Resilience 6.1. Forgery Resilience
Whilst DNS proxies are not usually full-feature resolvers they Whilst DNS proxies are not usually full-feature resolvers, they
nevertheless share some characteristics with them. nevertheless share some characteristics with them.
Notwithstanding the recommendations above about transparency many DNS Notwithstanding the recommendations above about transparency, many
proxies are observed to pick a new Query ID for outbound requests to DNS proxies are observed to pick a new Query ID for outbound requests
ensure that responses are directed to the correct client. to ensure that responses are directed to the correct client.
NB: Changing the Query ID is acceptable and compatible with proxying NB: changing the Query ID is acceptable and compatible with proxying
TSIG-signed packets since the TSIG signature calculation is based on TSIG-signed packets since the TSIG signature calculation is based on
the original message ID which is carried in the TSIG RR. the original message ID, which is carried in the TSIG RR.
It has been standard guidance for many years that each DNS query It has been standard guidance for many years that each DNS query
should use a randomly generated Query ID. However many proxies have should use a randomly generated Query ID. However, many proxies have
been observed picking sequential Query IDs for successive requests. been observed picking sequential Query IDs for successive requests.
It is strongly RECOMMENDED that DNS proxies follow the relevant It is strongly RECOMMENDED that DNS proxies follow the relevant
recommendations in [RFC5452], particularly those in Section 9.2 recommendations in [RFC5452], particularly those in Section 9.2
relating to randomisation of Query IDs and source ports. This also relating to randomisation of Query IDs and source ports. This also
applies to source port selection within any NAT function. applies to source port selection within any NAT function.
If a DNS proxy is running on a broadband gateway with NAT that is If a DNS proxy is running on a broadband gateway with NAT that is
compliant with [RFC4787] then it SHOULD also follow the compliant with [RFC4787], then it SHOULD also follow the
recommendations in Section 10 of [RFC5452] concerning how long DNS recommendations in Section 10 of [RFC5452] concerning how long DNS
state is kept. state is kept.
6.2. Interface Binding 6.2. Interface Binding
Some gateways have been observed to have their DNS proxy listening on Some gateways have been observed to have their DNS proxy listening on
both internal (LAN) and external (WAN) interfaces. In this both internal (LAN) and external (WAN) interfaces. In this
configuration it is possible for the proxy to be used to mount configuration, it is possible for the proxy to be used to mount
reflector attacks as described in [RFC5358]. reflector attacks as described in [RFC5358].
The DNS proxy in a gateway SHOULD NOT by default be accessible from The DNS proxy in a gateway SHOULD NOT, by default, be accessible from
the WAN interfaces of the device. the WAN interfaces of the device.
6.3. Packet Filtering 6.3. Packet Filtering
The Transparency and Robustness Principles are not entirely The Transparency and Robustness Principles are not entirely
compatible with the deep packet inspection features of security compatible with the deep packet-inspection features of security
appliances such as firewalls which are intended to protect systems on appliances such as firewalls, which are intended to protect systems
the inside of a network from rogue traffic. on the inside of a network from rogue traffic.
However a clear distinction may be made between traffic that is However, a clear distinction may be made between traffic that is
intrinsically malformed and that which merely contains unexpected intrinsically malformed and that which merely contains unexpected
data. data.
Examples of malformed packets which MAY be dropped include: Examples of malformed packets that MAY be dropped include:
o invalid compression pointers (i.e. those that point outside of the o invalid compression pointers (i.e., those that point outside of
current packet, or which might cause a parsing loop). the current packet or that might cause a parsing loop)
o incorrect counts for the Question, Answer, Authority and
o incorrect counts for the Question, Answer, Authority, and
Additional Sections (although care should be taken where Additional Sections (although care should be taken where
truncation is a possibility). truncation is a possibility)
Dropped packets will cause the client to repeatedly retransmit the Dropped packets will cause the client to repeatedly retransmit the
original request, with the client only detecting the error after original request, with the client only detecting the error after
several retransmit intervals. several retransmit intervals.
In these circumstances proxies SHOULD synthesise a suitable DNS error In these circumstances, proxies SHOULD synthesise a suitable DNS
response to the client (i.e. SERVFAIL) instead of dropping the error response to the client (i.e., SERVFAIL) instead of dropping the
packet completely. This will allow the client to detect the error packet completely. This will allow the client to detect the error
immediately. immediately.
7. IANA Considerations 7. Acknowledgements
This document requests no IANA actions.
8. Change Log
NB: to be removed by the RFC Editor before publication.
draft-ietf-dnsproxy-06pre (from IESG review)
Section 4.1 - cleaned up tautological language and changed SHOULD
to MUST (Adrian Farrel)
Section 4.4.1 - made TCP support mandatory (from Lars Eggert)
Section 4.4.2 - made EDNS0 pass-thru mandatory (from Jari Arkko)
Section 6.3 - clarified rationale for handling errors (from Robert
Sparks)
draft-ietf-dnsproxy-05
Removed specific reference to 28 byte IP headers (from Mark
Andrews)
draft-ietf-dnsproxy-04 - post WGLC
Introduction expanded
Section 5.2 - changed SHOULD to MUST
Section 4.5 - changed SHOULD to MUST (Alex Bligh)
Editorial nits (from Andrew Sullivan, Alfred Hones)
Clarificaton on end-user vs device administrator (Alan Barrett,
Paul Selkirk)
draft-ietf-dnsproxy-03
Editorial nits and mention of LAN MTU (from Alex Bligh)
draft-ietf-dnsproxy-02
Changed "router" to "gateway" throughout (David Oran)
Updated forgery resilience reference
Elaboration on bypassability (from Nicholas W.)
Elaboration on NAT source port randomisation (from Nicholas W.)
Mention of using short DHCP leases while the WAN link is down
(from Ralph Droms)
Further clarification on permissibility of altering QID when using
TSIG
draft-ietf-dnsproxy-01
Strengthened recommendations about truncation (from Shane Kerr)
New TSIG text (with help from Olafur)
Additional forgery resilience text (from Olafur)
Compression support (from Olafur)
Correction of text re: QID changes and compatibility with TSIG
draft-ietf-dnsproxy-00
Changed recommended DPI error to SERVFAIL (from Jelte)
Changed example for invalid compression pointers (from Wouter).
Note about TSIG implications of changing Query ID (from Wouter).
Clarified TC-bit text (from Wouter)
Extra text about proxy bypass (Nicholas W.)
draft-bellis-dnsproxy-00
Initial draft
9. Acknowledgements
The author would particularly like to acknowledge the assistance of The author would particularly like to acknowledge the assistance of
Lisa Phifer of Core Competence. In addition the author is grateful Lisa Phifer of Core Competence. In addition, the author is grateful
for the feedback from the members of the DNSEXT Working Group. for the feedback from the members of the DNSEXT Working Group.
10. References 8. References
10.1. Normative References 8.1. Normative References
[RFC0793] Postel, J., "Transmission Control Protocol", STD 7, [RFC0793] Postel, J., "Transmission Control Protocol", STD 7,
RFC 793, September 1981. RFC 793, September 1981.
[RFC1035] Mockapetris, P., "Domain names - implementation and [RFC1035] Mockapetris, P., "Domain names - implementation and
specification", STD 13, RFC 1035, November 1987. specification", STD 13, RFC 1035, November 1987.
[RFC1123] Braden, R., "Requirements for Internet Hosts - Application [RFC1123] Braden, R., "Requirements for Internet Hosts - Application
and Support", STD 3, RFC 1123, October 1989. and Support", STD 3, RFC 1123, October 1989.
skipping to change at page 13, line 34 skipping to change at page 12, line 8
(NAT) Behavioral Requirements for Unicast UDP", BCP 127, (NAT) Behavioral Requirements for Unicast UDP", BCP 127,
RFC 4787, January 2007. RFC 4787, January 2007.
[RFC5358] Damas, J. and F. Neves, "Preventing Use of Recursive [RFC5358] Damas, J. and F. Neves, "Preventing Use of Recursive
Nameservers in Reflector Attacks", BCP 140, RFC 5358, Nameservers in Reflector Attacks", BCP 140, RFC 5358,
October 2008. October 2008.
[RFC5452] Hubert, A. and R. van Mook, "Measures for Making DNS More [RFC5452] Hubert, A. and R. van Mook, "Measures for Making DNS More
Resilient against Forged Answers", RFC 5452, January 2009. Resilient against Forged Answers", RFC 5452, January 2009.
10.2. Informative References 8.2. Informative References
[DOTSE] Ahlund and Wallstrom, "DNSSEC Tests of Consumer Broadband [DOTSE] Ahlund and Wallstrom, "DNSSEC Tests of Consumer Broadband
Routers", February 2008, Routers", February 2008,
<http://www.iis.se/docs/Routertester_en.pdf>. <http://www.iis.se/docs/Routertester_en.pdf>.
[SAC035] Bellis, R. and L. Phifer, "Test Report: DNSSEC Impact on [SAC035] Bellis, R. and L. Phifer, "Test Report: DNSSEC Impact on
Broadband Routers and Firewalls", September 2008, Broadband Routers and Firewalls", September 2008,
<http://www.icann.org/committees/security/sac035.pdf>. <http://www.icann.org/committees/security/sac035.pdf>.
Author's Address Author's Address
Ray Bellis Ray Bellis
Nominet UK Nominet UK
Edmund Halley Road Edmund Halley Road
Oxford OX4 4DQ Oxford OX4 4DQ
United Kingdom United Kingdom
Phone: +44 1865 332211 Phone: +44 1865 332211
Email: ray.bellis@nominet.org.uk EMail: ray.bellis@nominet.org.uk
URI: http://www.nominet.org.uk/ URI: http://www.nominet.org.uk/
 End of changes. 66 change blocks. 
213 lines changed or deleted 130 lines changed or added

This html diff was produced by rfcdiff 1.35. The latest version is available from http://tools.ietf.org/tools/rfcdiff/