If no IPV6 address is present, disable that in the firewall to prevent errors during setup
This commit is contained in:
parent
9e6a8fcb14
commit
3a2bd32447
|
@ -186,6 +186,13 @@ if [ -z "$DISABLE_FIREWALL" ]; then
|
||||||
# Make sure the system has a default policy to accept incoming connections
|
# 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
|
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.
|
# Allow incoming connections to SSH.
|
||||||
ufw_allow ssh;
|
ufw_allow ssh;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue