<!--
{
  "availability" : [
    "macOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Virtualization",
  "identifier" : "/documentation/Virtualization/VZNATNetworkDeviceAttachment",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Virtualization"
    ],
    "preciseIdentifier" : "c:objc(cs)VZNATNetworkDeviceAttachment"
  },
  "title" : "VZNATNetworkDeviceAttachment"
}
-->

# VZNATNetworkDeviceAttachment

A device that routes network requests through the host computer and performs network address translation on the resulting packets.

```
class VZNATNetworkDeviceAttachment
```

## Overview

A [`VZNATNetworkDeviceAttachment`](/documentation/Virtualization/VZNATNetworkDeviceAttachment) works with the host computer to perform network address translation (NAT) on the guest system’s network packets, and then route those packets to outside networks. Use this attachment to give the guest system indirect access to external networks, instead of direct access through a shared physical network interface.

To configure a network device with a NAT attachment:

1. Create the [`VZNATNetworkDeviceAttachment`](/documentation/Virtualization/VZNATNetworkDeviceAttachment) object.
2. Assign the attachment object to the [`attachment`](/documentation/Virtualization/VZNetworkDeviceConfiguration/attachment) property of a [`VZVirtioNetworkDeviceConfiguration`](/documentation/Virtualization/VZVirtioNetworkDeviceConfiguration) object.
3. Add the [`VZVirtioNetworkDeviceConfiguration`](/documentation/Virtualization/VZVirtioNetworkDeviceConfiguration) object to the [`networkDevices`](/documentation/Virtualization/VZVirtualMachineConfiguration/networkDevices) property of your [`VZVirtualMachineConfiguration`](/documentation/Virtualization/VZVirtualMachineConfiguration).

This attachment doesn’t require your app to have the <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.vm.networking> entitlement.

## Topics

### Creating the Attachment Point

[`init()`](/documentation/Virtualization/VZNATNetworkDeviceAttachment/init())

Creates an attachment that performs network address translation on the guest system’s network packets.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)