From 7bc10ebc7a9ac7f3f17f1cedbc5d55ea82a47e3e Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Tue, 9 Apr 2013 23:21:43 -0700 Subject: [PATCH] Fix X11 forwarding (broken by no IPv6) for real --- util/install.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/util/install.sh b/util/install.sh index 21c3976..255ca3c 100755 --- a/util/install.sh +++ b/util/install.sh @@ -491,7 +491,14 @@ function other { # Mininet: disable IPv6 net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 -net.ipv6.conf.lo.disable_ipv6 = 1' | sudo tee /etc/sysctl.conf > /dev/null +net.ipv6.conf.lo.disable_ipv6 = 1' | sudo tee -a /etc/sysctl.conf > /dev/null + fi + # Disabling IPv6 breaks X11 forwarding via ssh + line='AddressFamily inet' + file='/etc/ssh/sshd_config' + echo "Adding $line to $file" + if ! grep "$line" $file > /dev/null; then + echo "$line" | sudo tee -a $file > /dev/null fi # Enable command auto completion using sudo; modify ~/.bashrc: