From owner-freebsd-net@FreeBSD.ORG Fri Oct 31 16:41: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 A43E7AC8; Fri, 31 Oct 2014 16:41:29 +0000 (UTC) Received: from mail-wg0-x236.google.com (mail-wg0-x236.google.com [IPv6:2a00:1450:400c:c00::236]) (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 199EBB9A; Fri, 31 Oct 2014 16:41:28 +0000 (UTC) Received: by mail-wg0-f54.google.com with SMTP id n12so1545153wgh.13 for ; Fri, 31 Oct 2014 09:41:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=H6qfcETQmbAbpEJPxrTqAP8xxJ8RAOcNMbUdR19YyaU=; b=tGNzszswx4Wk4YOz8P8Y0RxxKIzqAeK7q11tmM4UVQ5DyfA6Lu7O14BYz3IGwgDwJf qLR+NM9iprHdzOQnJA6SRgR0+VyqqIfLsrOyn82Ahwqdj4NH9zEtpuspqjdkB7jW/uV3 1S9oaCyryggw5Jig912ixH6BPHh9scZXntogQJt8auChKMAcQF9KJQd3JW7A5+jixkaR qaj2+Pe2rAuXG+ewtkGmDLHHKgUnlxbXJX07bcn6oof6DT74gm6ONsVlmbK+BLPXxj/c yQ/A6Uk4Hf6KucsM0WwRfkqgWp/IDMuLvYONA+a+dN1JU+dDqW3vE0Y3T1XgXc4YXPPy SN4A== MIME-Version: 1.0 X-Received: by 10.180.106.162 with SMTP id gv2mr4881654wib.26.1414773687410; Fri, 31 Oct 2014 09:41:27 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.106.136 with HTTP; Fri, 31 Oct 2014 09:41:27 -0700 (PDT) In-Reply-To: <5453A3F0.7010706@gmail.com> References: <54535B82.405@gmail.com> <1414764053.1422501.185543329.39B66970@webmail.messagingengine.com> <5453A3F0.7010706@gmail.com> Date: Fri, 31 Oct 2014 09:41:27 -0700 X-Google-Sender-Auth: P6xPrm10uW7CRj4bnZJ5qkhNFUA Message-ID: Subject: Re: transparent udp proxy From: Adrian Chadd To: Hooman Fazaeli Content-Type: text/plain; charset=UTF-8 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: Fri, 31 Oct 2014 16:41:29 -0000 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, -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"