diff --git a/xos/services/vpn/models.py b/xos/services/vpn/models.py
index 33fb429..0925239 100644
--- a/xos/services/vpn/models.py
+++ b/xos/services/vpn/models.py
@@ -1,6 +1,6 @@
 from core.models import Service, TenantWithContainer
 from django.db import transaction
-from typing import Mapping, Tuple
+from typing import Mapping
 
 VPN_KIND = "vpn"
 
@@ -62,35 +62,36 @@
 
     @property
     def addresses(self):
-        """Mapping[str, Tuple[str, str, str]]: The ip, mac address, and subnet of networks of this Tenant."""
+        """Mapping[str, str]: The ip, mac address, and subnet of the NAT network of this Tenant."""
         if (not self.id) or (not self.instance):
             return {}
 
         addresses = {}
-        # The ports field refers to networks for the instance.
-        # This loop stores the details for the NAT network that will be
-        # necessary for ansible.
         for ns in self.instance.ports.all():
             if "nat" in ns.network.name.lower():
-                addresses["nat"] = (ns.ip, ns.mac, ns.network.subnet)
+                addresses["ip"] = ns.ip
+                addresses["mac"] = ns.mac
+                addresses["subnet"] = ns.network.subnet
+                break
+
         return addresses
 
     # This getter is necessary because nat_ip is a sync_attribute
     @property
     def nat_ip(self):
         """str: The IP of this Tenant on the NAT network."""
-        return self.addresses.get("nat", (None, None, None))[0]
+        return self.addresses.get("ip", None)
 
     # This getter is necessary because nat_mac is a sync_attribute
     @property
     def nat_mac(self):
         """str: The MAC address of this Tenant on the NAT network."""
-        return self.addresses.get("nat", (None, None, None))[1]
+        return self.addresses.get("mac", None)
 
     @property
     def subnet(self):
         """str: The subnet of this Tenant on the NAT network."""
-        return self.addresses.get("nat", (None, None, None))[2]
+        return self.addresses.get("subnet", None)
 
     @property
     def server_address(self):
