Skip to content

Instantly share code, notes, and snippets.

@midlan
Last active August 9, 2023 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save midlan/30f99c11d509497595773fc82fcc24b2 to your computer and use it in GitHub Desktop.
Save midlan/30f99c11d509497595773fc82fcc24b2 to your computer and use it in GitHub Desktop.
# disable ipv6 at all
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.tun0.disable_ipv6 = 1

grub (works best)

Edit file /etc/default/grub and append ipv6.disable=1 to GRUB_CMDLINE_LINUX variable. After that, run update-grub2 and reboot.

sysctl

May not work 100%. See grub solution.

go and create file /etc/sysctl.d/10-local.conf with content

# disable ipv6 at all
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.tun0.disable_ipv6 = 1

or just exec:

curl https://gist.githubusercontent.com/midlan/30f99c11d509497595773fc82fcc24b2/raw/10-disable-ipv6.conf > /etc/sysctl.d/10-local.conf

exim4

go to file /etc/exim4/update-exim4.conf.conf and remove ::1 from dc_local_interfaces option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment