Remotely connecting to openfire

Hi
I want to allow remote clients (for now using spark) to connect to the openfire installed on my machine which is inside a LAN. I was wondering if ngrok can be used for the tunnelling. What protocol and what port should I use to create the tunnel? In the configuration what part of the created static url should I use for openfire? Any help is welcome…
Kavita

Openfire uses the XMPP protocol, which defines TCP connections.

By defining DNS records, you can typically avoid needing to do any tunneling at all. You will likely need

  • an “A record” to define what IP address to use for the fully qualified domain name of the server that is running Openfire
  • several “SRV” records to define what server (identified by its fully qualified domain name) to use for your XMPP domain name.

If your XMPP domain name is equal to the fully qualified domain name of the server that is running Openfire, you don’t even need SRV records.

Newer versions of Openfire will make a note of missing DNS records in the admin console. It will even give examples of to-be-added records, tailored for your setup.

Most other issues relate to networking - typically, you’d use NAT techniques to solve those.

If your XMPP domain name is equal to the fully qualified domain name of the server that is running Openfire, you don’t even need SRV records.

can this be an ip?
On our server box we use ngrok to tunnel http for a port to a fixed url. This exposes the port to the internet. When I tried ngrok http 7070/5222/5223 and used the returned url as xmpp domain and the fqdn, it did not allow me to connect locally too. Any pointers as to how we can expose the port and what I am doing wrong?

The XMPP domain can be an IP address, but I strongly advise against this.

I’m not familiar with ngrok - I can’t help you there. It is worth noting that the XMPP protocol (port 5222 and port 5223 are very different from HTTP.

I am using spark to connect, and it gives an error if domain is an ip… So looks like I am stuck

You cannot use a different XMPP domain other than what you used when originally installing Openfire. You’ll find the XMPP domain name of your Openfire instance on the first page of the admin console (after logging in).

In the ‘advanced’ connection settings of Spark, you can configure Spark to use a specific server to connect to. Doing this will override the auto-discovery of the correct IP address for your server.