From owner-freebsd-questions@FreeBSD.ORG Sat Apr 24 18:32:52 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D46FD106564A for ; Sat, 24 Apr 2010 18:32:52 +0000 (UTC) (envelope-from utisoft@googlemail.com) Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mx1.freebsd.org (Postfix) with ESMTP id 605E08FC15 for ; Sat, 24 Apr 2010 18:32:51 +0000 (UTC) Received: by bwz8 with SMTP id 8so10162721bwz.3 for ; Sat, 24 Apr 2010 11:32:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:mime-version:received:reply-to :in-reply-to:references:from:date:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=S+5oxlUUPFFUj8TFx44UzJ/yVATjx+xs2L6WUfOzpwk=; b=JcCMQ/L2J3mpuE7P5v3ZmnoyJYvbWaeViCiFryYIkXzqCoXdCKU/QpXtiaGEcVValc TOl8BJ3B6VtHaVGWWY89ChOrT6mwsh77R2bFB/NC2bW95Ff6rViMsjTKhtf1ylnAqmH0 bk3lWRvc8zpxtSdO0TMqq2tSdtt+bhaoQum5k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; b=rfTaywr+wZ61XkXt4jPG6ZPg7rC7JILWL8Qc6n4ky0h/vtBC0P1l7khOUEw382lloZ klqzV8dlOuMi8v9nILV46gYiLBeLBwJgVF+mI6r0zvj/l/qGcinvksG1uKXqSnX5g2yn uc8+0ZRBrAkpA8NAWxneeWsH5qe/wFWw1YR+U= Received: by 10.204.85.73 with SMTP id n9mr1083267bkl.71.1272133970156; Sat, 24 Apr 2010 11:32:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.66.6 with HTTP; Sat, 24 Apr 2010 11:32:20 -0700 (PDT) In-Reply-To: References: From: Chris Rees Date: Sat, 24 Apr 2010 19:32:20 +0100 Message-ID: To: "Bauer, Aaron J." Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-questions@freebsd.org" Subject: Re: Setup Fail2Ban on FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: utisoft@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Apr 2010 18:32:52 -0000 On 23 April 2010 18:49, Bauer, Aaron J. wrote: > I am currently using FreeNAS 0.7 for a file server. =A0I have multiple SS= H bruteforce attacks each week, and wish to use fail2ban to prevent this. > > I don't have much experience with BSD, and am having trouble getting ever= ything to work. =A0I ran pkg_add -r python25 and pkg_add -r py25-fail2ban. = =A0I now have all the files for Fail2Ban, and did the cp jail.conf jail.loc= al as the other distro's for linux use. > > However, how do I start using fail2ban? =A0I have configured it for CentO= S and Ubuntu, and it starts in init.d. =A0I don't know how to add it to /et= c/rc.d to get it to work correctly.. > > Any help is greatly appreciated. =A0If you need more info, please let me = know. > > Aaron > Software Research Intern > Aaron.J.Bauer@SAIC.com What everyone else has missed out is that ports install their rc files into /usr/local/etc/rc.d, rather than /etc which is reserved for the base system. Fail2ban already installs an rc.d script, so you don't need to do anything. So, /etc/rc.conf can be used, and add fail2ban_enable=3D"YES" Then from the prompt run: # /usr/local/etc/rc.d/fail2ban start Chris