# “最后一个 IP 地址”被前缀“::ffff:”

**URL:** <https://meta.discourse.org/t/last-ip-address-being-prefixed-by/87259>\
**Category:** Support\
**Created:** [2018年五月11日 13:03 UTC](https://meta.discourse.org/t/last-ip-address-being-prefixed-by/87259 "2018-05-11T13:03:51Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)\
**Post date:** [2018年五月11日 13:03 UTC](https://meta.discourse.org/t/last-ip-address-being-prefixed-by/87259/1 "2018-05-11T13:03:51Z")

</div>

This appears to have started recently - if you go to a user’s profile \> admin - their last IP address is shown as prefixed with `::ffff:` (and so when you do an ip lookup it does not work).

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2018年五月11日 14:11 UTC](https://meta.discourse.org/t/last-ip-address-being-prefixed-by/87259/4 "2018-05-11T14:11:27Z")

</div>

No repro here on meta.

---

<div class="post-metadata">

**Author:** ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)\
**Post date:** [2018年五月11日 14:45 UTC](https://meta.discourse.org/t/last-ip-address-being-prefixed-by/87259/5 "2018-05-11T14:45:34Z")

</div>

Could this be related:

> <https://stackoverflow.com/questions/29411551/express-js-req-ip-is-returning-ffff127-0-0-1>

> [@](#):
>
> `::ffff:` is a subnet prefix for IPv4 (32 bit) addresses that are placed inside an IPv6 (128 bit) space. IPv6 is broken into two parts, the subnet prefix, and the interface suffix. Each one is 64 bits long, or, 4 groups of 4 hexadecimal characters.

I did add a record to allow IPv6 recently, so could that be it? Do you have IPv6 enabled here?

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2018年五月11日 19:19 UTC](https://meta.discourse.org/t/last-ip-address-being-prefixed-by/87259/6 "2018-05-11T19:19:22Z")

</div>

> [@AstonJ](#):
>
> Do you have IPv6 enabled here?

This (meta) is running on AWS as a dogfooding experiment, so it is possible it is not, because as I understand it AWS doesn’t use ipv6 at all.. but we’d need to ask @mpalmer

---

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [2018年五月11日 20:39 UTC](https://meta.discourse.org/t/last-ip-address-being-prefixed-by/87259/7 "2018-05-11T20:39:58Z")

</div>

Meta is now fully IPv6 compatible.

---

<div class="post-metadata">

**Author:** ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)\
**Post date:** [2018年五月12日 00:00 UTC](https://meta.discourse.org/t/last-ip-address-being-prefixed-by/87259/8 "2018-05-12T00:00:12Z")

</div>

Nice! Were you getting the ::ffff: problem too?

---

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [2018年五月12日 00:09 UTC](https://meta.discourse.org/t/last-ip-address-being-prefixed-by/87259/9 "2018-05-12T00:09:02Z")

</div>

It looks just fine for me:

![image](https://global.discourse-cdn.com/meta/optimized/3X/4/0/4097cbb853b9fee5a0780bfce667d1d4fa6abbc3_2_689x56.png)

I bet a beer you use a reverse proxy and not vanilla Discourse with only the internal nginx 🍻

---

<div class="post-metadata">

**Author:** ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)\
**Post date:** [2018年五月29日 16:07 UTC](https://meta.discourse.org/t/last-ip-address-being-prefixed-by/87259/10 "2018-05-29T16:07:19Z")

</div>

Sorry only just coming back to this. Yes I use HAProxy on the front 🙂

Do I need to do anything special on the Discourse side to enable IPV6?

On the HAProxy side I believe I have changed everything I need to, specifically:

`bind *:80`  
to  
`bind :::80 v4v6`

and

`bind *:443 ssl crt /etc/haproxy/certs/`  
to  
`bind :::443 v4v6 ssl crt /etc/haproxy/certs/`

On [http://ready.chair6.net](http://ready.chair6.net) everything passes except for:

> IPv6 Connectivity - FAIL - Could not connect (to site) on port 443 over IPv6.

Any idea what I might be missing?

---

<div class="post-metadata">

**Author:** ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)\
**Post date:** [2018年五月29日 16:21 UTC](https://meta.discourse.org/t/last-ip-address-being-prefixed-by/87259/11 "2018-05-29T16:21:01Z")

</div>

Try instead using two lines as follows:

```plaintext
bind *:80
bind :::80 

bind *:443 ssl crt /etc/haproxy/certs/
bind :::443 ssl crt /etc/haproxy/certs/

```

---

<div class="post-metadata">

**Author:** ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)\
**Post date:** [2018年五月29日 17:06 UTC](https://meta.discourse.org/t/last-ip-address-being-prefixed-by/87259/12 "2018-05-29T17:06:34Z")

</div>

Hi Michael, updated to:

```plaintext
  #bind *:80
  #bind :::80 v4v6
  #bind *:443 ssl crt /etc/haproxy/certs/
  #bind :::443 v4v6 ssl crt /etc/haproxy/certs/
  bind *:80
  bind :::80 
  bind *:443 ssl crt /etc/haproxy/certs/
  bind :::443 ssl crt /etc/haproxy/certs/

```

But I’m still getting the same thing. [Here’s the full report](http://ready.chair6.net/?url=https%3A%2F%2Felixirforum.com) in case it helps.

---

<div class="post-metadata">

**Author:** ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)\
**Post date:** [2018年五月29日 17:08 UTC](https://meta.discourse.org/t/last-ip-address-being-prefixed-by/87259/13 "2018-05-29T17:08:05Z")

</div>

`fe80::6e62:6dff:fe46:abf9` is a link-local address, only intended to be used by a machine on the same broadcast domain as the server. Nothing else on the Internet will ever be able to connect to it.

Does the server have a “real” IPv6 address (such as something starting with a `2`)?

---

<div class="post-metadata">

**Author:** ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)\
**Post date:** [2018年五月29日 17:31 UTC](https://meta.discourse.org/t/last-ip-address-being-prefixed-by/87259/14 "2018-05-29T17:31:40Z")

</div>

太棒了，已修复！（我需要将服务器从 `IPv6 发现` 改为 `静态配置`，并手动添加范围。）

感谢您的帮助 ❤

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2020年十一月25日 03:33 UTC](https://meta.discourse.org/t/last-ip-address-being-prefixed-by/87259/15 "2020-11-25T03:33:37Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2020年十二月25日 03:36 UTC](https://meta.discourse.org/t/last-ip-address-being-prefixed-by/87259/16 "2020-12-25T03:36:20Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
