From owner-freebsd-net@freebsd.org Tue Jun 18 19:32:54 2019 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C99E015C6A5D; Tue, 18 Jun 2019 19:32:53 +0000 (UTC) (envelope-from andrnils@gmail.com) Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) (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 7E9C38B316; Tue, 18 Jun 2019 19:32:52 +0000 (UTC) (envelope-from andrnils@gmail.com) Received: by mail-lj1-x242.google.com with SMTP id h10so774795ljg.0; Tue, 18 Jun 2019 12:32:52 -0700 (PDT) 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=M0sFPlfv4Z/VGkh7qnp/sGyFrAW8U9le6yEm2UTAdvg=; b=PlvrXfqmghn2I7sgCSrr35t5E1na7U02Z8nSiHxZ7vavFOOjZJWr3Tg3vkInHb12fY Cv4OPkA9KukTrOSkLADvgU4a2mkBavHpYX/1a/tFdkPW7chyTGKsltlzYeuHaPBjR/LY cxaZh5uu1dAinV4BvtpRCvrGnolnS+3KZYed9nUcW6aR51vXE6WbYiUGZI8SUtuR7+ok 2jNdQqn+nYnqx8mJJW1zU4F3Wn8lI6os461yZQAAtpomdNu+b7RyIML0py+HYNi4Qs6h Xyn3bPyRn4ePYkRl17qU7PyNkG8S0ljR7vFVafcgK3CWeSKGc6ENn7n3t2KQiwbxG7du L/Yw== 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=M0sFPlfv4Z/VGkh7qnp/sGyFrAW8U9le6yEm2UTAdvg=; b=WWlZwkUZM86VoOIOVWk2G0sJb4cxaA9IiWXVj2x4YW50s8ckaTLgQq0GbqHp+SaQmt RtPFq38k3cBIy6nJCHtMKCsHH6kodAJ8Z4cCzpicaPrESBH36FZZkD/6XFL+ePLPL3GN 0k5VnHa15e7ztKrROIbfFs6Yx0F+/0tW1aSFboiLDrPMsIf9cs7ekpTJbWE7h3m0nfP4 ELepgdb2IwEigZ7WZGJJNYkYHojIrwHiVR4TV0OpOBzfg4RBhrhLWsUZvsBan4gwoWTS UXM6EhtEpmZCCKvAyG+ET8m3uXieRiur8r8F9FoeTA2JjQI2yfVNhvBVTHVxNZQVLXi1 CbxQ== X-Gm-Message-State: APjAAAUvchaCzKc+uX2MuTsw+o3KBMNuIsUpR0CSJZIo2YhOFa80bH/Z ptkXTChDcgKDk9ollQDdnpjoqdvfyRWv9RUzV1k= X-Google-Smtp-Source: APXvYqwZGuVoA9jBwOwTDM2yQoGKJsCahU9VemUp1UAzlTPV8u5GE+bLKfWFdMl3NVTTMBcj5Vf6xO0hVEV8zcYLI5c= X-Received: by 2002:a2e:124b:: with SMTP id t72mr55885055lje.143.1560886371001; Tue, 18 Jun 2019 12:32:51 -0700 (PDT) MIME-Version: 1.0 References: <23658.1560885960@segfault.tristatelogic.com> In-Reply-To: <23658.1560885960@segfault.tristatelogic.com> From: Andreas Nilsson Date: Tue, 18 Jun 2019 21:32:39 +0200 Message-ID: Subject: Re: Eliminating IPv6 (?) To: "Ronald F. Guilmette" Cc: FreeBSD Net , Mailinglists FreeBSD X-Rspamd-Queue-Id: 7E9C38B316 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=PlvrXfqm; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of andrnils@gmail.com designates 2a00:1450:4864:20::242 as permitted sender) smtp.mailfrom=andrnils@gmail.com X-Spamd-Result: default: False [-3.14 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.75)[-0.747,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; SUBJECT_HAS_QUESTION(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; IP_SCORE(-0.39)[ip: (2.93), ipnet: 2a00:1450::/32(-2.49), asn: 15169(-2.32), country: US(-0.06)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2.4.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; HTTP_TO_IP(1.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jun 2019 19:32:54 -0000 On Tue, Jun 18, 2019 at 9:27 PM Ronald F. Guilmette wrote: > In message P6ukXfA4ZThTRZWNXtpZi3BA@mail.gmail.com> > Andreas Nilsson wrote: > > >I have no ipv6 rules in ipfw when configuring rc.conf as: > > > >firewall_enable="YES" > >firewall_script="/etc/ipfw.rules". > > I don't know what to say, other than that this was not my experience. > > When I first noiced that /etc/rc.firewall was injecting rules into ipfw, > prior to my own set of explicitly specified rules, I went into the > script and edited it to try to cause it to stop doing at least some > of this (unwanted) behavior. For example, please note the lines in > the following function which have been commented out: > > setup_loopback() { > ############ > # Only in rare cases do you want to change these rules > # > ${fwcmd} add 100 pass all from any to any via lo0 > # ${fwcmd} add 200 deny all from any to 127.0.0.0/8 > # ${fwcmd} add 300 deny ip from 127.0.0.0/8 to any > # if [ $ipv6_available -eq 0 ]; then > # ${fwcmd} add 400 deny all from any to ::1 > # ${fwcmd} add 500 deny all from ::1 to any > # fi > } > > Commenting out the lines shown above (as commented out) *did* make a > difference. > > To be crystal clear, I found that even when I was explicitly requesting > that my own custom rule set be used, as per the instructions in the > Handbook (and as I have been doing already for lo these many years) > I found that "ipfw -a list" was showing that I was getting several > additional rules (which I personally DID NOT specify in my rules file) > and these additional rules were appearing in the output of "ipfw -a list" > AHEAD OF my own explicitly specified rules. I traced this down and > quickly saw that these additional rules could only have come from the > (now commented out) lines shown above. After I had commented those > lines out of the /etc/rc.firewall script an rebooted the system, the > rules in question no longer were visible in the output of "ipfw -a list". > > I also made one other local change to the /etc/rc.firewall script, which is > illustrated by the following (locally revised) code snippet: > But why are you even running rc.firewall if it does not do what you want? Just set firewall_script="/path/to/script" and your good to go, no ipv6 anywhere to be found. > > afexists inet6 > #ipv6_available=$? > # disable creation of any/all IPv6 rules > ipv6_available=1 > > I can't remember anymore now if this had the desired effect or not. It > certainly didn't seem to hurt anything, at least from my personal > perspective. (But please remember, I am striving to -not- use IPv6 > at all.) > > Even with these multiple changes, the /etc/rc.firewall script is *still* > injecting its own "pass all from any to any via lo0" rule ahead of my > own explicitly specified rules. (See the setup_loopback() function above.) > > I do not have any objection to that perfectly sensible rule, so I did not > comment out the specific line of /etc/rc.firewall where that is added, > ahead > of all user-specified rules. But the point remains that /etc/rc.firewall > *is* injecting its own rules, even when the user has followed the > Handbook's > prescription for how to take complete control of his/her own IPFW rule > writing. > > > Regards, > rfg > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >