Networking – Forcing *BSD to accept both IPv4 and IPv6 traffic on a single socket

bsdfreenasipv6networkingplex

I have tried a ton of stuff and keep coming up entirely empty handed.

Allow me to frame the situation:

I have a *BSD Jail setup in FreeNAS that runs a Plex Media Server (Plexpass). It has IPv6 access and is configured to use it. Plex is currently built to use a single socket (which is well within standards as there is a RFC that supports this behavior). I know BSD, due to security concerns, disallows listening to both protocols on a singular socket so any application not explicitly programmed to use different sockets for IPv4 and IPv6 will be unable to communicate on which ever protocol the socket is not binded to.

I can access the management page using a literal IPv6 address in my web browser. MyPlex can not access the server for remote access (MyPlex currently only supports IPv4).

Additional Info:

root@plexmediaserver_plexpass:/ # netstat -a | grep 32400
tcp6 0 0 *.32400 . LISTEN

I have tried the following:

  • Setting ipv6_ipv4mapping="YES" in rc.conf
  • Setting sysctl net.inet6.ip6.v6only=0
  • Using socat to proxy TCP4 on port to 32400 to TCP6 on address [::1]:32400
  • Using socat to proxy TCP4 on port to 32400 to TCP6 on address [Public-IPv6-Address]:32400
  • A mixture of the above

I am at an absolute loss. I know this is a major issue for a ton of people in Europe because ISPs have begun switching to IPv6 en-mass. It's infinitely frustrating to me, though not nearly as dire as it is to them. I was unable to find any information on the status of getting a permanent fix in Plex for the issue. The best fix, so far as I can tell, would be to bind on multiple ports and for MyPlex to pull them both and make a decision of which protocol to use based on whether it can get any traffic through or not. This is an issue for their forums though.

My question here is whether there are any other ways to force *BSD to adhere to the RFC standard regarding IPv6 sockets or if they have entirely dropped support for it.

Appreciate any help I can get.

Best Answer

maybe this helps:

ipv6_ipv4mapping="YES"

but i dont know if thats what you want src: https://www.freebsd.org/doc/handbook/network-ipv6.html

Related Question