From owner-freebsd-net@FreeBSD.ORG Fri Oct 31 15:00:08 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B8C6290; Fri, 31 Oct 2014 15:00:08 +0000 (UTC) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2F2AC7C; Fri, 31 Oct 2014 15:00:07 +0000 (UTC) Received: by mail-wi0-f174.google.com with SMTP id d1so1547500wiv.13 for ; Fri, 31 Oct 2014 08:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=uIIToQVcpHPef5EqxjORTnSL0Lld81a2rvfpfCHlmSc=; b=mVuvGFO7Xansbxkf2/mn/FfgCxXg4BAeQFM3qDJuyPaYkvT77p2tUkIpNk6nJTOP60 ahUmVDHjT/lrMm/wrOOXJofqOnXTxRTgA6hdmb1mZyx1RmvSdWKXXviYND91NAhxOOxv z1sXn4AYY5YOljU0kipPlCI+C0/v7/EpBXKKKbxP2/Ow3YXk52K5VCSq7HWZUAxjKnth AoMVq0MiVYIlTsKtDb9aDEdKuOXLNRolTGonVJEo/RlCSRmHY4DoIPlaT33CqIwlUztq ligG4ohhC7hoybHY4qvuLzSvDenubNuj3RzLiHC7fKI1tKBHn50lX1J+MsnwNce/7yKT 3NCQ== X-Received: by 10.180.73.7 with SMTP id h7mr4384154wiv.83.1414767605823; Fri, 31 Oct 2014 08:00:05 -0700 (PDT) Received: from [192.168.2.30] ([2.176.150.113]) by mx.google.com with ESMTPSA id s10sm6856251wix.14.2014.10.31.08.00.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 08:00:05 -0700 (PDT) Message-ID: <5453A3F0.7010706@gmail.com> Date: Fri, 31 Oct 2014 18:30:00 +0330 From: Hooman Fazaeli User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: Mark Felder Subject: Re: transparent udp proxy References: <54535B82.405@gmail.com> <1414764053.1422501.185543329.39B66970@webmail.messagingengine.com> In-Reply-To: <1414764053.1422501.185543329.39B66970@webmail.messagingengine.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2014 15:00:08 -0000 On 10/31/2014 5:30 PM, Mark Felder wrote: > I'm not sure if this is what you're looking for, but perhaps the > solution is in net/samplicator ? > > From the project's website: > > This simple program listens for UDP datagrams on a network port, and > sends copies of these datagrams on to a set of destinations. Optionally, > it can perform sampling, i.e. rather than forwarding every packet, > forward only 1 in N. Another option is that it can "spoof" the IP source > address, so that the copies appear to come from the original source, > rather than the relay. Currently only supports IPv4. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" Thanks. I do not thinks it provides what I am looking for. I am not looking for an application performing a specific task, but a mechanism to get the __original__ destination address and port of packets forwarded to a local UDP proxy by ipfw fwd rules. As I figured it out until now, The original destination address may be obtained by IP_RECVDSTADDR on 9.0+ (but not on 8.x and older versions) but there seems to be no mechanism get the _original_ destination _port_ (Apart from this missing mechanism, my proxy is functional and performs what it is intended to do). -- Best regards. Hooman Fazaeli