From owner-freebsd-stable@FreeBSD.ORG Fri Jun 15 19:44:28 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7BC03106566B for ; Fri, 15 Jun 2012 19:44:28 +0000 (UTC) (envelope-from prabhpal@digital-infotech.net) Received: from mail.digital-infotech.net (mail.digital-infotech.net [41.211.25.193]) by mx1.freebsd.org (Postfix) with ESMTP id 1BA9B8FC18 for ; Fri, 15 Jun 2012 19:44:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.digital-infotech.net (Postfix) with ESMTP id 1C2292E404A; Fri, 15 Jun 2012 19:44:24 +0000 (GMT) Received: from mail.digital-infotech.net ([127.0.0.1]) by localhost (mail.digital-infotech.net [127.0.0.1]) (maiad, port 10024) with ESMTP id 04692-08; Fri, 15 Jun 2012 19:44:24 +0000 (GMT) Received: from mail.digital-infotech.net (localhost [127.0.0.1]) by mail.digital-infotech.net (Postfix) with ESMTP id EAC882E4017; Fri, 15 Jun 2012 19:44:23 +0000 (GMT) X-DKIM: OpenDKIM Filter v2.5.0 mail.digital-infotech.net EAC882E4017 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digital-infotech.net; s=digital; t=1339789463; bh=+33+8jZtd+dRl9YmT+XAD8APZKRQF087NzP6856+QwE=; h=In-Reply-To:References:Date:Subject:From:To:Cc:Reply-To; b=Eop/N685pEIft0mq5V/vc2cXbXH4Qidol4aQ5shkWN073YnjU7TefZJXcCbvCaTGa Na4Bpx3FEF2k+o+M/dpA4IRwOigAQBzVCO86KGmpaH1Hrh81uwm92pE7pyB/7iWzTa 88szM6EPnt6+XxGKiFGmTGx2z9fZ6f9G7L2M+JU4= Received: from 41.211.0.76 (SquirrelMail authenticated user prabhpal@digital-infotech.net) by mail.digital-infotech.net with HTTP; Fri, 15 Jun 2012 19:44:23 -0000 Message-ID: <738cbc31aa2dce5787dc85cafb3d02a6.squirrel@mail.digital-infotech.net> In-Reply-To: <4FDB6CBD.6080900@infracaninophile.co.uk> References: <4360846ab93b3a2b1968ee0f262cf148.squirrel@mail.digital-infotech.net> <4FDB6490.8080509@infracaninophile.co.uk> <98c09d7edf95e0e07910e7e5ce46accc.squirrel@mail.digital-infotech.net> <4FDB6CBD.6080900@infracaninophile.co.uk> Date: Fri, 15 Jun 2012 19:44:23 -0000 From: "Shiv. Nath" To: "Matthew Seaman" User-Agent: SquirrelMail/1.4.22 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: freebsd-stable@freebsd.org Subject: Re: PF to Preventing SMTP Brute Force Attacks X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: prabhpal@digital-infotech.net List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jun 2012 19:44:28 -0000 >> Dear Mattthew, >> >> Grateful for sending me in right direction, solution really sounds well. >> Does it look good configuration for "/etc/pf.conf" ? >> >> # START >> table bruteforce persist > > Watch the syntax -- it's table persist with angle brackets. > >> block in log quick from bruteforce >> >> pass in on $ext_if proto tcp \ >> from any to $ext_if port $trusted_tcp_ports \ >> flags S/SA keep state \ >> (max-src-conn-rate 3/300, overload bruteforce flush global) > > Again -- you need angle brackets around the table name. > >> >> # END >> >> AND CRON: >> */12 * * * * /sbin/pfctl -t ssh-bruteforce -T expire 604800 >/dev/null >> 2>&1 >> >> What is the function "expire 604800" are they entries in the table? >> should it be -t bruteforce or -t ssh-bruteforce > > Ooops. Yes, -t bruteforce is correct. "expire 604800" means delete > entries after they've been in the table for that number of seconds (ie > after one week) > > Cheers, > > Matthew > > -- > Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard > Flat 3 > PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate > JID: matthew@infracaninophile.co.uk Kent, CT11 9PW Dear Mattthew, i am very much grateful for your assistance and advice configuring PF correctly. Well done ! Thanks / Regards