Openfire file transfer proxy is resolving to local ip

Our openfire server has two ethernet adapters: public and local and is bound to a windows domain and authenticates with a domain controller. When using both spark and pidgin clients, with debug mode on I notice that file transfers point to the openfire server’s local ip address. Our DNS for openfire domain name points to the public ip. Logins and chat work when connecting remotely, but file transfers do not. I do not know why the proxy is choosing the local ip, and I don’t know how to force it otherwise.

The file transfers will automatically proxy as such: proxy.chat.mydomain.com, local-ip, port 7777; where openfire’s domain is chat.mydomain.com

When inside the network, file transfers work properly.

Is there a setting in openfire, or variable to be set to force proxy domain to use our public ip instead?

Thanks

You can try stopping Openfire, editing /openfire/conf/openfire.xml, uncommenting tag and adding your public ip into tag. Can’t say whether it will work or not brake anything else. Just an idea.

I have the same problem. Were you able to figure out how to get around this?

I have installed Openfire 3.10.0 on Google cloud. Am attempting a file transfer from a Spark client to my Android client (using Smack) via this server. The transfer fails due to the negotiation failures. When I enabled logs on Spark, could see that the IP address returned by the proxy JID is a private address. So, the streamhost JIDs sent by Spark to the Android client look like this

<streamhost jid=“proxy.gclivechat” host=“10.240.150.120” port=“7777”?>

The Android client not being able to connect to either hosts is returning a “Could not establish socket with any host” error.

I tried editing the openfire.xml file and defining the network.interface element to the external IP. But, openfire still listens on all interfaces and continues to return a private IP address to Spark client. Tried adding a system property from the system properties section too. Even this didn’t work.

Have I configured the openfire incorrectly? Could anybody please help me with some tips? Been stuck from the past few days with this.

Thanks

The file transfer proxy that ships with Openfire will use this fallback when determining its hostname / IP address (in order):

  1. Use a value specified in the property “xmpp.proxy.externalip”
  2. Use the network interface as defined in property “network.interface”
  3. Use a more-or-less random address detected on the localhost
    I suggest you try setting on of two properties - that should resolve your issue. You probably need to restart Openfire for the changes to be applied.
1 Like

Thanks a lot. Setting the “xmpp.proxy.externalip” property did the trick. I had earlier set the “network.interface” property too, but it wasn’t working.