pf: redirect a packet's port but not its address?
Eugene Grosbein
eugen at grosbein.net
Tue Jan 23 18:11:40 UTC 2018
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.
More information about the freebsd-net
mailing list