From 3a2bd32447e4b9f6ed9157353302665bee63a3b0 Mon Sep 17 00:00:00 2001 From: Michael Kroes Date: Sat, 12 Mar 2016 17:01:33 +0100 Subject: [PATCH] If no IPV6 address is present, disable that in the firewall to prevent errors during setup --- setup/system.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup/system.sh b/setup/system.sh index abf4b834..92f7941b 100755 --- a/setup/system.sh +++ b/setup/system.sh @@ -186,6 +186,13 @@ if [ -z "$DISABLE_FIREWALL" ]; then # Make sure the system has a default policy to accept incoming connections sed -i "s/DEFAULT_INPUT_POLICY.*/DEFAULT_INPUT_POLICY=\"ACCEPT\"/" /etc/default/ufw + # If IPV6 is disabled we should disable it in the ufw defaults + if [ -z "$PUBLIC_IPV6" ]; then + sed -i "s/IPV6.*/IPV6=no/" /etc/default/ufw + else + sed -i "s/IPV6.*/IPV6=yes/" /etc/default/ufw + fi + # Allow incoming connections to SSH. ufw_allow ssh;