powered by Jive Software

Restrict File Transfer through IM Gateway

I want to ask whether file transfer through the IM Gateway can be blocked. Thanks

It should be possible to write a plugin that implements the PacketInterceptor interface. Something like this could work:

public void interceptPacket(Packet packet, Session session, boolean incoming, boolean processed) throws PacketRejectedException {
    if (processed) { return; }     JID toJID = packet.getTo();
    JID fromJID = packet.getFrom();     if (toJID != null && fromJID != null) {
        String to = toJID.toBareJID().toLowerCase();
        String from = fromJID.toBareJID().toLowerCase();
        if (to.equals("proxy.myserver.com") && from.equals("gateway.myserver.com")) {
            throw new PacketRejectedException();
        if (from.equals("proxy.myserver.com") && to.equals("gateway.myserver.com")) {
            throw new PacketRejectedException();

I have not tried this, but it works to block remote users from local and external components.

Edit: Forgot it, this will only help if the user uses openfires filetransferproxy. But it should be possible to analyze the packet content for filetransfers.


Message was edited by: Coolcat

Hi Eileen,

You might want to post your request over in the IM Gateway Support forum. Daniel is very responsive to requests and at the very least I’'m sure he could add yours to the list of possible future gateway plugin features.



For that matter, there is no file transfer functionality in the IM Gateway plugin yet. So it’'s not currently a concern. =)

So it’'s not currently a concern. =)

Heh - that’'s cheating.

Security through lack of functionality!