From owner-freebsd-questions@freebsd.org Tue Feb 18 14:00:39 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 11E2B23A40C for ; Tue, 18 Feb 2020 14:00:39 +0000 (UTC) (envelope-from hamdi20193d@gmail.com) Received: from mail-vs1-xe29.google.com (mail-vs1-xe29.google.com [IPv6:2607:f8b0:4864:20::e29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48MMvB1LYDz4FQQ for ; Tue, 18 Feb 2020 14:00:37 +0000 (UTC) (envelope-from hamdi20193d@gmail.com) Received: by mail-vs1-xe29.google.com with SMTP id r18so13028759vso.5 for ; Tue, 18 Feb 2020 06:00:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4c/AEo5qAtZmpuJjj0fH1qDhbkmesTH2MsNx/uKxXYo=; b=rRoaZMf5oJYtITrgUjgz/nPm7O6h5kDzZSiryxkEklgJuW6l/GjYy5Ba605cfWp0kA QW3dVkJUP93stQTM6Tx3hfHdOMKlLeS8I0AwMK2j3svA5wFw9dgN+LgGIGhcpP8KW2He EtAUWN/L06r2d2qMxbR21VsCNKpJLPgG+Irlh3Brebn1XmtvJTpR3kGP12KM5oe7XZM2 N1Nt8lbMa8PNteZ72G2ZD/QgH6wBk+oD0vAR3DboVO5lGqmWrxvJuqdQ4fcY+tgYbHdH j5T8gutX51TbPtoAjG85YB0DiOafx4ys0bMHB9gCsaG+fQ24RQUYhlsZvV+TDDSqoCKI cyYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4c/AEo5qAtZmpuJjj0fH1qDhbkmesTH2MsNx/uKxXYo=; b=qiiLFcMA41ZuFDb79El5Zq8AH8uGb7MYBNfGKn8H1KONrP/ss34g/ELxjtCGSCbWEb 8RRN2TYBoBGmMaqotQJfk7YZyXgll44yL268t1lTOWaV82G9ipM713WLNohIHqS5cbIk QBfu4tBk4HOzKQEGy6Co6JvvECz7/hufCQ05c4eSVaWxcnQmncdUIL+Bg6P3KALSHw0N wCjfAgI20XnRpgawuFooLCuZT4fisBSIQ6gNXCcyG1krSBLm+zFw1DFGSNNCvjTMFb75 tKBf4IsQV5zdjpuPfh7fBnTZcLoENF8faSesotcyzhJCUls+X0neYJ2Lw3P88tcCprJE Hhkg== X-Gm-Message-State: APjAAAUt+6KAGPKy+zIA0GvE+m/EbaMkcAUoeZDXsdVrJfCgi8G6/Ii0 KMOz6ivKNxrLLIkEFBhYBQAliqg/0gxo7CepeUE= X-Google-Smtp-Source: APXvYqx9lxPRsXUSkl0cJXt4haaKd3akNpjMq/42NCKH3ggYE8szqqvp3Zyy/bgO1WHxjxeL5n8FVr9kWh6nUUXTOLI= X-Received: by 2002:a67:2f06:: with SMTP id v6mr10674188vsv.12.1582034436888; Tue, 18 Feb 2020 06:00:36 -0800 (PST) MIME-Version: 1.0 References: <9585fce4-b48d-a210-d62f-a2100c0cf929@tundraware.com> <24139.58932.915276.752500@jerusalem.litteratus.org> In-Reply-To: <24139.58932.915276.752500@jerusalem.litteratus.org> From: Andreas X Date: Tue, 18 Feb 2020 17:00:25 +0300 Message-ID: Subject: Re: Blacklist IP file for IPFW? To: Robert Huff Cc: =?UTF-8?Q?Trond_Endrest=C3=B8l?= , Tim Daneliuk , FreeBSD Mailing List X-Rspamd-Queue-Id: 48MMvB1LYDz4FQQ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=rRoaZMf5; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of hamdi20193d@gmail.com designates 2607:f8b0:4864:20::e29 as permitted sender) smtp.mailfrom=hamdi20193d@gmail.com X-Spamd-Result: default: False [-1.00 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; URI_COUNT_ODD(1.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (-9.50), ipnet: 2607:f8b0::/32(-1.89), asn: 15169(-1.68), country: US(-0.05)]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[9.2.e.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; SUBJECT_ENDS_QUESTION(1.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Feb 2020 14:00:39 -0000 Hello Robert, Thanks for your reply. Sure, here's the entire IPFW ruleset: https://hastepaste.com/view/PqDX5sl (allow IPs are just Cloudflare's IPs) Please see the line: 00350 15 882 deny ip from table(1) to any (BANS the IPs from table 1 successfully) BUT if that line would be: 65500 15 882 deny ip from table(1) to any (It doesn't ban anything) Thank you all, Regards. Robert Huff , 18 =C5=9Eub 2020 Sal, 16:27 tarihinde =C5= =9Funu yazd=C4=B1: > > Andreas X writes: > > > Question is: If I don't add the rule number 00350 to that command, > > that rule gets located to 65000s, and ipfw doesn't block the IPs in > > table, at all. I wanted to ask why such react, shouldn't IPFW still > > do the job (deny) even if the rule number belongs to last ones? > > I am not an IPFW expert ... but: > It is my understanding IPFW stops processing a packet after the > first rule that matches that packet. Am I wrong? > If not, this suggests somewhere between rule 351 and rule > 650000(-ish) is a rule that matches the packet and keeps it from > getting processed by anything lower in the list. > Would you be willing to publish your entire IPFW ruleset? > > > > Respectfully, > > > Robert Huff > >