Openfire on FreeBSD with IPv6


I’m after completing installation of Openfire (in ports it has 3.7.0 Beta). The problem I had with default setup/settings was that it priritizes IPv6 over IPv4. I dn’t mind of course but thing is that most of boxes are yet on IPv4 only. I have DNS configured to resolve both for the Openfire’s host but noticed problem with Spark, at first, and then any client on non-IPv6 box. Once changed in DNS to resolve IPv4 only it was still not fine since the host on which Openfire operates is configured with IPv6. Followed some guidance from this site ( but could not actually match with my installation. Finally I have added following arguments for JVM in /etc/rc.conf:


From that moment everything works, over IPv4 unfortunately. But I woudl like to be able to utilize both if possible. Any advice would be much appreciated.

Looked up this thread, changed net.inet6.ip6.v6only to 0, and removed above JVM arguments line from rc.conf and system works fine.

In my case I wanted to have IPv6 connectivity and the problem was that Java was unable to do DNS lookups using “nameserver” listed in /etc/resolv.conf. I could work this problem around by setting **java.naming.provider.url **to “dns://[::1]”.

In April 2011 some bugs regarding IPv4/IPv6 socket support were fixed, so it might be worth upgrading. Those fixes make my “java.naming.provider.url” workaround no longer and running with the default” is not a problem anymore.

1 Like