I have two openfire servers open on same machine. This machine has two network card, one has IP 10.11.9.1, and one has IP 10.11.4.29.
I edit the xml files of the servers (target: /openfire/conf/openfire.xml) for to do that each server is listening his network card:
first server:
**10.11.4.29**
second server:
10.11.9.1
Then, I have a client “user1” (user1@10.11.4.29) that is logged on first server and a client “user2” (user2@10.11.9.1) that is logged on second server.
Now, I have this question:
Is possible to set at application layer (so directly with Openfire) the IP sender of the packets sent from the users?
I want to set at application layer the IP 10.11.4.29 in the packets from user1@10.11.4.29
I want to set at application layer the IP 10.11.9.1 in the packets from user2@10.11.9.1
I ask this because if I do “sniffing” of packets with Wireshark on this machine I see that all packets sent from user1 or user2 have all as IP address 10.11.9.1.
Warning:
I don’t do this with routing table, but I must do it at application level. Do you know if is it possible?
is this an Openfire issue or a client issue? You write “all packets sent from user1 or user2 have all as IP address 10.11.9.1.”. So I wonder if you want to run local clients. Usually one has remote clients and there this shouldn’t be an issue.
I forget to say that user1 and user2 send packets to another server where is logged an user3.
I want that user1 speak with user3 and user2 speak with user3, but I want that the packets from user1 to user3 have IP 10.11.4.29 and packets from user2 to user3 have IP 10.11.9.1.
Instead, now, packets that arrive to user3 have all same IP: 10.11.9.1.
I must doing it directly with Openfire (by application layer).
there are only a few java files which contain “Socket(” so it should be quite easy to find them. Insert the code within JM-1064 as shown, between “new Socket()” and “socket.connect()”. There are some documents in the Openfire Developers forum about downloading the source and compiling it.
These documents should help you to setup Eclipse and Openfire. You need to download the source code, either as .zip or from SVN.
You can open .jar files with “jar”, “7zip”, … but they do contain .class files (compiled .java files) and are thus not the right place to modify something.