---
title: stopVPNTunnel()
framework: networkextension
role: symbol
role_heading: Instance Method
path: networkextension/nevpnconnection/stopvpntunnel()
---

# stopVPNTunnel()

Start the process of disconnecting the VPN.

## Declaration

```swift
func stopVPNTunnel()
```

## Discussion

Discussion This method returns immediately after starting the process of disconnecting the VPN. In order to be notified when the VPN is fully disconnected, register to observe the NEVPNStatusDidChangeNotification notification on the NEVPNConnection object and examine the status property when the notification is received.

## See Also

### Controlling the VPN connection

- [startVPNTunnel()](networkextension/nevpnconnection/startvpntunnel().md)
- [startVPNTunnel(options:)](networkextension/nevpnconnection/startvpntunnel(options:).md)
- [NEVPNConnectionStartOptionUsername](networkextension/nevpnconnectionstartoptionusername.md)
- [NEVPNConnectionStartOptionPassword](networkextension/nevpnconnectionstartoptionpassword.md)
