]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
cloud-init: Remove importing DNS settings
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 19 Jan 2020 16:32:14 +0000 (16:32 +0000)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 19 Jan 2020 16:37:03 +0000 (16:37 +0000)
Those scripts used to import settings from the meta-data services
and wrote them to the local configuration files.

For the DNS settings and Amazon, this is no longer possible because
their DNS servers do not support DNSSEC at all. Therefore we default
to recursor mode.

To be consistent across cloud providers, we are doing the same for
Azure.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
src/initscripts/helper/aws-setup
src/initscripts/helper/azure-setup

index af6d24c8b4dc54f1a5577b32efc99523f34e31f5..cee78a2830045bf3ff0498f2268a8110ae0b676a 100644 (file)
@@ -115,9 +115,6 @@ import_aws_configuration() {
                fi
        fi
 
-       # Import any DNS server settings
-       eval $(/usr/local/bin/readhash <(grep -E "^DNS([0-9])=" /var/ipfire/ethernet/settings 2>/dev/null))
-
        # Import network configuration
        # After this, no network connectivity will be available from this script due to the
        # renaming of the network interfaces for which they have to be shut down
@@ -161,10 +158,6 @@ import_aws_configuration() {
                                # The gateway is always the first IP address in the subnet
                                local gateway="$(to_address $(( netaddress_num + 1 )))"
 
-                               # The AWS internal DNS service is available on the second IP address of the VPC
-                               local dns1="$(to_address $(( vpc_netaddress_num + 2 )))"
-                               local dns2=
-
                                (
                                        echo "RED_TYPE=STATIC"
                                        echo "RED_DEV=${interface_name}"
@@ -175,8 +168,6 @@ import_aws_configuration() {
                                        echo "RED_NETADDRESS=${netaddress}"
                                        echo "RED_BROADCAST=${broadcast}"
                                        echo "DEFAULT_GATEWAY=${gateway}"
-                                       echo "DNS1=${DNS1:-${dns1}}"
-                                       echo "DNS2=${DNS2:-${dns2}}"
                                ) >> /var/ipfire/ethernet/settings
 
                                # Import aliases for RED
index 86042a20483f1c60f8f0e9a154781c7379859420..d497c43b2e99f417387c5b9506a0501a3664d408 100644 (file)
@@ -138,9 +138,6 @@ import_azure_configuration() {
                fi
        fi
 
-       # Import any DNS server settings
-       eval $(/usr/local/bin/readhash <(grep -E "^DNS([0-9])=" /var/ipfire/ethernet/settings 2>/dev/null))
-
        # Import network configuration
        # After this, no network connectivity will be available from this script due to the
        # renaming of the network interfaces for which they have to be shut down
@@ -175,11 +172,6 @@ import_azure_configuration() {
                                # The gateway is always the first IP address in the subnet
                                local gateway="$(to_address $(( netaddress_num + 1 )))"
 
-                               # Microsoft uses a special IP address for DNS
-                               # https://blogs.msdn.microsoft.com/mast/2015/05/18/what-is-the-ip-address-168-63-129-16/
-                               local dns1="168.63.129.16"
-                               local dns2=
-
                                (
                                        echo "RED_TYPE=STATIC"
                                        echo "RED_DEV=${interface_name}"
@@ -190,8 +182,6 @@ import_azure_configuration() {
                                        echo "RED_NETADDRESS=${netaddress}"
                                        echo "RED_BROADCAST=${broadcast}"
                                        echo "DEFAULT_GATEWAY=${gateway}"
-                                       echo "DNS1=${DNS1:-${dns1}}"
-                                       echo "DNS2=${DNS2:-${dns2}}"
                                ) >> /var/ipfire/ethernet/settings
 
                                # Import aliases for RED