IPFW redirect to another port?

Doug McIntyre merlyn at geeks.org
Wed Jun 19 18:43:49 UTC 2019

On Tue, Jun 18, 2019 at 12:50:27PM -0400, John Levine wrote:
> I would like to use ipfw to redirect incoming port 53 requests from a
> few IP addresses to a different port, so I can use a custom DNS server
> to answer them.  I can figure out how to redirect their traffic to,
> say, port 5553, but the responses come from 5553 which of course
> doesn't work.
> Any suggestions about how to adjust the port numbers going both ways?  It's
> fine if they screw up other traffic to those IPs.  TIA.

I would approach this differently.

I'd install dns/dnsdist to listen on port 53, and then with backends out
to your custom DNS server on port 5553.

More information about the freebsd-questions mailing list