man ipfw says to fwd:
fwd | forward ipaddr[,port]
Change the next-hop on matching packets to ipaddr, which can be
an IP address in dotted quad or a host name. The search termi-
nates if this rule matches.
If ipaddr is a local address, then matching packets will be for-
warded to port (or the port number in the packet if one is not
specified in the rule) on the local machine.
If ipaddr is not a local address, then the port number (if speci-
fied) is ignored, and the packet will be forwarded to the remote
[...]

This is exactly the behaviour you're describing. May be the divert is more appropriate for your needs.

Martin


Scot Loach wrote:
I'm trying to implement a type of transparent proxy for UDP.  My idea was to
use ipfw to redirect all incoming UDP packets to my server, for example:

ipfw add fwd 127.0.0.1,9000 udp from any to any recv em0

However this doesn't seem to work: my server only receives UDP packets that
are addressed to port 9000.

Can anyone suggest what I might be doing wrong?

thanks

scot.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message


--
Martin Stiemerling

NEC Europe Ltd. -- Network Laboratories  [EMAIL PROTECTED]
IPv4: http://www.ccrle.nec.de  IPv6: http://www.ipv6.ccrle.nec.de


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to