From owner-freebsd-ipfw@freebsd.org Tue Jul 26 17:40:31 2016 Return-Path: Delivered-To: freebsd-ipfw@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 38A16BA583E for ; Tue, 26 Jul 2016 17:40:31 +0000 (UTC) (envelope-from kudzu@tenebras.com) Received: from mail-qt0-x233.google.com (mail-qt0-x233.google.com [IPv6:2607:f8b0:400d:c0d::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ECD51122C for ; Tue, 26 Jul 2016 17:40:30 +0000 (UTC) (envelope-from kudzu@tenebras.com) Received: by mail-qt0-x233.google.com with SMTP id 52so14131004qtq.3 for ; Tue, 26 Jul 2016 10:40:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenebras-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=itFycwFEvkMSPZ/1stvu/MF19zioTOm8valqQkOhUto=; b=AXru0WjW5H5YmKwgQ3FCHA+XtZS1lR3XCPZIl46klpU0/f+DD0SCkkkXvI7oMdH25s TFRvqs42mvb+PIoIzoKfMr1SV77ZkB+zkQWnTlNvvebV4etrhOs2rvrphUZoj8TPGJk3 BvfGQkAkyunURCAqHoNjgLIHiGeM/nvrQ23SLAbMfOtlK5GwmdHnmQ3Gd9NR2lNPE1g7 nrV7HTE/RY1onIFAiB3kXjr3BolMm8Lf0ZQUHrUJK8ge0j4W2+GmI1abvbCrpr5yvizN YpY/WPY+w/EiJSKjeW/3f3JqiJCQfR0OWfeMKd0w0Q9WUbcLedh5pTZB5M3HZD/woAzq k07w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=itFycwFEvkMSPZ/1stvu/MF19zioTOm8valqQkOhUto=; b=B8NLsrj9enL+XFLA6jtExmWFOkpkLaYY0ZALlHQv2/U5k15hajBCTGm1zfPoIZrfKr 5QLIE2F4qkDIONZVayDA0y66lYCKs/5Tqk0tdxCvb51VhhTfdefX4Sr78RQAvIee38CJ XaHsXOBIG98+dR7HlYrI8V84B7ayLz108dIFvLg53z5V6KzOAegSlYIL7hKhy0cCNO6s GaLFVqATBpp78eEMhbSsPO4dcigrw6A7LvBt+c81Jou2E4TlAHclK4UE9C5bwfX6PNXd 4ARZkTw4DzsQ5XUj/A1kQzda9tNael9YU2H6VgYUqwIaHwqyTzaEaAuPsof8mGDJb8zR Bbuw== X-Gm-Message-State: AEkoouuVEHFCtUKRun1pV5YkqwdAelH/rpLRC9aN6rfH11SV0XFhpTYTJkMTFxjrLNfqSLPyGXBirT++59sO6NiY X-Received: by 10.237.46.166 with SMTP id k35mr41743900qtd.93.1469554829749; Tue, 26 Jul 2016 10:40:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.39.249 with HTTP; Tue, 26 Jul 2016 10:40:29 -0700 (PDT) In-Reply-To: References: <61DFB3E2-6E34-4EEA-8AC6-70094CEACA72@cyclaero.com> <9d0a3ad8-a66a-c527-3906-3290b8d58476@rlwinm.de> From: Michael Sierchio Date: Tue, 26 Jul 2016 10:40:29 -0700 Message-ID: Subject: Re: ipfw divert filter for IPv4 geo-blocking To: "freebsd-ipfw@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 17:40:31 -0000 On Tue, Jul 26, 2016 at 9:26 AM, Julian Elischer wrote= : table 1 { DE, NL } -> 10000, >> { US, UK } -> 10100 >> table 2 { CN, KO, TR } -> 20000 >> > why multiple tables? > if you load the table at once you can assign a country code as the > tablearg for every run of addresses. all in one table. I mentioned that in my earlier response - but if the point is to block entire countries (or any collection of CIDR blocks, for that matter), it's sufficient to have a whitelist table and a blacklist table. The table arg could also be a skipto rule number, right? And you can do policy-based routing, with the table arg as a FIB number. Passing the packet to userland via divert sockets was a brilliant idea in 2003. natd was pretty much the first NAT mechanism to properly handle ICMP error responses, too. --=20 "Well," Brahma said, "even after ten thousand explanations, a fool is no wiser, but an intelligent man requires only two thousand five hundred." - The Mah=C4=81bh=C4=81rata