# Does "set\_real\_ip\_from" support IPv4 only?

**URL:** <https://www.ruby-forum.com/t/does-set-real-ip-from-support-ipv4-only/212570>\
**Category:** NGINX\
**Created:** [October 6, 2011, 5:53pm UTC](https://www.ruby-forum.com/t/does-set-real-ip-from-support-ipv4-only/212570 "2011-10-06T17:53:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [October 6, 2011, 5:53pm UTC](https://www.ruby-forum.com/t/does-set-real-ip-from-support-ipv4-only/212570/1 "2011-10-06T17:53:07Z")

</div>

Hi,

I’m confused, I get this error by entering an IPv6 address in the  
set\_real\_ip\_from directive:

nginx: [emerg] “set\_real\_ip\_from” supports IPv4 only in  
/usr/local/nginx/conf/nginx.conf:65

But according to the changelog, that directive should support IPv6 since  
nginx 0.8.22:

Changes with nginx 0.8.22 03 Nov  
2009  
[…]  
\*) Feature: the “set\_real\_ip\_from” directive supports IPv6 addresses  
in  
request headers.  
[…]

My nginx version: 1.0.8

Is the changelog referring to something else or is this a bug?

Thank you,  
Andrea

Posted at Nginx Forum:

> **[Does "set\_real\_ip\_from" support IPv4 only?](https://forum.nginx.org/read.php?2,216320,216320#msg-216320)**
>
> Hi, I'm confused, I get this error by entering an IPv6 address in the set\_real\_ip\_from directive: nginx: \[emerg\] "set\_real\_ip\_from" supports IPv4 only in /usr/local/nginx/conf/nginx.conf:65 But according to the changelog, that directive...

---

<div class="post-metadata">

**Author:** ![Usu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/85f322/32.png) [@Usu](https://www.ruby-forum.com/u/Usu)\
**Post date:** [October 6, 2011, 6:06pm UTC](https://www.ruby-forum.com/t/does-set-real-ip-from-support-ipv4-only/212570/2 "2011-10-06T18:06:05Z")

</div>

Hello!

On Thu, Oct 06, 2011 at 11:52:46AM -0400, Usu wrote:

> Is the changelog referring to something else or is this a bug?  
> It supports ipv6 in _request headers_ (that is, it will accept  
> ipv6 in X-Real-IP/X-Forwarded-For headers), while you are trying to use  
> ipv6 in set\_real\_ip\_from directive. This is not (yet) supported.

Maxim D.

---

<div class="post-metadata">

**Author:** ![Usu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/85f322/32.png) [@Usu](https://www.ruby-forum.com/u/Usu)\
**Post date:** [October 6, 2011, 6:14pm UTC](https://www.ruby-forum.com/t/does-set-real-ip-from-support-ipv4-only/212570/3 "2011-10-06T18:14:09Z")

</div>

I figured that might be the problem but I wasn’t sure.

Thank you for the quick reply!

Posted at Nginx Forum:

> **[Re: Does "set\_real\_ip\_from" support IPv4 only?](https://forum.nginx.org/read.php?2,216320,216322#msg-216322)**
>
> Hi, I'm confused, I get this error by entering an IPv6 address in the set\_real\_ip\_from directive: nginx: \[emerg\] "set\_real\_ip\_from" supports IPv4 only in /usr/local/nginx/conf/nginx.conf:65 But according to the changelog, that directive...
