Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Oct 2014 13:48:41 +0300
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        Hooman Fazaeli <hoomanfazaeli@gmail.com>,  "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   Re: transparent udp proxy
Message-ID:  <54536909.3030507@yandex.ru>
In-Reply-To: <54535B82.405@gmail.com>
References:  <54535B82.405@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 31.10.2014 12:50, Hooman Fazaeli wrote:
> Hi,
> 
> I my setup, I use a fwd rule to forward all udp traffic to my local proxy:
> 
> ipfw add 10 fwd localhost,7000 udp from any to any recv em1
> 
> The proxy needs to know the original destination address of forwarded
> datagrams, but
> there seems to be no way to obtain that address.
> 
> Using recvmsg with IP_RECVDSTADDR does not help because it returns
> next-hop address
> instead of original destination. This is because udp_input() overwrites
> packet's destination
> with next-hop address before doing ip_savecontrol.

Hi,

udp_input() doesn't overwrite destination address. Probably you have NAT
that does this.

-- 
WBR, Andrey V. Elsukov



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54536909.3030507>