From owner-freebsd-net@freebsd.org Wed Jun 26 08:20:43 2019 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCC2F15BCE4D for ; Wed, 26 Jun 2019 08:20:43 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from kagate.punkt.de (kagate.punkt.de [217.29.33.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 874F592B21 for ; Wed, 26 Jun 2019 08:20:37 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from hugo10.ka.punkt.de (hugo10.ka.punkt.de [217.29.44.10]) by gate2.intern.punkt.de with ESMTP id x5Q856QO066222; Wed, 26 Jun 2019 10:05:06 +0200 (CEST) Received: from [217.29.44.222] ([217.29.44.222]) by hugo10.ka.punkt.de (8.14.2/8.14.2) with ESMTP id x5Q856Qj065037; Wed, 26 Jun 2019 10:05:06 +0200 (CEST) (envelope-from hausen@punkt.de) From: "Patrick M. Hausen" Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: IPFW NAT64 changed 11.2 --> 11.3? Message-Id: <950200A8-6D36-46FE-B0DD-BA6EA860FEB7@punkt.de> Date: Wed, 26 Jun 2019 10:05:05 +0200 Cc: mops@punkt.de To: FreeBSD Net X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 874F592B21 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of hausen@punkt.de designates 217.29.33.131 as permitted sender) smtp.mailfrom=hausen@punkt.de X-Spamd-Result: default: False [-1.43 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.986,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:217.29.32.0/20]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[punkt.de]; NEURAL_HAM_LONG(-0.98)[-0.983,0]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[mailin.pluspunkthosting.de,mailin.pluspunkthosting.de]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[131.33.29.217.list.dnswl.org : 127.0.10.0]; NEURAL_HAM_SHORT(-0.46)[-0.465,0]; SUBJECT_ENDS_QUESTION(1.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16188, ipnet:217.29.32.0/20, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.19)[ipnet: 217.29.32.0/20(-0.52), asn: 16188(-0.41), country: DE(-0.01)] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jun 2019 08:20:44 -0000 Hi all, we have a bit of a problem with some new servers that use NAT64 to access certain services that offer only legacy IP - like github. As far as I found the respective NAT64 gateways (in jails with VNET) are configured identically except for the particular addresses, of course. Yet, 11.2 works, 11.3-RC1 doesn=E2=80=99t. OK, on to the config =E2=80=A6 Working server: ifconfig inet0 inet0: flags=3D8843 metric 0 mtu = 1500 inet6 2a00:b580:8000:12:xxxx:xxxx:xxxx:xxxx prefixlen 64 netstat -rn 64:ff9b::/96 2a00:b580:8000:12:yyyy:yyyy:yyyy:yyyy = UGS inet0 drill github.map.fastly.net aaaa github.map.fastly.net. 15 IN AAAA 64:ff9b::9765:7085 ping6 github.map.fastly.net=20 16 bytes from 64:ff9b::9765:7085, icmp_seq=3D0 hlim=3D57 time=3D3.801 ms Broken server: ifconfig inet0 inet0: flags=3D8843 metric 0 mtu = 1500 inet6 2a00:b580:8000:12:xxxx:xxxx:xxxx:xxxx prefixlen 64 netstat -rn 64:ff9b::/96 2a00:b580:8000:12:yyyy:yyyy:yyyy:yyyy = UGS inet0 drill github.map.fastly.net aaaa github.map.fastly.net. 15 IN AAAA 64:ff9b::9765:7085 So up to the 4-in-6 DNS translation everything is working as it should, = but then when actual traffic is involved: ping6 github.map.fastly.net 16 bytes from d91d:2891::9765:7085, icmp_seq=3D0 hlim=3D57 time=3D2.324 = ms What the =E2=80=A6 is this IP address here? All I know is that the block = is supposed to be IANA reserved. And TCP connections to github.map.fastly.net of course = stall, never receiving an answer packet. The NAT64 gateways on both servers have these ipfw rules: root@gate64:~ # ipfw list 00100 allow ip from any to any via lo0 00200 deny ip from any to 127.0.0.0/8 00300 deny ip from 127.0.0.0/8 to any 00400 deny ip from any to ::1 00500 deny ip from ::1 to any 01100 allow ipv6-icmp from :: to ff02::/16 01200 allow ipv6-icmp from fe80::/10 to fe80::/10 01300 allow ipv6-icmp from fe80::/10 to ff02::/16 01400 allow ipv6-icmp from any to me6 ip6 icmp6types 1,2,3,4 01500 allow ipv6-icmp from any to any ip6 icmp6types 135,136 02000 allow icmp from any to me icmptypes 8 02100 allow ipv6-icmp from any to me6 ip6 icmp6types 128,129 03000 allow tcp from any to 217.29.40.y 80,443 03100 allow tcp from me6 to any 80,443 05000 nat64lsn NAT64 ip from 2a00:b580::/32 to 64:ff9b::/96 in 05100 nat64lsn NAT64 ip from any to 217.29.40.y in 65535 allow ip from any to any Any hints welcome. Thanks, Patrick --=20 punkt.de GmbH Internet - Dienstleistungen - Beratung Kaiserallee 13a Tel.: 0721 9109-0 Fax: -100 76133 Karlsruhe info@punkt.de http://punkt.de AG Mannheim 108285 Gf: Juergen Egeling