Bug 198045 - NETWORKING_IPV6 cannot disable IPv6
Summary: NETWORKING_IPV6 cannot disable IPv6
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
: 125587 134471 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-07-08 14:39 UTC by Vladimir Kotal
Modified: 2014-03-17 03:00 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-06-15 00:48:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
silly modprobe rules (158 bytes, text/plain)
2007-01-17 19:41 UTC, Bill Nottingham
no flags Details

Description Vladimir Kotal 2006-07-08 14:39:17 UTC
Description of problem:
NETWORKING_IPV6 is not able to disable IPv6

Version-Release number of selected component (if applicable):
initscripts-8.31.1-1

[techie@erazim ~]$ uname -a
Linux erazim.local.lab.devnull.cz 2.6.17-1.2139_FC5 #1 Fri Jun 23 12:40:16 EDT
2006 i686 athlon i386 GNU/Linux

How reproducible:
add following lines to /etc/sysconfig/network:

NETWORKING_IPV6=no
IPV6INIT=no

and reboot

Steps to Reproduce:
1. try to disable IPv6 via /etc/sysconfig/network
2. reboot
  
Actual results:
IPv6 addresses are still assigned to Ethernet interfaces (via IPv6
autoconfiguration)

Expected results:
IPv6 should be disabled after reboot if /etc/sysconfig/network says so.

Additional info:
As a workaround IPv6 can be disabled by putting following lines into
/etc/modprobe.conf:

alias net-pf-10 off
alias ipv6 off

Without those lines in /etc/modprobe.conf NETWORKING_IPV6=no in
/etc/sysconfig/network has no effect on the system (after reboot).

Comment 1 Bill Nottingham 2006-07-10 20:07:41 UTC
*** Bug 134471 has been marked as a duplicate of this bug. ***

Comment 2 Bill Nottingham 2006-07-10 20:07:57 UTC
*** Bug 125587 has been marked as a duplicate of this bug. ***

Comment 3 Bill Nottingham 2006-07-10 20:11:41 UTC
I wonder if it's simpler to deprecate NETWORKING_IPV6=no; I'm not sure that
dynamically modifying the module config at runtime is the right answer.

Comment 4 Miloslav Trmač 2006-07-10 20:40:00 UTC
*** Bug 134471 has been marked as a duplicate of this bug. ***

Comment 5 Vladimir Kotal 2006-07-10 20:42:41 UTC
And what about keeping NETWORKING_IPV6=no; and make it add ipv6 disable entries
to be added to /etc/modprobe.conf upon boot ?

Comment 6 Bill Nottingham 2006-07-10 21:05:18 UTC
Please re-read comment #3. :)

Comment 7 Bill Nottingham 2006-07-11 16:28:34 UTC
*** Bug 125587 has been marked as a duplicate of this bug. ***

Comment 8 Olivier Benghozi 2006-07-11 21:12:30 UTC
When ntps loads, it creates a PF_INET6 socket. At this time, ipv6 module is
automatically loaded unless /etc/modules.conf contains net-pf-10 off.
NETWORKING_IPV6=no is not concerned since it doesn't impact the kernel & modules
behavior.
Maybe Anaconda installer should ask if ipv6 has to be enabled in order to remove
a new by-default net-pf-10 off.
Or maybe NETWORKING_IPV6=no should makes rc.sysinit to add a net-pf-10 off if
it's not already present in modules.conf, and its absence or =yes do the contrary.

Comment 9 Thomas Antony 2006-07-11 21:41:41 UTC
I think this should handle rc.sysinit
When NETWORKING_IPV6=no is found in /etc/sysconfig/network, then rc.sysinit
should  create or modify a file like /etc/modprobe.d/ipv6 with the content alias
net-pf-10 off and alias ipv6 off

Comment 10 Bill Nottingham 2006-07-12 04:04:03 UTC
... and if your entire root FS is readonly? 

This should be something configured at the same time as NETWOKRING_IPV6, IMO.

Comment 11 Trevor Cordes 2006-10-29 23:34:02 UTC
Can someone tell me why after adding:
to /etc/modprobe.conf:
alias net-pf-10 off
alias ipv6 off
to /etc/sysconfig/network:
NETWORKING_IPV6=no

and reboot, ipv6 is still being loaded?  lsmod shows ipv6.  Named barfs all the
time on AAAA records (and causes "host" to output SERVFAILs).

How can I definitively disable ipv6?  Each rev of the OS this gets harder and
harder to do...


Comment 12 Trevor Cordes 2006-10-29 23:43:52 UTC
Ignore my last post comment #11, my dunce cap was still on.  Looks like the box
I was testing is ignoring reboot -f commands and so I thought it was rebooted
but it wasn't!  Another box I tested shows that the above solution does indeed
work.  Now to solve why a box ignores reboot -f!!


Comment 13 Bill Nottingham 2007-01-17 19:41:54 UTC
Created attachment 145855 [details]
silly modprobe rules

Try the attached - it's rather inefficient in that it has modprobe reading
shell config files, but it should work.

Comment 14 Olivier Benghozi 2007-01-20 17:22:11 UTC
(In reply to comment #13)
These modprobes rules work here.

Comment 15 Bill Nottingham 2007-04-16 22:56:19 UTC
OK. This may be in a future FC6 update, however, this is not going in future
releases. as sourcing a config file every time the ipv6 module is attempted to
be loaded is rather inefficient.

Comment 16 Ken Tanzer 2007-06-14 22:46:36 UTC
Can I ask what the current status of this bug is?  We've got an FC7 machine with
this same issue.  Also, are the modprobe lines mentioned in the opening comment
still the preferred workaround?  Thanks.

Comment 17 Bill Nottingham 2007-06-15 00:48:04 UTC
If you want to unilaterally disable it, you want:

install ipv6 /bin/true

in /etc/modprobe.d/<whatever>

If you want it to read NETWORKING_IPV6, something like comment #13 could work.
However, that's so inefficient for the common case that it's not really
practical for large scale deployment.

As this config option no longer exists in Fedora 7, closing.

Comment 18 IgnitedMind 2013-04-05 10:05:33 UTC
1. I had already made following entries in ifcfg-eth0 :
IPv6INIT=NO
IPV6AUTOCONF=NO
2. Following entries were made in /etc/modprob.conf” :
alias net-pf-10 off
alias ipv6 off
3. These entries in /etc/sysconfig/network :
IPV6INIT=NO
NETWORKING_IPV6=NO
4. This line is added to /etc/modprobe.d/blaclist :
blacklist ipv6
5. Also I did one more in /etc/sysctl.conf :
6. `net.ipv6.conf.all.autoconf = 0`
7. `net.ipv6.conf.accept_ra = 0`

Still I am unable to disable IPV6 on linux, any thought please

Comment 19 Trevor Cordes 2013-09-29 08:59:39 UTC
(In reply to IgnitedMind from comment #18)
> Still I am unable to disable IPV6 on linux, any thought please

It's not worth fighting any more.  Just give in to the dark side and allow IPv6.  The main reasons for disabling it (many daemons buggy) are mostly gone now.

What I do is leave it alone, do it the "Fedora way", and block all I/O on 6 with ip6tables:

$ip6tables -P INPUT	DROP
$ip6tables -P FORWARD	DROP
$ip6tables -P OUTPUT	DROP
$ip6tables -A INPUT  -i lo -j ACCEPT
$ip6tables -A OUTPUT -o lo -j ACCEPT

That way it will stay until ISPs start giving us working 6 addresses.  I think hell will freeze over before that happens.


Note You need to log in before you can comment on or make changes to this bug.