IPTABLES: Prevent a server from spamming out

Your server can somehow be compromised and used to spam (email): if it’s a cloud or a dedicated server subscribed from a decent provider, they will notify you about that (i speak from experience here :-))

Any way to prevent yourself from that or to block back in case you are facing it already, here are simple iptables rules Lire la suite

Iptables: how to block bunch of countries to attack your server

This weekend a friend of mine, owner of  a web site dev-hosting company told me about cPanel regular emails alerts regarding recurrent SSH failed login attempts on one of his customers servers from few IPs located in 3 countries.

He asked me about a way to block certain countries via iptables.  I wrote something that did the trick Lire la suite