From nobody Mon Aug 04 10:58:36 2025 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bwYSs1kcpz63v09 for ; Mon, 04 Aug 2025 10:58:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bwYSs0qltz3C4y for ; Mon, 04 Aug 2025 10:58:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754305117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=agFeHz+GxkP24ILRX/nBR8kfZPSTZ6bOeoZngdo8zXE=; b=WRqDUe4bLIfpYD5aG4W2l8bp01qhTtPVMtpp+LmhWHnTCV7Oo+U9uzBRJkoAtE+M+qU/3d X5xUNLRBEythxkLz4/Ni9rvhJXbFZ7g6+BKXJwWs7abvST+Mq2a5sK0MChL6rHDl3q+Srb DXebm858feH6vEXxzR7da89p+saa2I0OgM0P5GrdlN1M0a8O6akCEBRosJxehmQm3QAswa YCj+tSHO+HylsSRd0VZT7LQSDmrXscRojUnYIyXOPbEaRQ+Lp5YV8kvzmLzaOsioI5mvnt eQn5vDjILaYIon6jKaP9jiymdR+6Zn9hVBuFDRMJ25iOT0IT0qHep6xkCrNQvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754305117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=agFeHz+GxkP24ILRX/nBR8kfZPSTZ6bOeoZngdo8zXE=; b=M4ltmMZ/nxSYKr7pWGLYZRHm3hYlvw/omOX66oDsEc8/HAaz6d0rGw2eMTbW24PR7nwdrz N8SWNscOT07K+vwnV3s9ZYX53IaAzuDbsrAbaB7hpQQfVNIgsPKnQy9w2ihLFuw1mOWy5c N9QT8xyOcX3sPP2yTrDkcEVNrPkP0SB0bDnEJMevDojzeTytcVLMbTkM39bxI7TzTJBSPJ quZ4DneL0TUaaCwrWvKjzIlVxqgiz9PkL/YRonjCnSOEJRTIsRbd94z0Q4hZz7PTi5FapD AjT7+Z6Rvj02N4Ez9T8zgVmhNc2QwCO3dVpQDrnCa/zHVCjB5i9rAsUV80dhDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754305117; a=rsa-sha256; cv=none; b=m828V8b0XMKgqNmPmaM87Hv75b13fhTEEj6E9k99h9HkuxDJky8XQE81KJeHUyLc3dzxP6 PjgE85zNL5Rq0EFSrTTj7KTMXjh4XbFQAtEN4PNFwHAEkW6ErFwdnKRY5V062BwuZNkgdr Qxdlx0n8afZzhErusKURKH9/hy6a3ssBDcLVmJpFNzBNjz7Jj+KPrkt0Ntsphg55H6zzLk M8lOBUYewhX7dun9SEZ6TFcSHzCJ2+oYdfQQeAn0xlUYEEwBcOHAK5vKGN+eOZxMdZLK5D 7Z3PKnxDmV/4YWyUieP29jI6jYpBzVfndnTEE/HD4eJg2NnKh7J8fhQh4lYD0Q== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bwYSr75WXzmXN for ; Mon, 04 Aug 2025 10:58:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 574AwaRb006715 for ; Mon, 4 Aug 2025 10:58:36 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 574Awarg006714 for bugs@FreeBSD.org; Mon, 4 Aug 2025 10:58:36 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 288654] netgraph ng_nat: add command to set port range mask Date: Mon, 04 Aug 2025 10:58:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: tatsuki_makino@hotmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D288654 Bug ID: 288654 Summary: netgraph ng_nat: add command to set port range mask Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: tatsuki_makino@hotmail.com Created attachment 262698 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D262698&action= =3Dedit experimental patch for operation confirmation To make this patch work, the libalias patch in attachment 262482 of bug 288= 380 is required. In order to unleash the performance of this patch, the portrange patch in attachment 262634 of bug 288606 is required. This patch should still apply correctly even after the application of those patches. Of course, this patch was made for the Mapping of Address and Port with Encapsulation (MAP-E, RFC 7597) :) By setting it up as described below, it should already be in a state where = the desired operation is achieved. In this patch, the syntax for portrangemask is the same as that presented in bug 288380 comment #2. It will be necessary to redefine the specifications and remake it :) (If pf needs to be set to map-e-portset 4/8/20 ...) ifconfig gif0 create ifconfig gif0 inet6 tunnel 2001:db8:1:100:c0:2:100:100 2001:db8:ffff::1 ifconfig ${wan_if} inet6 2001:db8:1:100:c0:2:100:100 prefixlen 128 alias kldload ng_gif ngctl mkpeer gif0: gif_demux lower gif ngctl name gif0:lower gif0_demux ngctl mkpeer gif0_demux: nat inet in ngctl name gif0_demux:inet nat_map_e ngctl msg nat_map_e: setaliasaddr 192.0.2.1 ngctl msg nat_map_e: setmode "{flags=3D0x00 mask=3D0x04}" ngctl msg nat_map_e: portrange "{alias_port_lo=3D4096 alias_port_hi=3D65535= }" ngctl msg nat_map_e: portrangemask \""0xf00f^0x0140"\" ngctl mkpeer nat_map_e: iface out inet ng_if=3D$(ngctl msg nat_map_e:out getifname | sed -ne '/^Args:/{s/^.*"\([^"]*\)".*$/\1/;p;};') # ng_if is an interface name like ng0. ifconfig ${ng_if} inet 192.0.2.1 127.0.2.1 netmask 255.255.255.255 alias route -n add -inet default -iface ${ng_if} These commands can also be automated in the script file /etc/{start,stop}_if.gif0, maybe :) --=20 You are receiving this mail because: You are the assignee for the bug.=