From owner-freebsd-questions@FreeBSD.ORG Tue Sep 19 22:20:51 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E2CF16A417 for ; Tue, 19 Sep 2006 22:20:51 +0000 (UTC) (envelope-from danm@prime.gushi.org) Received: from prime.gushi.org (prime.gushi.org [72.9.101.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id A532C43D79 for ; Tue, 19 Sep 2006 22:20:49 +0000 (GMT) (envelope-from danm@prime.gushi.org) Received: from prime.gushi.org (localhost [127.0.0.1]) by prime.gushi.org (8.13.6/8.13.6) with ESMTP id k8JMKnJx060844 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Sep 2006 18:20:49 -0400 (EDT) (envelope-from danm@prime.gushi.org) DKIM-Signature: a=rsa-sha1; c=simple/simple; d=prime.gushi.org; s=default; t=1158704450; bh=oNCpUNXyC5qcM/y4Cl5ZFAZLVuQ=; h=DomainKey-Signature: Received:Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=O7ovJjt01tnp5bhzM946+V4TZ+4HPMVpHjf6ov 3YDQRbBUYuuuZ0rbnGjOPEJoImulhRlSSyJ6P/9LEO+gnDxg== DomainKey-Signature: a=rsa-sha1; s=-l; d=prime.gushi.org; c=simple; q=dns; h=received:date:from:to:cc:subject:in-reply-to:message-id: references:mime-version:content-type; b=Pc5PCbTnr6Vg3w6sfiq3iW5Mv2JHi7dFdL3GVf1rThWlnlByL4x8eerFXkXyBaVr7 cl4WVLH8MlfNAjMTWmZ4w== Received: (from danm@localhost) by prime.gushi.org (8.13.6/8.13.6/Submit) id k8JMKnXY060841; Tue, 19 Sep 2006 18:20:49 -0400 (EDT) (envelope-from danm) Date: Tue, 19 Sep 2006 18:20:48 -0400 (EDT) From: "Dan Mahoney, System Admin" To: Erik Norgaard In-Reply-To: <45106397.9080206@locolomo.org> Message-ID: <20060919181232.L68018@prime.gushi.org> References: <20060919165400.A4380@prime.gushi.org> <45106397.9080206@locolomo.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: questions@freebsd.org Subject: Re: sshd brute force attempts? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2006 22:20:51 -0000 On Tue, 19 Sep 2006, Erik Norgaard wrote: > Along with some good advice. First of all: ssh is not a public service like > http or smtp where you need anyone to be able to connect. So don't let them > in the first place. It is in this case. It's a web server that allows shell usage (and encourages it, as I actually advocate the power that comes with a shell as opposed to the primitive (and less secure) interface you may get with crap utilities like cpanel, or FTP (where you're at the mercy of the featureset of your particular app). > Disable direct root login, in the article more than a third attempted to > login as root. Disable shell access for service accounts such as mysql, www > or ldap. Already being done. At this point I should mention that root has a login option whereby it can be done ONLY with publickey auth. > Use a scheme for choosing usernames that avoids common names like "james" and > avoid publishing usernames on web-sites, e-mail may differ from the username. This is somewhat unaviodable -- as I allow users to choose them. > Disable password based authentication and require ssh-keys if possible, best > if you can ensure both pasword and key based authentication. This also assumes that people password their keys, otherwise it actually *lessens* the security of a thing greatly. Most folks don't. I do wish there was some standard for forcing applications to not save passwords (other than OTP). > You may still find sshd login denied entries in your log - so what? it was > denied! This is really only a problem if the traffics saturates your > connection, or your log files grow so much that you run out of diskspace. It was denied, yes...but when it's denied for 200 different users from the same IP, it only takes one user with a weak password (and as much as I like keys, I personally prefer the passwords). I also find that since I have a nice web-enabled SSH app (as part of usermin), the key becomes sorta useless in that case. > The article also comments on moving ssh to a different port, but this causes > confusion and annoyance if you have many users and is non-standard. Doing the > other things works great, an ssh-key on a usb-keyring is great. For anyone savvy, yes. I don't assume that level of savvy. > Personally, I created a script for parsing the delegated files from the > different regional registries such as only to allow connection from EU > countries. Sounds interesting, is it public? > Since then, I get at most one attempt a week, few enough to manually look up > the ip with whois and decide if the host or network should be blocked. > > Cheers, Erik > -- quick, somebody tell me the moon phase please? Wrin: Plummeting. -Undernet #reboot, 9/11/01 (day of the WTC bombing) --------Dan Mahoney-------- Techie, Sysadmin, WebGeek Gushi on efnet/undernet IRC ICQ: 13735144 AIM: LarpGM Site: http://www.gushi.org ---------------------------