Re: [Ntp] Rate limiting: DDoS, KoD, Pool, NAT

Philip Prindeville <philipp@redfish-solutions.com> Tue, 08 December 2020 19:44 UTC

Return-Path: <philipp@redfish-solutions.com>
X-Original-To: ntp@ietfa.amsl.com
Delivered-To: ntp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 83E7D3A110D for <ntp@ietfa.amsl.com>; Tue, 8 Dec 2020 11:44:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X7X7GT_R66Hm for <ntp@ietfa.amsl.com>; Tue, 8 Dec 2020 11:44:51 -0800 (PST)
Received: from mail.redfish-solutions.com (mail.redfish-solutions.com [45.33.216.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7636D3A1108 for <ntp@ietf.org>; Tue, 8 Dec 2020 11:44:51 -0800 (PST)
Received: from [192.168.3.4] ([192.168.3.4]) (authenticated bits=0) by mail.redfish-solutions.com (8.16.1/8.16.1) with ESMTPSA id 0B8JinYQ124386 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 8 Dec 2020 12:44:49 -0700
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.20.0.2.21\))
From: Philip Prindeville <philipp@redfish-solutions.com>
In-Reply-To: <20201208180355.111BB40605C@ip-64-139-1-69.sjc.megapath.net>
Date: Tue, 08 Dec 2020 12:44:49 -0700
Cc: NTP WG <ntp@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <FF24E723-C7BF-4B1F-AF34-0A250BA839AC@redfish-solutions.com>
References: <20201208180355.111BB40605C@ip-64-139-1-69.sjc.megapath.net>
To: Hal Murray <hmurray@megapathdsl.net>
X-Mailer: Apple Mail (2.3654.20.0.2.21)
X-Scanned-By: MIMEDefang 2.84 on 192.168.1.3
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/RgsjpqJ-1LhMr6NBdM_sKeJldXo>
Subject: Re: [Ntp] Rate limiting: DDoS, KoD, Pool, NAT
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <ntp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ntp>, <mailto:ntp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ntp/>
List-Post: <mailto:ntp@ietf.org>
List-Help: <mailto:ntp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ntp>, <mailto:ntp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 08 Dec 2020 19:44:53 -0000


> On Dec 8, 2020, at 11:03 AM, Hal Murray <hmurray@megapathdsl.net> wrote:
> 
> 
> philipp@redfish-solutions.com said:
>> My point was that the address stuffed into the cookie/nonce would mismatch
>> the address in the source address of the IP packet once it got SNAT’d.
> 
>> It sounded like you were tacitly counting on the two being a match. 
> 
> I think it works, but maybe I'm missing something.
> 
> Server behind NAT box:
>  Server gets clients correct IP Address which goes into the cookie.
>  When the cookie comes back, it has the same IP Address and matches.
> 
> Client behind NAT box:
>  Server gets address of NAT box.  That goes into cookie.


Not necessarily.  Most services are oblivious to the fact that they’re being NATted.  I don’t think this should be any different.


>  When the cookie comes back, it has the same address (NAT box) and matches.
> 
> Note that "IP Address" in the above does not include the port number.
> 
> I think the key idea is that both ends don't have to agree on what the IP 
> Address is.  The server both inserts the IP Address into the cookie and checks 
> it when the cookie comes back.  As long as the packet comes from the same NAT 
> box things will match.
> 
> If there are multiple clients behind the NAT box, one of them could use his 
> cookies to DoS another system behind the same NAT box.
> 
>