Seems to be a bug:
Outgoing s2s sessions do not bind to specified (in the config file or database) ip address (network.address).
openfire_src/src/java/org/jivesoftware/openfire/server/ServerDialback.java:
public LocalOutgoingServerSession createOutgoingSession(String domain, String hostname, int port) {
…
// Connect to the remote server
Socket socket = new Socket();
socket.connect(new InetSocketAddress(realHostname, realPort),
RemoteServerManager.getSocketTimeout());
I guess there should be used another constructor:
Socket socket = **new **``**Socket**(InetAddress address, int port)
or one more function before socket.connect:
**socket.bind**(SocketAddress bindpoint)