From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 96A5C1389E2 for ; Tue, 30 Dec 2014 10:27:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 86B99E09B1; Tue, 30 Dec 2014 10:27:20 +0000 (UTC) Received: from mail0200.smtp25.com (mail0200.smtp25.com [174.37.170.200]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 726E9E096C for ; Tue, 30 Dec 2014 10:27:19 +0000 (UTC) Received: from ccs.covici.com (s-out-001.smtp25.com [67.228.91.90]) by s-out-001.smtp25.com (8.14.9/8.14.9) with ESMTP id sBUARHDd009559 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 30 Dec 2014 05:27:17 -0500 Received: from ccs.covici.com (localhost [127.0.0.1]) by ccs.covici.com (8.14.9/8.14.8) with ESMTP id sBUARG2s009343 for ; Tue, 30 Dec 2014 05:27:16 -0500 From: covici@ccs.covici.com To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Disable IPv6 on specific interface In-reply-to: <201412300939.45311.michaelkintzios@gmail.com> References: <87zja5g6l5.fsf@riaqn.com> <201412300939.45311.michaelkintzios@gmail.com> Comments: In-reply-to Mick message dated "Tue, 30 Dec 2014 09:39:35 +0000." X-Mailer: MH-E 8.5; nmh 1.6; GNU Emacs 23.4.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9339.1419935236.1@ccs.covici.com> Content-Transfer-Encoding: quoted-printable Date: Tue, 30 Dec 2014 05:27:16 -0500 Message-ID: <9340.1419935236@ccs.covici.com> X-SpamH-OriginatingIP: 70.109.53.110 X-SpamH-Filter: s-out-001.smtp25.com-sBUARHDd009559 X-Archives-Salt: bd4e7d7c-32ef-4a1b-9bb3-342ca4286129 X-Archives-Hash: 6cab2d0cdb23884a4130d8a3c8455cdb Mick wrote: > On Tuesday 30 Dec 2014 03:27:34 Zesen Qian wrote: > > Hello list, > > Sorry for hijacking Rich's thread, resend here. > > I want to disable IPv6 on an certain interface, a simple google > > tell me to add one line to /etc/sysctl.d/local.conf > > net.ipv6.conf.enp4s0.disable_ipv6=3D1 > > Simple enough, but the problem I have is that both ipv6 and the > > dirver of the network card(tg3) is loaded by modules. They 're not > > loaded when the service sysctl is started, so there's no entry > > named "net.ipv6.conf.enp4s0", which make sysctl not working. > > So my question is that, is there any way to disable IPv6 on > > specific interface, as early as I can? I want to make it early > > because I don't want to receive any RA to mess up my route table. > > I guess just adding sysctl to preup() in /etc/conf.d/net should do > > the trick, but may I make it earlier? > > Any comment is appreciated. > = > = > Unless the kernel knows of the enp4s0 interface and therefore lists it u= nder = > sysctl, I can't see how it can be disabled. You could try disabling IPv= 6 = > altogether in the kernel, but this may not be what you want to achieve. > = > Alternatively, have a look with modinfo in the module options in the unl= ikely = > chance that the module has some option which disables IPv6 functionality= . You may be able to use the feature of modprobe that executes a command when the module loads and that way disable the ipv6 interface. I have not tried this myself. -- = Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici covici@ccs.covici.com