From owner-freebsd-net Thu Nov 21 11: 3: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 1CCD437B404 for ; Thu, 21 Nov 2002 11:03:49 -0800 (PST) Received: from tokyo.ccrle.nec.de (tokyo.ccrle.nec.de [195.37.70.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9596543E88 for ; Thu, 21 Nov 2002 11:03:42 -0800 (PST) (envelope-from Martin.Stiemerling@ccrle.nec.de) Received: from ftp.ccrle.nec.de (ftp.ccrle.nec.de [195.37.70.21]) by tokyo.ccrle.nec.de (8.11.6/8.11.6) with ESMTP id gALJ3SY46134; Thu, 21 Nov 2002 20:03:29 +0100 (CET) (envelope-from Martin.Stiemerling@ccrle.nec.de) Received: from ccrle.nec.de ([204.42.66.68]) (authenticated bits=0) by ftp.ccrle.nec.de (8.12.6/8.12.3) with ESMTP id gALJ3Ukh045956; Thu, 21 Nov 2002 19:03:31 GMT (envelope-from Martin.Stiemerling@ccrle.nec.de) Message-ID: <3DDD2DF6.90005@ccrle.nec.de> Date: Thu, 21 Nov 2002 20:03:18 +0100 From: Martin Stiemerling Organization: NEC User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0rc3) Gecko/20020619 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Scot Loach Cc: "'freebsd-net@freebsd.org'" Subject: Re: Using ipfw to forward udp References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 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