Spam jabber domains and ejabberd

Hi. I receive a lot of spam messages every day. From different jabber servers. There are legit, like jabber.cz and not legit/not used, like bashtel.ru
I want to lock all this spam servers like bashtel.ru in iptables. A want to do it in iptables, not in config files.
How I can do it? How to write iptables rules correctly?

> How to write iptables rules

> How to write iptables rules correctly?

This is a good question, than many linux administrator tutorials and websites can solve, if you search for it, right?

By the way, I see that ejabberd 17.03-beta will include a new module called mod_block_strangers. Once released, take a look, maybe it also helps to fight spam.

I try: iptables -A FORWARD -m

I try:
iptables -A FORWARD -m string --string "bashtel.ru" --algo kmp --to 65535 -j DROP
I'm I right?

By the way, I see that ejabberd 17.03-beta will include a new module called mod_block_strangers. Once released, take a look, maybe it also helps to fight spam.

wow. it's good news, because this spam ennoying every day, not only outgoing, also incoming

Don't work such rule iptables

Don't work such rule

iptables -A FORWARD -m string --string "bashtel.ru" --algo kmp --to 65535 -j DROP

Where is the mistake?

Syndicate content