# Nginx and TPROXY

**URL:** <https://www.ruby-forum.com/t/nginx-and-tproxy/220648>\
**Category:** NGINX\
**Created:** [June 15, 2012, 7:56am UTC](https://www.ruby-forum.com/t/nginx-and-tproxy/220648 "2012-06-15T07:56:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [June 15, 2012, 7:56am UTC](https://www.ruby-forum.com/t/nginx-and-tproxy/220648/1 "2012-06-15T07:56:45Z")

</div>

Hi all,  
I just run into the need to have nginx support the Linux TPROXY  
feature: there is not REDIRECT target for IPv6. As there is no support  
for TPROXY in nginx I created a small patch for core & http modules  
against 1.2.1. It’s enabled by recompiling nginx with --with-tproxy  
and activating it by adding “tproxy” as an additional argument to  
listen.

Unfortunately it is not possible to enable/disable tproxy behavior for  
existing sockets during reload, only on startup or when reload adds  
new listening sockets. This is due to fact that the setsockopt() call  
must be done before bind().

Please have a look, so far it works for me but I did not do yet any  
heavy testing and it’s not production yet:)

removed\_email\_address@domain.invalid  
----+
