Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jan 2018 01:11:21 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        Alan Somers <asomers@freebsd.org>
Cc:        FreeBSD Net <freebsd-net@freebsd.org>, Kristof Provost <kp@freebsd.org>
Subject:   Re: pf: redirect a packet's port but not its address?
Message-ID:  <5A677AC9.10500@grosbein.net>
In-Reply-To: <CAOtMX2jroiz57KyQZUk%2B4aW4=_1m=Qs7wEP=_3pEVL%2BE2jg22A@mail.gmail.com>
References:  <CAOtMX2j80odQ7%2Bt3eiFfyV-B5AU0deeNFU1HLwAf05fL8nJZhA@mail.gmail.com> <a4eef32f-0446-43d7-3291-8034423122f0@yandex.ru> <CAOtMX2jroiz57KyQZUk%2B4aW4=_1m=Qs7wEP=_3pEVL%2BE2jg22A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
23.01.2018 23:17, Alan Somers wrote:

> The man page says that the fwd directive always takes an IP address.  What
> I need is a way to forward the port without changing the IP address.  Is
> that possible in ipfw?

Yes. "ipfw fwd 127.0.0.1,8080 tcp from any to any 80" delivers packets
to local socket listening at port 8080 not touching packet addresses and ports.
And replies are "fixed" so that they are sent from same port (80)
and same address that original incoming packet was sent to.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5A677AC9.10500>