Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Disable IPv6 on specific interface
Date: Tue, 30 Dec 2014 09:39:59
Message-Id: 201412300939.45311.michaelkintzios@gmail.com
In Reply to: [gentoo-user] Disable IPv6 on specific interface by Zesen Qian
1 On Tuesday 30 Dec 2014 03:27:34 Zesen Qian wrote:
2 > Hello list,
3 > Sorry for hijacking Rich's thread, resend here.
4 > I want to disable IPv6 on an certain interface, a simple google
5 > tell me to add one line to /etc/sysctl.d/local.conf
6 > net.ipv6.conf.enp4s0.disable_ipv6=1
7 > Simple enough, but the problem I have is that both ipv6 and the
8 > dirver of the network card(tg3) is loaded by modules. They 're not
9 > loaded when the service sysctl is started, so there's no entry
10 > named "net.ipv6.conf.enp4s0", which make sysctl not working.
11 > So my question is that, is there any way to disable IPv6 on
12 > specific interface, as early as I can? I want to make it early
13 > because I don't want to receive any RA to mess up my route table.
14 > I guess just adding sysctl to preup() in /etc/conf.d/net should do
15 > the trick, but may I make it earlier?
16 > Any comment is appreciated.
17
18
19 Unless the kernel knows of the enp4s0 interface and therefore lists it under
20 sysctl, I can't see how it can be disabled. You could try disabling IPv6
21 altogether in the kernel, but this may not be what you want to achieve.
22
23 Alternatively, have a look with modinfo in the module options in the unlikely
24 chance that the module has some option which disables IPv6 functionality.
25
26 --
27 Regards,
28 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Disable IPv6 on specific interface Zesen Qian <gentoo-user@×××××.com>
Re: [gentoo-user] Disable IPv6 on specific interface covici@××××××××××.com