SSH Bruteforce prevention script

August 22nd, 2010 by noven

Its really annoying to have some stupid script fill your logs with failed ssh login attempts, and there is always a risk they eventually will get lucky.

I found this script in the forums some time ago and always use it to lock out bruteforcers. Its also a really good template for other dynamically created blacklists.


/ip filewall filter
add chain=input protocol=tcp dst-port=22 src-address-list=ssh_blacklist action=drop \
comment="drop ssh brute forcers" disabled=no

add chain=input protocol=tcp dst-port=22 connection-state=new \
src-address-list=ssh_stage3 action=add-src-to-address-list address-list=ssh_blacklist \
address-list-timeout=10d comment="" disabled=no

add chain=input protocol=tcp dst-port=22 connection-state=new \
src-address-list=ssh_stage2 action=add-src-to-address-list address-list=ssh_stage3 \
address-list-timeout=1m comment="" disabled=no

add chain=input protocol=tcp dst-port=22 connection-state=new src-address-list=ssh_stage1 \
action=add-src-to-address-list address-list=ssh_stage2 address-list-timeout=1m comment="" disabled=no

add chain=input protocol=tcp dst-port=22 connection-state=new action=add-src-to-address-list \
address-list=ssh_stage1 address-list-timeout=1m comment="" disabled=no

Time for businesses to upgrade to windows 7?

April 2nd, 2010 by noven

The whole Vista experience was a bit of a debacle. A few users liked it, but my standing recommendation to business was to stick with XP – none of us wanted to deal with the vista headaches in a business environment. But as time rolls on and our servers all bump up to 2008 there are many good reasons to consider upgrading the desktop OS’s. Windows 7 (with SP1) is definitely leaps and bounds ahead of either Vista or XP. By this time all good Line of Business applications work just fine with 7. The advanced management features are very useful and the user interface is a brilliant step forward.

Here at MageData we are using windows 7 on every non-linux business machine and we are loving it. We’ve been using it long enough to comfortably say it is a powerful, stable and functional OS for business use. So yes, we beleive it is now time for businesses to start upgrading away from XP to 7. As always you should stagger your deployment to allow for proper testing in your environment, and you may need to buy some extra RAM for older PC’s, but the productivity and functionality gains are well worth the effort.

vTiger Trouble Ticket time in decimal format

March 28th, 2010 by noven

I’m not sure what my clients would say if I started billing in one hour increments, especially for those jobs that only take 15m, but I’m sure it wouldn’t be polite. However vTiger by default seems to think this is a good idea! Surely I should be able to lodge a trouble ticket with 0.25 hours, but it appears not. Not without a minor DB edit that is…

Dive into the database. Find table vtiger_field . Find field columname hours (fieldid 155). By default the datatype is I~O. What must you change it to to get decimal? Thats right, N~O. Simple. It doesn’t *seem* to have broken any of the calculations, I’ll update if I find it does.

Aligning the tables in vTiger Customer portal

March 15th, 2010 by noven

Not sure how this one slipped through, but until the next update if you are as bugged as I was by the Trouble Tickets page not lining up in the customer portal the fix is simple. One table was closed twice! Open HelpDesk/index.php and on line 88 change

 echo '</table></td></tr></table></td></tr></table>';

to

 echo '</td></tr></table></td></tr></table>';

. Now your designer can keep his hair.

Don’t use nested tabled kiddies, they are a serious health hazard plaguing code monkeys!

How to Fork Bash Up

March 13th, 2010 by noven

This is an oldie but a goodie…

# :(){ :|:& };:

Of course it is possible to protect your system from this if you have set user process limits correctly…. are you brave enough to test?