On Mon, 17 Sep 2018, at 16:04, Andrea Brancatelli wrote:
> Hello,
>
> I'm trying to have CouchDB bind Both to IPv6 and IPv4 but I don't seem
> to able to do it properly.
>
> I google ad bit and found the magic "any" keyword to be used in
> bind_address (the documentation just report ::1 to enable ipv6 or
> 0.0.0.0 to enable ipv4 but not the combination of both), yet even with
> "any" I only get a IPv4 Binding.
>
> I'm on FreeBSD and still on Couch 1.7.2.
>
> Anyone has any hint on this?
>
> Thanks

Sadly its a linuxism**. It's called dual-stack mode, Linux lets you 
enable/disable it through the net.ipv6.bindv6only sysctl but BSDs don’t support 
this, at least from my understanding.

The easiest thing is to use nginx, haproxy or similar or even pf to relay ip6 
traffic to/from the 2 stacks.  You'll likely only need a single rule or bind 
statement for this anyway.

I prefer the simplicity of using a proxy server to enable this, but you could 
try this out:
 
/etc/rc.conf: ipv6_ipv4mapping="YES"

then binding couch to IPv6 ::1, and rebooting and seeing what happens. I don't 
have IPv6 at home so I can't check this without risking an inaccessible server. 
If I'm right, the IPv6 only couchdb would "see" all IPv4 addresses presented as 
IPv6 mapped ones.

A+
Dave

** also found on Windows and elsewhere... 






Reply via email to