diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc
index 16ce8d04b9..2ff3358fdc 100644
--- a/src/etc/inc/interfaces.inc
+++ b/src/etc/inc/interfaces.inc
@@ -7497,12 +7497,14 @@ function get_interface_addresses($interface) {
 	}
 
 	if ($v6addrs) {
-		// use the first IPv6 GUA address if one exists, otherwise the first address
+		// use the first valid IPv6 GUA address if one exists, otherwise the first address
 		$v6addr = $v6addrs[array_key_first($v6addrs)];
 		foreach ($v6addrs as $addr) {
 			if (is_v6gua($addr['addr'])) {
 				$v6addr = $addr;
-				break;
+				if (!is_v6deprecated($addr['addr'])) {
+					break;
+				}
 			}
 		}
 		$ifaddrs['ipaddr6'] = $v6addr['addr'];
diff --git a/src/etc/inc/util.inc b/src/etc/inc/util.inc
index c2c82fb9f9..80e65b5739 100644
--- a/src/etc/inc/util.inc
+++ b/src/etc/inc/util.inc
@@ -939,6 +939,26 @@ function is_v6gua(string $ip_or_subnet): bool {
 	}
 }
 
+/**
+ * Checks if an IPv6 address is deprecated.
+ * 
+ * @param string $ip IPv6 address or subnet
+ * 
+ * @return bool
+ */
+function is_v6deprecated(string $ip_or_subnet): bool {
+	if (is_subnet($ip_or_subnet) == 6) {
+		list($ip_or_subnet) = explode('/', $ip_or_subnet);
+	}
+	if (!is_ipaddrv6($ip_or_subnet)) {
+		return false;
+	}
+	$ip_or_subnet = Net_IPv6::Compress($ip_or_subnet);
+	$ifconfig = [];
+	exec("/sbin/ifconfig -au inet6", $ifconfig);
+	return (preg_grep("/inet6 {$ip_or_subnet}.*deprecated/", $ifconfig) != false);
+}
+
 /* same as is_subnet() but accepts IPv4 only */
 function is_subnetv4($subnet) {
 	return (is_subnet($subnet) == 4);
