ejabberd - Comments for "s2s (server-to-server) Filtering"
https://www.ejabberd.im/node/394
enI've tried to implement this
https://www.ejabberd.im/node/394#comment-818
<p>I have made an attempt at implementing this, and attached it to <noindex><a href="http://www.jabber.ru/bugzilla/show_bug.cgi?id=42" rel="nofollow" >the bugzilla entry</a></noindex>. Comments and testing welcome...</p>
Thu, 22 Sep 2005 10:49:35 +0000legosciacomment 818 at https://www.ejabberd.imI think I'm going to need to
https://www.ejabberd.im/node/394#comment-817
<p>I think I'm going to need to write my own filter. Something that can basically strip out the XML and perform routing verification. I sense this is going to be a duanting task....</p>
Wed, 21 Sep 2005 02:15:01 +0000dev_null123comment 817 at https://www.ejabberd.imI think you need filter_packet
https://www.ejabberd.im/node/394#comment-813
<blockquote>Am I correct in assuming that these ACLs are strictly used in the context of c2s communications?</blockquote>
<p>Let's see what do you get when you do this:
<pre>
{hosts, ["domainx.com", "domainy.com"]}.
{acl, domainy, [{user, "*@domainy.com"}]}.
{host_config, "domainy", [
{access, c2s, [{allow, domainy}, {deny, all}]}
]}.
{listen, [
{5222, ejabberd_c2s, [{access, c2s}, {shaper, c2s_shaper}]},
...
]}.</pre>
With this config, ejabberd will only accept <b>C2S connections</b> on port 5222 to 'domainy.com' if the user is from 'domainy.com'. As you can see, this is normal behaviour, not a restriction at all.</p>
<p>I guess that you want:
<ul>
<li>packets sent to the server by domainy.com users are checked individually and...
</li><li>if the packet is sent to a JID with server not equal to 'domainy.com' then...
</li><li>then the packet is discarded,
</li><li>else the packet is sent as usual.
</li></ul>
</p>
<p>Maybe filter_packet can be used to do this, but you must know it's a hook, not a configuration option. So, it's meant to be used to code filters into ejabberd, it's not a filter in itself.</p>
<p>One possible implementation: a new module that allows filtering packets by the sender's server and/or receiver's server. That module registers to that hook, and can be configured on ejabberd.cfg.</p>Mon, 19 Sep 2005 08:15:18 +0000mfosscomment 813 at https://www.ejabberd.im