Re: [IPsec] Mirja Kuehlewind's Discuss on draft-ietf-ipsecme-tcp-encaps-09: (with DISCUSS)

Mirja Kühlewind <ietf@kuehlewind.net> Fri, 28 April 2017 11:52 UTC

Return-Path: <ietf@kuehlewind.net>
X-Original-To: ipsec@ietfa.amsl.com
Delivered-To: ipsec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9E552129C39 for <ipsec@ietfa.amsl.com>; Fri, 28 Apr 2017 04:52:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.003
X-Spam-Level:
X-Spam-Status: No, score=-2.003 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); domainkeys=pass (1024-bit key) header.from=ietf@kuehlewind.net header.d=kuehlewind.net
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 2MThvnn8y8j2 for <ipsec@ietfa.amsl.com>; Fri, 28 Apr 2017 04:52:21 -0700 (PDT)
Received: from kuehlewind.net (kuehlewind.net [83.169.45.111]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 81E4B129504 for <ipsec@ietf.org>; Fri, 28 Apr 2017 04:48:18 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=kuehlewind.net; b=fJdesWlrofq6RexRV0ddVXGwz0s+oNyNIuNUTvyBLZVbSr4fQZHesNoO8VrU8VH0dSn1yHp7gh69rbNMWZGDEe4uOj4fjP1K7XlzdmnLznO3DpAnq+ZMRzOuCG371S96Xde162waatkNR7mjQVv8VVbh5hX8sTztljwT95R2pMY=; h=Received:Received:Subject:To:References:Cc:From:Message-ID:Date:User-Agent:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-PPP-Message-ID:X-PPP-Vhost;
Received: (qmail 9893 invoked from network); 28 Apr 2017 13:41:35 +0200
Received: from nb-10510.ethz.ch (HELO ?82.130.103.143?) (82.130.103.143) by kuehlewind.net with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 28 Apr 2017 13:41:35 +0200
To: Tero Kivinen <kivinen@iki.fi>
References: <149312449263.5884.11168631631187069210.idtracker@ietfa.amsl.com> <1CD2BB99-CDA2-472A-9833-741FB14CAE4A@apple.com> <752dde8c-0592-288e-6920-53a211834740@kuehlewind.net> <CABcZeBMj9UpzD+CpvOMKOkUsYNSL-UQCwuYt__5XCXtH=zyesA@mail.gmail.com> <22fac532-f30b-03e3-0757-aed213e5a346@kuehlewind.net> <22785.64570.259658.376130@fireball.acr.fi>
Cc: Eric Rescorla <ekr@rtfm.com>, ipsecme-chairs@ietf.org, ipsec@ietf.org, The IESG <iesg@ietf.org>, draft-ietf-ipsecme-tcp-encaps@ietf.org, Tommy Pauly <tpauly@apple.com>
From: Mirja Kühlewind <ietf@kuehlewind.net>
Message-ID: <277aa94d-5aa1-7a28-94c7-81da0966c172@kuehlewind.net>
Date: Fri, 28 Apr 2017 13:41:34 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <22785.64570.259658.376130@fireball.acr.fi>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 8bit
X-PPP-Message-ID: <20170428114135.9883.73786@lvps83-169-45-111.dedicated.hosteurope.de>
X-PPP-Vhost: kuehlewind.net
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipsec/yHzEtsIIjeg1ic5zQF6aDavQkMw>
Subject: Re: [IPsec] Mirja Kuehlewind's Discuss on draft-ietf-ipsecme-tcp-encaps-09: (with DISCUSS)
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Discussion of IPsec protocols <ipsec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ipsec>, <mailto:ipsec-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ipsec/>
List-Post: <mailto:ipsec@ietf.org>
List-Help: <mailto:ipsec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipsec>, <mailto:ipsec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Apr 2017 11:52:22 -0000

Hi Tero,

a few quick replies but we also discussed this yesterday at the telechat and 
agreed on a way forward.

On 27.04.2017 16:12, Tero Kivinen wrote:
> Mirja Kühlewind writes:
>>> I agree that this kind of port squatting is regrettable, but I also don't
>>> think it really
>>> helps to not publish RFCs that document widely used protocols because we
>>> are sad they port-squatted.
>>>
>>> I proposed a way to deal with this in an earlier e-mail. Would that be
>>> satisfactory
>>> to you. To retransmit, we add the following
>>>
>>> "Note: While port 4500 is the reserved port for this protocol, some existing
>>> implementations
>>> also use port 443. The Stream Prefix provides some mitigation against
>>> cross-protocol
>>> attacks in this case, however, the use of port 443 is NOT RECOMMENDED"
>>>
>>> We could do something similar for port 80.
>>>
>>> Would that work?
>>
>> This already is good but I think it's not enough. As Tero noted the working
>> group thought that they rather specify a generic scheme which I find
>> problematic. Currently the drafts says:
>>
>> "This document leaves the selection of TCP ports up to
>>     implementations.  It is suggested to use TCP port 4500, which is
>>     allocated for IPsec NAT Traversal."
>>
>> Which sounds to me like an invitation to squat on any open port regardless
>> what the port is supposed to be used for (hoping that the magic number would
>> avoid any collision). I don't think that a good thing to right in an RFC.
>
> Note, that configurations can only use ports which are defined to be
> used by the responder. I.e., if the responder is configured to listen
> port 4500 and port 443 (with TLS wrapping), there is no point of
> initiator to try port 80, as it will not work.

I understood this. My point breaks down to a) the case where you would use 
two services at the same time on the same port (see below) and b) some 
language changes that do favor to use 4500 where possible and not explicitly 
advise to use other assigned specific ports in the line of what Ekr already 
proposed.

