Disable IPv6 in Fedora 23

  • Start with checking whether IPv6 is turned enabeld on your system or not. To check whether IPv6 is enabled or not use the following command:
  • cat /proc/sys/net/ipv6/conf/all/disable_ipv6.
  • To override the default settings add a new file in file in /etc/sysctl.d/ called something like 90-disable-IPv6.config. It is important that the override file has a higher lexical value than the default configuration file.
  • Add the following lines to your new configuration file:
    net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1
  • Then save the file.
  • To enable the new configuration use the following command to reload system configuration from file again:
  • sudo sysctl --system
  • You will now see something like this as a result:
  • * Applying /usr/lib/sysctl.d/00-system.conf ... * Applying /usr/lib/sysctl.d/10-default-yama-scope.conf ... kernel.yama.ptrace_scope = 0 * Applying /usr/lib/sysctl.d/50-coredump.conf ... kernel.core_pattern = |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %e * Applying /usr/lib/sysctl.d/50-default.conf ... kernel.sysrq = 16 kernel.core_uses_pid = 1 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.all.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.default.promote_secondaries = 1 net.ipv4.conf.all.promote_secondaries = 1 net.core.default_qdisc = fq_codel fs.protected_hardlinks = 1 fs.protected_symlinks = 1 * Applying /usr/lib/sysctl.d/60-libvirtd.conf ... fs.aio-max-nr = 1048576 * Applying /etc/sysctl.d/90-disableipv6.conf ... net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 * Applying /etc/sysctl.d/99-sysctl.conf ... * Applying /etc/sysctl.conf ...
  • Finally check that IPv6 is disabled:
  • cat /proc/sys/net/ipv6/conf/all/disable_ipv6 1
  • If you run ifconfig you should also see that only inet (IPv4) addresses are enabled for all of your nic's.
English