?

Log in

No account? Create an account
Linux Community's Journal
 
[Most Recent Entries] [Calendar View] [Friends View]

Monday, April 21st, 2008

Time Event
8:35a
Blocking dictionary attacks on sshd
I've been having an ongoing problem for some time where (I guess) script kiddies are scanning a bunch of users involving a dictionary of users. Initially I wrote a lengthy script that blocked them after the fact, preventing them from trying in the future, which was entirely fruitless looking back. Also if you screwed up your login, you found yourself barred.

I stumbled on a set of rules for iptables the other day that serves my need perfectly, so I thought I'd share it with you all:

iptables -N SSH_CHECK
iptables -A INPUT -p tcp --dport 22 -m state --state NEW -j SSH_CHECK
iptables -A SSH_CHECK -m recent --set --name SSH
iptables -A SSH_CHECK -m recent --update --seconds 60 --hitcount 4 --name SSH -j DROP

So basically it watches to see if the same IP address attempts more than 3 connections a minute and adds a rule to drop them, removing the rule when a minute of quiet time has past.

Current Mood: happy
7:04p
K3b Error
I keep getting an error with the K3b burner:

System locale charset is ANSI_X3.4-1968
Your system's locale charset (i.e. the charset used to encode filenames) is set to ANSI_X3.4-1968. It is highly unlikely that this has been done intentionally. Most likely the locale is not set at all. An invalid setting will result in problems when creating data projects.


When I run the "locale" command, I get the following information:

LANG=en_US
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C

When I run the "locale -a" command, I get "C" and "POSIX". I've even modified /etc/profile.d/lang.sh to turn "C" to "POSIX", but that didn't fix the problem, so I switched it back. I've changed LANG to en_US.UTF-8 (which I have) and that didn't work either. I'm running Slax, so I need a Slackware-specific fix, I think. I've Googled all over, but I keep finding fixes for different distros, but not Slackware. I need more info than "You need to set your locale." Halp?


[Edit: All fixed now after a reinstall!]

<< Previous Day 2008/04/21
[Calendar]
Next Day >>
About LiveJournal.com