# Re: preserve client source address when proxying to upstream

**URL:** <https://www.ruby-forum.com/t/re-preserve-client-source-address-when-proxying-to-upstream/243668>\
**Category:** NGINX\
**Created:** [December 17, 2015, 1:28pm UTC](https://www.ruby-forum.com/t/re-preserve-client-source-address-when-proxying-to-upstream/243668 "2015-12-17T13:28:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [December 17, 2015, 1:28pm UTC](https://www.ruby-forum.com/t/re-preserve-client-source-address-when-proxying-to-upstream/243668/1 "2015-12-17T13:28:58Z")

</div>

Thanks for pointing me in the right direction, Maxim!

I’ve found a number of posts where people are discussing nginx acting as  
listener at 0.0.0.0:80/0 for outbound traffic, making able the system to  
review every outgoing packet. In this way nginx can act as transparent  
proxy that do not perform destination address translation.

What I’m asking for is a special handling for inbound packets. I still  
want  
nginx to perform destination address translation, but I need to keep  
original source address in the packet.

As far as I understood, both scenarios relies on using  
IP\_TRANSPARENT/IP\_FREEBIND  
on Linux as you mentioned previously.  
While there’s no complete solution at the moment, I think that it’s  
great  
idea to add such functions in the future, at least in commercial version  
of  
nginx. From the other side, positioning nginx as ADC solution requires  
to  
give administrators more control over applications delivery and  
translating  
source/destination addresses/ports are just necessary options.

–  
Vsevolod Petrov

2015-12-16 19:56 GMT+03:00 Maxim D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
