Re: kernel.org status: hints on how to check your machine for intrusion

Steven Rostedt
2011-10-01T18:06:50Z

On Sat, Oct 01, 2011 at 09:35:33AM +0200, Willy Tarreau wrote:
>
> - last considerations to keep in mind is that machines which receive
> incoming connections from outside should never be able to go out, and
> should be isolated in their own LAN. It's not hard to do at all, and
> it massively limits the ability to bounce between systems and to steal
> information. It also makes firewall logs much more meaningful, provided
> they are stored on a support with limited access, of course :-)

For my machine that is connected to the outside world, I have a script
that runs every night that checks for attacks. As bots constantly look
for port 22 and 80, they find my machine without issue. When my script
detects a bunch of ssh login attempts that fail, it will add that ip
address to the iptables DROP chain:

# iptables -L -n | grep DROP | wc -l
2656

I've picked up quite a few ;)

This script only runs and scans once at night. Probably better to have
it run more often.

If any one is interested in this simple script, I can send it to them.
I'd have to audit it to make sure that it doesn't expose anything else
that may be of security to me (other machine IPs that I don't want
public, etc).

-- Steve