From a7ad7390366acbd0963ae6c02069d608ea507d98 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Wed, 17 Dec 2014 13:49:12 -0800 Subject: [PATCH] Disable IPv6 via grub command line Unfortunately disabling IPv6 via sysctl doesn't actually disable it on all of the interfaces by default. Disabling it via grub disables it entirely in the VM. Helps with #454 --- util/install.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/util/install.sh b/util/install.sh index d7f7137..4962aea 100755 --- a/util/install.sh +++ b/util/install.sh @@ -554,9 +554,9 @@ function vm_other { # BLACKLIST=/etc/modprobe.d/blacklist #fi #sudo sh -c "echo 'blacklist net-pf-10\nblacklist ipv6' >> $BLACKLIST" - + echo "Disabling IPv6" # Disable IPv6 - if ! grep 'disable IPv6' /etc/sysctl.conf; then + if ! grep 'disable_ipv6' /etc/sysctl.conf; then echo 'Disabling IPv6' echo ' # Mininet: disable IPv6 @@ -564,6 +564,13 @@ net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1' | sudo tee -a /etc/sysctl.conf > /dev/null fi + # Since the above doesn't disable neighbor discovery, also do this: + if ! grep 'ipv6.disable' /etc/default/grub; then + sudo sed -i -e \ + 's/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1/' \ + /etc/default/grub + sudo update-grub + fi # Disabling IPv6 breaks X11 forwarding via ssh line='AddressFamily inet' file='/etc/ssh/sshd_config'