Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Nov 2012 14:13:15 -0500
From:      =?windows-1252?Q?Nejc_=8Akoberne?= <nejc@skoberne.net>
To:        freebsd-ipfw@freebsd.org
Subject:   Source port translation only
Message-ID:  <50980FCB.9060905@skoberne.net>

next in thread | raw e-mail | index | archive | help
Hi,

I want to do (stateful) source port translation (restriction actually) 
on my gateway device, but no source address translation. And I want to 
do it for IPv6.

So if there is a TCP packet like this:

SRC ADDR: 2001:db8::10
DST ADDR: 2001:c0de:
SRC PORT: 53523
DST PORT: 80

I want to translate it so that the source port falls into a specific 
port range, say [1024:2047]:

SRC ADDR: 2001:db8::10
DST ADDR: 2001:c0de:
SRC PORT: 1500
DST PORT: 80

If the source port is already in the requested port range, no 
translation is needed (but the state has to be kept anyway).

Is this possible to do with ipfw? If not, does anybody know for any 
other (simple) way to do it?

Thanks,
Nejc



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50980FCB.9060905>