# Discourse binding to IPv6...but not IPv4

**URL:** https://meta.discourse.org/t/discourse-binding-to-ipv6-but-not-ipv4/56821
**Category:** Self-hosting
**Created:** [Fevereiro 2, 2017, 9:38pm UTC](https://meta.discourse.org/t/discourse-binding-to-ipv6-but-not-ipv4/56821 "2017-02-02T21:38:54Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Wes\_Fisher](https://avatars.discourse-cdn.com/v4/letter/w/bbe5ce/32.png) [@Wes\_Fisher](https://meta.discourse.org/u/Wes_Fisher)
#### Post date: [Fevereiro 2, 2017, 9:38pm UTC](https://meta.discourse.org/t/discourse-binding-to-ipv6-but-not-ipv4/56821/1 "2017-02-02T21:38:54Z")

</div>

I successfully installed Discourse on my server, and it’s accessible over ipv6, but not ipv4.

Ideally I’d like it to listen on both 6 and 4. This is what netstat presents.

```
netstat -tunpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1098/sshd
tcp6 0 0 :::80 :::* LISTEN 28176/docker-proxy
tcp6 0 0 :::22 :::* LISTEN 1098/sshd
tcp6 0 0 :::443 :::* LISTEN 28164/docker-proxy
udp 0 0 0.0.0.0:68 0.0.0.0:* 990/dhclient

```

Any help is appreciated.

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [Fevereiro 2, 2017, 10:43pm UTC](https://meta.discourse.org/t/discourse-binding-to-ipv6-but-not-ipv4/56821/2 "2017-02-02T22:43:08Z")

</div>

Have you changed the sysctl `net.ipv6.bindv6only` from it’s default? Because if not, that IPv6 listening socket is also accepting IPv4 connections. Your problem, then, lies elsewhere – likely in firewall settings. Note, also, that by default docker will use iptables to redirect incoming connections, and those `docker-proxy` processes will not actually receive any connections, so it’s the listening sockets inside the container that will be receiving the connections.

---

<div class="post-metadata">

### Author: ![Wes\_Fisher](https://avatars.discourse-cdn.com/v4/letter/w/bbe5ce/32.png) [@Wes\_Fisher](https://meta.discourse.org/u/Wes_Fisher)
#### Post date: [Fevereiro 2, 2017, 11:24pm UTC](https://meta.discourse.org/t/discourse-binding-to-ipv6-but-not-ipv4/56821/3 "2017-02-02T23:24:05Z")

</div>

Ah kay. That makes sense now. I ended up getting it working with that knowledge. Thanks!

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [Fevereiro 3, 2017, 12:07am UTC](https://meta.discourse.org/t/discourse-binding-to-ipv6-but-not-ipv4/56821/4 "2017-02-03T00:07:06Z")

</div>

Would you care to share your findings, in case someone has a similar problem in the future and stumbles across this topic?

---

<div class="post-metadata">

### Author: ![Wes\_Fisher](https://avatars.discourse-cdn.com/v4/letter/w/bbe5ce/32.png) [@Wes\_Fisher](https://meta.discourse.org/u/Wes_Fisher)
#### Post date: [Fevereiro 3, 2017, 1:20am UTC](https://meta.discourse.org/t/discourse-binding-to-ipv6-but-not-ipv4/56821/5 "2017-02-03T01:20:00Z")

</div>

I just setup DNS for it. Apparently Discourse acts as a Virtual Host (like Apache). Once I setup DNS, it all worked smoothly over 4 and 6.

---

<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: [Abril 28, 2019, 10:30am UTC](https://meta.discourse.org/t/discourse-binding-to-ipv6-but-not-ipv4/56821/6 "2019-04-28T10:30:12Z")

</div>



---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [Abril 29, 2019, 1:23pm UTC](https://meta.discourse.org/t/discourse-binding-to-ipv6-but-not-ipv4/56821/7 "2019-04-29T13:23:55Z")

</div>