>
> I.e., in practice this will end up the operators picking suitable
> number of port numbers they will configure their system to respond to,
> and most likely they will try to use services which are not in use
> normally by the responder. I.e., if the responder is running
> web-server, it cannot very easily also use the port 80 (or 443) for
> the IPsec traffic, thus it might pick ports 4500, 8000, 8080 or some
> other random ports which might go through the filters which are
> already blocking all UDP traffic, and at least port 4500 for TCP.

Actually this is another good point. If you have multiple open ports, you can 
give more advise which one to try when and in which order, e.g. always try 
4500 first (first UDP then TCP which the draft I believe already says), then 
others.

>
> So this is same thing we have now in web. I am quite often running web
> servers on random ports just because some places have had filters
> blocking some ports. For example one of my friends company network
> blocked connection to port 8080, but did not block connections to port
> 2020, so my web server was running (also) on that port...
>
> So unless you are saying "TCP/UDP ports on all protocols MUST NOT be
> configurable, and only port numbers reserved for those services are
> allowed" there is nothing we can really do.
>
> (and even if you say that, nothing is going to change, as people are
> so used to getting past stupid firewalls).
>
>> Now given the text you propose above, I actually assume that the text I just
>> cited will be removed but the whole document is written with this assumption
>> and therefore there are a couple more places where wording probably needs to
>> change.
>>
>> I do understand well the problem and that 443 is used in practice. However,
>> to match reality I would rather like to see a document that specifies the
>> approach of encapsulating in TLS/TCP on port 443 that is used today and pure
>> TCP encapsulation for use with port 4500 only. Again i think that's where
>> your proposed text is heading to but I think it needs more changes; in this
>> case it would also make sense to add the TLS part back in the main document
>> for 443 only.
>
> This is what the document tries to say. I.e., for some ports (like
> 443), there might be some other framings (like TLS) in place, and for
> other ports there might not be. As IPsec will require
> pre-configuration this information which ports are used, and what
> framing protocol is used comes from the configuration.
>
>> Further, I have one more question: The document is written in a way that
>> allows the implementation of multiple services on the used port. Is that
>> actually done in reality?
>
> Yes and no. There are some old IKEv1 based proprietary TCP
> encapsulation methods, and I think some of those might actually use
> port 500 and perhaps also port 4500. So vendor implementing those,
> might want to do multiplexing based on whether there is the stream
> prefix in front or not to see whether the old proprietary method is
> used, or the one defined in document is used.

There is a difference of distinguishing other/old version of IKE or trying to 
distinguish IKE from other protocols. The point is for IKE you can define the 
magic number as reserved but you probably don't really want to reserve the 
same bits for all other protocols than you may run in parallel on the port. 
As long as you don't 'officially' make this reservation by updating the 
respective specs of other protocols, you can never be sure that there will 
not be a conflict in future version of these protocols.

>
> Another issue might be that the SGW terminating the TCP 443
> connection, might also support some proprietary TLS VPN implementation
> and differntiating from that is also something I can see that vendors
> might want to do.
>
> So I do not know if anybody is really do it now, but I can see reasons
> why people might want to multiplex the proprietary things they are now
> running on those ports 500/4500/443 with the standard we are defining
> here.

That's fine as long as the multiplexing is between version of IKE only.

>
>> If we could restrict the use of this encapsulation
>> with servers that only are IKE servers (at least for the used port), you
>> would actually not need the magic number anymore. I guess you can still have
>> the magic number if you really want it because that makes it easier to
>> distinguish valid IKE/IPSec traffic from other random traffic that might be
>> send to this port but the other service running on this port (on other
>> servers) does not need to know about the magic number because it is supposed
>> to never see any IKe/IPSec TCP-encapsulated traffic.
>
> If it is operationally possible, and there is no old proprietary
> protocols to be supported, I would assume most implementations would
> not want to bother with the multiplexing different protocols on one
> port.

Then let's just not support this case and let's specify in the draft that you 
cannot run another service on the used port.

>
> I.e., new implementations and new setups will most likely then move
> for example the adminstative interface over https to separate
> IP-address, just to make sure that it is easier to implement and
> operate.
>