How to bind an IP address for Spark?

When I use spark 2.6.0 to transmit a file to another spark 2.6.0, the transmision does not work!

I find the cause of this error using spark debug mode, that is the IP address spark binding is not correct.

My computer has two IP address, static 172.18.8.54 for LAN and dynamic VPN IP address (i.e. 58.192.124.132) for Internet access.

The openfire and spark should work within the LAN network, in other words, when transmitting a file to another spark client, the IP address for my spark should be 172.18.8.54, not 58.192.124.132. But my spark tell the other side my IP is 58.192.124.132, so the file transferring does not work.

Can anyone tell me how to solve this problem?

Thanks very much!

Looks like an issue, where we will have to do some code changes. It works in our LAN set-up (dows not help you). Have you switched on the proxy mode for file transfer on your Openfire?

No, I turned off the proxy mode for file transferring to lower the load of openfire server.

When I turned on the proxy mode, the openfire didn’t bind an LAN network IP. The problem was still there.

I think the client should be able to set the binding IP for LAN network.

Thanks very much!

of course in your situation spark should use the LAN ip, but we had some problems with external users connecting to openfire server using VPN access. in this case the vpn client address is the right one to choose for file transport.

whatever, thanks for your assertion. the problems seems to be identified and the patch is mostly done…(in my head)

could be also be a smack problem, we’ll have a look

created ticket http://issues.igniterealtime.org/browse/SPARK-1325

So, we should give options for users to choose which IP to use for file transprt, yes?

If spark lists all the IPs (or MAC addresses) in a computer in the setting panel, users could choose a correct one.

I think this is a simple solution.

In addition, I think this could be helpful:

http://community.igniterealtime.org/message/212329#212329

i tried to reproduce the problem with following configuration:

PC 1 (outside local network):

ethernet interface: static: 56.45.7.85

vpn interface: dynamic: 10.60.11.11

PC 2 (inside local network)

ethernet interface static: 10.60.11.12

now i tried to send a file from PC1 -> PC2

PC1 got package with the right ip:

  • *

but PC2 could not connect either, maybe it is blocked by our firewall because it is a socket5bytestream?!

  • *

  • *

  • Could not establish socket with any provided host*

  • *

Hmm, I think maybe you are right. The firewall blocked the connection.

Just ping PC1’s IP 10.60.11.11 from PC2, you can tell if the connection from PC2 is blocked by the firewall or not.

yep, they could ping each other, because icmp packages are not blocked, i guess. but a package need about 120ms to, so it indicates that pc2 is a vpn client. ping pc’s inside the local network need about 10ms or less…

If two PCs are not in the same local network, using the file transmission proxy, I think, will be a better choice.

So, I turn on the proxy in my openfire. The transmission speed is not so slow either.