From owner-freebsd-pf@FreeBSD.ORG Tue Oct 28 08:56:55 2014 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 681CA568 for ; Tue, 28 Oct 2014 08:56:55 +0000 (UTC) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F0921A86 for ; Tue, 28 Oct 2014 08:56:54 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id d1so5035593wiv.17 for ; Tue, 28 Oct 2014 01:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=oFmSYQ4455wsG6G/pitJrJFHqvPqa3HQiteEUdZ4DNA=; b=blAUHT5TXhRBL4dL9dAEi4x2099LLMTJAgG8LnVjpAHh2xVv26NCQ65LHy9PHN8I+8 25urnE+CdlpeJ5sqnFYDL+Xa5o/XpKgQP0IpuGm+NoGWU7FXNBFRCwwVzLNJ/v1cRgIU JoT4cA0SJq4Bwv0jcq/I6y7fRbOtj3c8B+5P2Lnh7PouKqxoTlC6+5tzQPBN3wSaCJTq RuGVsHfhKFyykmK6OP9MA3HSap7xWMQ78chxAaA23tBU4zn5QE8imMoLKTrL8rLdyaWt sHrRwGYOJ/O3ftE3SJaG8bNzpZpZsFZczQvwwtNgzbv6rJ2q+NCWRkaxH7d6M3UlSjze MueQ== MIME-Version: 1.0 X-Received: by 10.181.13.208 with SMTP id fa16mr26055626wid.61.1414486613177; Tue, 28 Oct 2014 01:56:53 -0700 (PDT) Received: by 10.194.223.1 with HTTP; Tue, 28 Oct 2014 01:56:53 -0700 (PDT) In-Reply-To: References: <544E7883.1000705@egr.msu.edu> Date: Tue, 28 Oct 2014 09:56:53 +0100 Message-ID: Subject: Re: How to block IP range From: Cristiano Deana To: "Spenst, Aleksej" Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-pf@freebsd.org" X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2014 08:56:55 -0000 On Tue, Oct 28, 2014 at 9:30 AM, Spenst, Aleksej wrote: Hi > block in quick on eth0 from "10.0.0.1 - 10.0.0.100" to 10.0.0.0 > > and load the rules then pfctl does not complain about any syntax errors. > However, if I look what rules are loaded with "pfctl -s rules" then I see only: > > block drop in quick on eth0 inet from 10.0.0.1 to 10.0.0.0 that should be "{ 10.0.0.1 - 10.0.0.100 }" # grep test /etc/pf.conf test="{ 10.0.0.1 - 10.0.0.100 }" block in quick on $ext_if from $test # pfctl -nvf /etc/pf.conf | grep 10.0 test = "{ 10.0.0.1 - 10.0.0.100 }" block drop in quick on em1 inet from 10.0.0.1 - 10.0.0.100 to any -- Cris, member of G.U.F.I Italian FreeBSD User Group http://www.gufi.org/