From owner-freebsd-net Thu Nov 21 11: 7:53 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CDDE37B401 for ; Thu, 21 Nov 2002 11:07:51 -0800 (PST) Received: from mail.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id ABC9643E42 for ; Thu, 21 Nov 2002 11:07:50 -0800 (PST) (envelope-from sloach@SANDVINE.com) Received: by mail.sandvine.com with Internet Mail Service (5.5.2653.19) id ; Thu, 21 Nov 2002 14:07:46 -0500 Message-ID: From: Scot Loach To: 'Martin Stiemerling' , Scot Loach Cc: "'freebsd-net@freebsd.org'" Subject: RE: Using ipfw to forward udp Date: Thu, 21 Nov 2002 14:07:45 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org According to the manual text quoted below, in my example the ipaddr is localhost and the port is 9000. So all UDP packets (matching packets) should be forwarded to 9000 (port) on the local machine. What I'm seeing is that no packets are forwarded to port 9000, and I only receive packets that were originally sent with a destination port of 9000. scot. -----Original Message----- From: Martin Stiemerling [mailto:Martin.Stiemerling@ccrle.nec.de] Sent: Thursday, November 21, 2002 2:03 PM To: Scot Loach Cc: 'freebsd-net@freebsd.org' Subject: Re: Using ipfw to forward udp 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 majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message -- Martin Stiemerling NEC Europe Ltd. -- Network Laboratories Stiemerling@ccrle.nec.de IPv4: http://www.ccrle.nec.de IPv6: http://www.ipv6.ccrle.nec.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message