From owner-freebsd-questions@freebsd.org Mon Mar 27 15:23:14 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FA8BD20887 for ; Mon, 27 Mar 2017 15:23:14 +0000 (UTC) (envelope-from ralf.mardorf@rocketmail.com) Received: from nm1-vm5.bullet.mail.ir2.yahoo.com (nm1-vm5.bullet.mail.ir2.yahoo.com [212.82.96.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A447F6B4 for ; Mon, 27 Mar 2017 15:23:13 +0000 (UTC) (envelope-from ralf.mardorf@rocketmail.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rocketmail.com; s=s2048; t=1490628000; bh=XO1my+B5FGHCcJhWileNzY5GwFASsyjAra2YRnKHYDs=; h=Date:From:To:Subject:In-Reply-To:References:From:Subject; b=rHt/qyi51962yaRGNQu19FBSl+hoG6lGUDfHq3KRYzhSMBv/jIYO0fkkPqfXn6vJzmohLsuojbJSkIbqaW3faegQjifa4XI8OfVN2K6A6W+j7INjzCehHGczFGHBzL22Kxe2FJ7JbIVrHkZSk8jm1EZ4uLAuz/dB78TSM3S3aNqOl9deMCsvcrofsyLH05yJD81PGesjNnh8Ba0/oThpRigQWyCv1YHppwsvEJEAqZ3Hlo3YNknWuOOpMClwSdfXpZPiGO0U3ES1RAADnDCD4cee0ZUUF7hKswd8o9XpDPY8CwaaKx+lkvsXKE1XBZtlg63JpTAp23MTWceNtEp1lg== Received: from [212.82.98.53] by nm1.bullet.mail.ir2.yahoo.com with NNFMP; 27 Mar 2017 15:20:00 -0000 Received: from [46.228.39.74] by tm6.bullet.mail.ir2.yahoo.com with NNFMP; 27 Mar 2017 15:20:00 -0000 Received: from [127.0.0.1] by smtp111.mail.ir2.yahoo.com with NNFMP; 27 Mar 2017 15:20:00 -0000 X-Yahoo-Newman-Id: 174555.47657.bm@smtp111.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: _jHXRz8VM1kFjXWp6UMm86U6eqaKQXQJY_nfkvJebfqVgpL LQ1tkvsZw97zvcbkYQa0sVRtMZbfA3dW4QoPEjtmlCSaU4TYF1wcdmaVnWcR Qijxf2IpCkhcXgpxA9qtOAheibzWZmtoAT_flvoj4_MKV619tV6q5h45XcqH AJYYLG0uIyqu.vSq4Xwdf9AKQeiDuNVZ1wgBQwFERGgv2AoK1tgmgDLivq.G byovr_hSt.K5cusKqqniWS.XMooLqhLSFt8Zvp9UOl8QDR45bx4t5ovcEkn8 rkAsa3NJcbN7qXMUrh1cl_KyjA3cpsxFytyMZ2TsadkOUsxI6iNRH3fz5o2t Yi0PIoVxx9qT4Q9K4KhXMxdDdEjmDl2BahFoZsujWvVfWEi0OSC7Niprfgpl z6UjEWs8LTJKpZpHsE_wOY1N_oiixsH53fcnZesfLpm_A5Q65XDM2A0yc.Qt tbGIsrFuGFkSBa.srk9.kp70hxWwvH6kr2uuBpdpFi1z1RBUx.8vHrgpjZT2 2y5ilyFtgzf9PSv5wgst1zk_x92rRoUaEnwxjkpPKlzOKoTAldt4x_at_y_P ku_fY7d.v864O_vgsdD_uG.vpbsTP X-Yahoo-SMTP: BeMCPs2swBABTJ3kAeEiC_hE0mz8jRexLddJfD8pI2j32fOacjBmXg-- Date: Mon, 27 Mar 2017 17:19:59 +0200 From: Ralf Mardorf To: freebsd-questions@freebsd.org Subject: Re: Two pf questions Message-ID: <20170327171959.405bbfbb@archlinux.localdomain> In-Reply-To: <20170327170941.59c84eec@archlinux.localdomain> References: <20170327170941.59c84eec@archlinux.localdomain> X-Mailer: Claws Mail 3.15.0-1-g9782061 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2017 15:23:14 -0000 On Mon, 27 Mar 2017 17:09:41 +0200, Ralf Mardorf wrote: >On Mon, 27 Mar 2017 10:37:49 -0400, David Mehler wrote: >>pfctl -t bruteforce -T show >> /etc/pf/bruteforce >> >>the problem is that I'm getting duplic addresses. The table has >>fifteen addresses in memory but 75 in the table there's no unique >>sorting, any ideas on how? I only want unique IP's in the on disk >>table to avoid redundant addresses > >cp /etc/pf/bruteforce /tmp/foobar.txt >pfctl -t bruteforce -T show >> /tmp/foobar.txt >sort -u /tmp/foobar.txt > /etc/pf/bruteforce PS: I don't know how your tools work, so perhaps you only need to pipe the "new", assuming the tools shouldn't provide their own options to do the same ;). pfctl -t bruteforce -T show | sort -u >> /etc/pf/bruteforce