[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Permanent Use of IPv4



On Fri 15 Feb 2019 at 14:03:47 (-0500), Stephen P. Molnar wrote:
> On 02/15/2019 12:11 PM, Felix Miata wrote:
> > Reco composed on 2019-02-15 19:48 (UTC+0300):
> > > On Fri, Feb 15, 2019 at 11:17:06AM -0500, Felix Miata wrote:
> > > > I made ipv6.disable=1 a standard option here at least as far back as 2011. If it ever caused a
> > > > problem I never found out about it.
> > > That's a fine example of "works for me" approach.
> > > And I've seen multiple cases where "disable IPv6" equaled "non-booting OS".
> > Maybe I left out an important point, which is that "for me" means hundreds of installations
> > including most of the historically most popular distros, Debian, *buntu, Mint, Fedora, openSUSE,
> > Mageia, Gentoo and a few others.
> > 
> > I have a hard time imagining a dependency on ipv6 to be able to boot, even including thin client or
> > PXE, but then I don't know anything of any prospect of booting from outside a firewall where ipv6
> > might be a sole option.
> Thanks for all of the responses.
> 
> I elected to go with;
> 
> echo 'net.ipv6.conf.all.disable_ipv6 = 1' > /etc/sysctl.d/noipv6.conf
> 
> which did, indeed, result in the file being created.
> 
> However, there is only one problem, it didn't work.

Creating the file doesn't do anything on its own as the kernel doesn't
know you created it. It will be read at the next boot, but for
immediate effect, you need to tell the kernel with

   sysctl -w net.ipv6.conf.all.disable_ipv6=1

> This is what I get:
> 
> root@AbNormal:/home/comp# ip a
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
> group default qlen 1
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>     inet 127.0.0.1/8 scope host lo
>        valid_lft forever preferred_lft forever
> 2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
> state UP group default qlen 1000
>     link/ether bc:ee:7b:5e:83:36 brd ff:ff:ff:ff:ff:ff
>     inet 192.168.1.123/24 brd 192.168.1.255 scope global dynamic enp2s0
>        valid_lft 86306sec preferred_lft 86306sec
>     inet6 2600:1700:4280:3690::2b/128 scope global dynamic
>        valid_lft 3506sec preferred_lft 3506sec
>     inet6 2600:1700:4280:3690:a445:78de:cff9:22d5/64 scope global
> temporary dynamic
>        valid_lft 3538sec preferred_lft 3538sec
>     inet6 2600:1700:4280:3690:beee:7bff:fe5e:8336/64 scope global
> mngtmpaddr noprefixroute dynamic
>        valid_lft 3538sec preferred_lft 3538sec
>     inet6 fe80::beee:7bff:fe5e:8336/64 scope link
>        valid_lft forever preferred_lft forever
> 
> Also,  /proc/cmdline is empty.
> 
> Now, if I run the file manually, as I have been doing, I get:
> 
> root@AbNormal:/home/comp# ./Disable_ipv6
> net.ipv6.conf.all.disable_ipv6 = 1
> root@AbNormal:/home/comp# ip a
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
> group default qlen 1
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>     inet 127.0.0.1/8 scope host lo
>        valid_lft forever preferred_lft forever
> 2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
> state UP group default qlen 1000
>     link/ether bc:ee:7b:5e:83:36 brd ff:ff:ff:ff:ff:ff
>     inet 192.168.1.123/24 brd 192.168.1.255 scope global dynamic enp2s0
>        valid_lft 86274sec preferred_lft 86274sec
> root@AbNormal:/home/comp#

Precisely. Now you've told the kernel.

Cheers,
David.


Reply to: