Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Aug 2025 11:49:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 288606] netgraph ng_nat: add command to set port range
Message-ID:  <bug-288606-227-lIGUuUPUXq@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-288606-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288606

--- Comment #1 from Tatsuki Makino <tatsuki_makino@hotmail.com> ---
Created attachment 262634
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=262634&action=edit
experimental patch for sys/netgraph/ng_nat.*

This is a patch to limit the range of ports transrated by libalias.
It is created in a state that can be applied to a 14.3-STABLE source.
I replaced part of the example of ng_nat(4) as shown below and it seems to be
working correctly.

kldload ng_ipfw
ngctl mkpeer ipfw: nat 60 out
ngctl name ipfw:60 nat
ngctl connect ipfw: nat: 61 in
ngctl msg nat: setaliasaddr 192.0.2.2
ngctl msg nat: setmode "{flags=0x00 mask=0x04}"
ngctl msg nat: portrange "{alias_port_lo=49152 alias_port_hi=65535}"

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-288606-227-lIGUuUPUXq>