From owner-freebsd-pf@freebsd.org Tue Oct 10 16:49:37 2017 Return-Path: Delivered-To: freebsd-pf@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 5FAF1E37255 for ; Tue, 10 Oct 2017 16:49:37 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4034663B56 for ; Tue, 10 Oct 2017 16:49:36 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Received: from ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.14.9/8.14.9) with ESMTP id v9AGncR4012909 for ; Tue, 10 Oct 2017 09:49:44 -0700 (PDT) (envelope-from bsd-lists@bsdforge.com) To: In-Reply-To: <20171010161123.52808204@copperhead.int.arc7.info> References: <20171010161123.52808204@copperhead.int.arc7.info> From: "Chris H" Subject: Re: Specifying a range of ipv6 addresses? Date: Tue, 10 Oct 2017 09:49:44 -0700 Content-Type: text/plain; charset=UTF-8; format=fixed MIME-Version: 1.0 Message-id: Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.23 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, 10 Oct 2017 16:49:37 -0000 On Tue, 10 Oct 2017 16:11:23 +0000 Mark Raynsford wrote > Hello. > > What is the syntax for specifying a range of IPv6 addresses in rules? > > I want to write rules of the form: > > pass out log quick on $nic_ppp inet6 proto tcp from > 2001:db8:8:10::/64 to any port 80 modulate state > > But pf appears to treat 2001:db8:8:10::/64 as a single address (I > intended it to mean an entire subnet). While I am filtering with pf(4), I have to admit I haven't used it to filter IPv6 for awhile. A search for an answer to your question seemed to indicate the following two links may be of help/interest: https://www.freebsd.org/doc/handbook/firewalls-pf.html https://bash.cyberciti.biz/firewall/pf-ipv6-ipv4-firewall-for-freebsd-openbsd-netbsd/ HTH --Chris > > -- > Mark Raynsford | http://www.io7m.com