powered by Jive Software

Packet Filter Plugin

Hi Everybody!

I’‘ve just finished a first stab at a packet filter plugin. Currently the plugin allows you to create rules by defining a source, destination and packet type (iq,pressence,message). Based on the criteria you assign an action (drop,reject,pass). The first rule that matches gets executed. I’'ve taken some screen shots and uploaded them here :


If anybody is interested in trying this plugin out or would like some more info, shoot me a pm and I will help you out.



I am new to XMPP. I am trying to create a plug-in to OpenFire to gather incoming and outgoing XMPP packets and pass this info to a data processor. How do I go about creating the plug-in ? I will appreciate any help. Do I need to use the OpenFire java classes to gather this info ?


There is a very good guide on writing plugins here :

http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/plugin-d ev-guide.html

Basically you register your plugin to receive a copy of every packet, you can then do any processing you wish.



Hi Nate,

I went through the plugin developer guide but still have some questions. How do I register a plugin as a PacketInterceptor ? Could you show me some example code as to how to register ?

Shyamal Pain

  1. implement PacketInterceptor interface.

  2. implement interceptPacket() method:

public void interceptPacket(Packet packet, Session session, boolean incoming, boolean processed)
    throws PacketRejectedException {     /* ...your code here.... */
  1. register your interceptor when your plugin initializes:
  1. unregister your interceptor when your plugin destroys:


Thanks coolcat ! It worked.