Skip to main content
Topic: IPv6 localhost. How to disable? (Read 641 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

IPv6 localhost. How to disable?

Hello I disabled an IPv6 from Grub (/etc/default/grub) with
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet splash"
but I still get an an IPv6 address when running a command
Code: [Select]
$ host localhost
localhost has address 127.0.0.1
localhost has IPv6 address ::1
Host localhost not found: 3(NXDOMAIN)
and
Code: [Select]
$ getent host *username*
::1             *username*
Anyone knows why and how to disable an IPv6 address on a localhost?

Re: IPv6 localhost. How to disable?

Reply #1
Did you regenerate the grub.cfg after making your edit ?
Code: [Select]
grub-mkconfig -o /boot/grub/grub.cfg

Re: IPv6 localhost. How to disable?

Reply #2
Yes, I did that.

Re: IPv6 localhost. How to disable?

Reply #3
Check /etc/hosts.

Re: IPv6 localhost. How to disable?

Reply #4
Code: [Select]
# Standard host addresses
127.0.0.1  localhost
#::1        localhost ip6-localhost ip6-loopback
#ff02::1    ip6-allnodes
#ff02::2    ip6-allrouters
# This host address
127.0.1.1  username


Re: IPv6 localhost. How to disable?

Reply #6

How about:

Code: [Select]
inxi -Nixz
"Wer alles kann, macht nichts richtig"

Artix USE="runit openrc slim openbox lxde gtk2 qt4 qt5 qt6 conky
-gtk3 -gtk4 -adwaita{cursors,themes,icons} -gnome3 -kde -plasma -wayland "

Re: IPv6 localhost. How to disable?

Reply #7
Code: [Select]
~$ cat /proc/cmdline
artix:[artix]:~$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-linux root=*UUID* rw net.ifnames=0 ipv6.disable=1 quiet resume=*UUID* acpi_enforce_resources=lax lsm=landlock,lockdown,yama,integrity,apparmor,bpf ipv6.disable=1
Code: [Select]
Network:
  Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel bus-ID: 04:00.0
  IF: wlan0 state: down mac: <filter>
  Device-2: Intel I211 Gigabit Network vendor: Gigabyte driver: igb
    v: kernel port: e000 bus-ID: 05:00.0
  IF: eth0 state: down mac: <filter>
  Device-3: Realtek RTL8125 2.5GbE vendor: Gigabyte driver: r8169 v: kernel
    port: d000 bus-ID: 06:00.0
  IF: eth1 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
  IF-ID-1: tun0 state: unknown speed: 10000 Mbps duplex: full mac: N/A
  IP v4: <filter> scope: global
  WAN IP: <filter>


Re: IPv6 localhost. How to disable?

Reply #9
Code: [Select]
$ host localhost
localhost has address 127.0.0.1
localhost has IPv6 address ::1
Host localhost not found: 3(NXDOMAIN)
1. What's your init? Is it OpenRC?
2. What's your resolver?
1. OpenRc
2. How do I check it? I use portmaster where I can change my DNS provider.