From owner-freebsd-net@FreeBSD.ORG Sun Nov 2 15:40:29 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 690F9FF5; Sun, 2 Nov 2014 15:40:29 +0000 (UTC) Received: from mail-wg0-x233.google.com (mail-wg0-x233.google.com [IPv6:2a00:1450:400c:c00::233]) (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 AD6D4135; Sun, 2 Nov 2014 15:40:28 +0000 (UTC) Received: by mail-wg0-f51.google.com with SMTP id l18so10941856wgh.10 for ; Sun, 02 Nov 2014 07:40:26 -0800 (PST) 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=8UhrR0R38QEt3vpUU+YpwyOEjrtLFA2yHTuMfvki+qI=; b=V180nPMV/82dGkUGJNi1ZlVutBJdjH9FK6NVQM6xc3OZBF/izGEzCO84DZuG3CkZDm x/DS4iYNrgUDU3kXSUnwfDYBgr/T/q1ZS+iVajhiLgj+7+r71+e1tAApDAGfWa+z7rrD k9IRmL6yk+srnOQnfiHq8RTq91dI0mSCIJ7McN4JKvnetN5AEGczKQV9yFR3A3MNUWa6 s4wicErtI+/UObLde+wC0T+5+CSNK5ItoemGHmJX0v7mFoarK1nY2R2aHu26iWGfru+J ElRxZHl0FmuB6vUIbzO/s9PDwWucCxwlSnOGHS1U01PD/4DOFDlmqo8Oj8wgQCEg3qVI OpIw== X-Received: by 10.180.211.2 with SMTP id my2mr10394024wic.13.1414942826180; Sun, 02 Nov 2014 07:40:26 -0800 (PST) Received: from [192.168.2.30] ([2.176.155.176]) by mx.google.com with ESMTPSA id pc8sm18986701wjb.36.2014.11.02.07.40.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 02 Nov 2014 07:40:25 -0800 (PST) Message-ID: <5456506A.9060708@gmail.com> Date: Sun, 02 Nov 2014 19:10:26 +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: Adrian Chadd Subject: Re: transparent udp proxy References: <54535B82.405@gmail.com> <1414764053.1422501.185543329.39B66970@webmail.messagingengine.com> <5453A3F0.7010706@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Net , Mark Felder 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: Sun, 02 Nov 2014 15:40:29 -0000 On 10/31/2014 8:11 PM, Adrian Chadd wrote: > Hi, > > If it's missing in 10 or later then please file a bug and I'll see > what it'll take to add another socket option to return the original > destination address+port. > > Thanks, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194758 > > -adrian > > On 31 October 2014 08:00, Hooman Fazaeli wrote: >> 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 >> >> _______________________________________________ >> 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" -- Best regards. Hooman Fazaeli