From owner-freebsd-stable@freebsd.org Mon May 15 20:29:14 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DC22D6E16B for ; Mon, 15 May 2017 20:29:14 +0000 (UTC) (envelope-from mil@milshop.ru) Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A3A3E32 for ; Mon, 15 May 2017 20:29:14 +0000 (UTC) (envelope-from mil@milshop.ru) Received: by mail-wm0-x22c.google.com with SMTP id v15so61825504wmv.1 for ; Mon, 15 May 2017 13:29:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=milshop-ru.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:from:date:message-id:subject:to; bh=FLjbDiUOu+Ih3zcRMRuoMwBK+zOq9Ry1uAXiRKbOg5o=; b=nnUSPQf1Hi6uovFoeotcWbgQbDxpnZ/7ddXaADa2V0e58jxLDBeiw8wsMZ6aZ5wSFa /4OQHz1e89DmWmie/9+m+xHHqpuS6SgAAiTYv+KcYucx4kUgguljsTjZiD3qddiBxU25 1k0h9X7690g1DrBHyj3daobCn0WCwRPCW/MvEsq2RBSvI/kVohmDdL2nDchg85V5ul96 eCpTW95gByo16o/hWooDVW8sQAShmJ2/to88J6emhL5xTUBWeV5wLugvQ7Xtsz60qB/h WMIQd7MHT9+OMr5Czx7bogumH89Yn9fq1UIOHAutf3xxrIp0bW4GYwdjvkF3MSNypMe+ rVWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=FLjbDiUOu+Ih3zcRMRuoMwBK+zOq9Ry1uAXiRKbOg5o=; b=p8x3/4HqezV4Lr2RV5qJz5mDFWyR8JXb7jOngI/LzZBWrsI8sb/7ARC+ZkTTpQGNUP VZz9DR6e5UEbGcRkcluuoXnFFP36WsAn+kNbdJ32y3xDF+o6geYQrr2d16ZjQBSbYkLi g6dfWPM/F9PJwBvfdATjhRX37GJ6R4IDqwB5mQdIzvriwCUk/Z41goKd0K4kNbfiOO7S /kGmXCbAZisiJY8jnET93XdoD/hWVifg8Xz4igtGv0Y+GJlhJ2EA5WTo2RNYCHNcedJG kOlTdv//fKCAGPc/iimxUzmNcZdeNfTf21wkGTZlyeNdwgAsht+M3k1o3hnTCST75oRs RRQg== X-Gm-Message-State: AODbwcC1LsXia2t90iTseQtLI6amevKsftZlKXWN4NMC24rBWY+AAai7 5oW+Io6QehB9q9nSADunWLxgOzC0fHpz X-Received: by 10.25.15.30 with SMTP id e30mr2352014lfi.10.1494880152357; Mon, 15 May 2017 13:29:12 -0700 (PDT) MIME-Version: 1.0 Sender: mil@milshop.ru Received: by 10.25.22.42 with HTTP; Mon, 15 May 2017 13:28:51 -0700 (PDT) From: Eugene Kazarinov Date: Mon, 15 May 2017 23:28:51 +0300 X-Google-Sender-Auth: so8iRptVnneaRyd_3fyg-jaVxZw Message-ID: Subject: something is not working: ipfw fwd VIA nat TO tun on FreeBSD-11 stable r318266 To: FreeBSD Stable Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 20:29:14 -0000 Hello. After upgrade from 10.3 stable something broke. I have tun0 tun0: flags=8151 metric 0 mtu 1500 options=80000 inet 10.10.0.6 --> 10.10.0.5 netmask 0xffffffff groups: tun Opened by PID 1111 in pf.conf I have rule nat on tun0 inet from 192.168.10.0/24 to any -> 10.10.0.6 ipfw forwarding rule: ipfw 1500 fwd 10.10.0.5 ip from 192.168.10.0/24 to any via em0 ipfw sh counts 01500 1609 102098 fwd 10.10.0.5 ip from 192.168.10.0/24 to any via em0 So packets from network 192.168.10.0/24 forward to tun0 and I see it there BUT Why I see they not mapped?!: # tcpdump -ni tun0 23:02:15.207682 IP 192.168.10.2 > 8.8.8.8: ICMP echo request, id 1, seq 2253, length 40 On another side of tun0 there is no packets. If I ping 10.10.0.1 then I see right packets on both sided of tun0 (so tun0 is up and working) 23:03:15.989577 IP 10.10.0.6 > 10.10.0.1: ICMP echo request, id 25095, seq 0, length 64 23:03:15.992260 IP 10.10.0.1 > 10.10.0.6: ICMP echo reply, id 25095, seq 0, length 64 Why pf doesnt map packets which are forwarded via ipfw? BTW I'd try ipnat.rules map tun0 from 192.168.10.0/24 to any -> 10.10.0.6/32 but ipnat doesnt map forwarded packets too. Why? How to fix it?!