Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jul 2002 19:43:31 +0000
From:      Philip Reynolds <>
Subject:   Re: divert a port to another ip
Message-ID:  <>
In-Reply-To: <>; from on Mon, Jul 29, 2002 at 05:57:46PM +0100
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Hi Mike,

Mike Dewhirst <> 25 lines of wisdom included:
> Hi,
> If I want to divert all requests on a certain port to another ip address 
> and another port, e.g.
> -->
> what would be the rule? I thought:
> divert 8668 tcp from any 666 to 22 via xl0

Divert 8668 is using NAT (Network Address Translation). Do you
actually want to forward all requests to another IP and port or do
you want to do NAT?

If you're looking to blindly forward, look at the ``fwd'' part of
ipfw(8) (man 8 ipfw)

For this, on 4.6-RELEASE anyways, it expects that

options         IPFIREWALL_FORWARD

is in your kernel. If it's not you're going to have to do a kernel

> 8668 is the natd port (I think) - I have this rule that works:
> divert 8668 ip from any to any via xl1
> But it doesn't seem to work. Any ideas?
> Also, what is a good online resource for ipfw?

Philip Reynolds                  | Technical Director  | RFC Networks Ltd.       | +353 (0)1 8832063

To Unsubscribe: send mail to
with "unsubscribe freebsd-ipfw" in the body of the message

Want to link to this message? Use this URL: <>