powered by Jive Software

Distinguish users according to IP address they connect from


I have installed Openfire on Windows Server 2016, all users are using Spark, everybody sees all the other users in a common group by default. I have set the forwarding and reverse NAT on the network gateway so that everybody can connect either from LAN or the internet.
Our previous chat utility was simple LAN server-less system, thus not working from outside the network, but it had the advantage, that you could see, who is present in the building at the time.
I would like to achieve this somehow with Openfire - I was thinking maybe auto assigning user to a group, dependig on IP address he is connecting from (LAN range one group, every other second group). Is this possible somehow?
If it’s not viable for groups, status would be good enough (like people on LAN are Free to chat, people outside LAN are just online on connection, with the option to manually change it later).
Thanks in advance for any help or direction


If I were doing this, I’d write a standalone plugin. It would register a org.jivesoftware.openfire.event.SessionEventListener, and when someone joins (sessionCreated) could examine their address - session.getHostAddress() - and assign them to an appropriate group.