Questions tagged [nevpnmanager]

NEVPNManager, delivered as part of the iOS & macOS SDK's, is used to create and manage VPN configurations and to control the resulting VPN tunnel connections.

Each macOS and iOS application is allowed to create a single VPN configuration it can make use of. The NEVPNManager singleton instance corresponds to a single VPN configuration as displayed in the VPN Settings panel in the Settings app on iOS and the Network Preferences pane in the System Preferences application in macOS.

86 questions
13
votes
1 answer

iOS VPN Connection Blocks Switching 4G to WiFi Connection

I am creating a VPN connection in Swift with the on demand connect rule below: let config = NEVPNProtocolIPSec() config.serverAddress = "" config.username = "" config.passwordReference = "" …
mTuran
  • 1,846
  • 4
  • 32
  • 58
13
votes
2 answers

Using NEVPNManager in iOS 8, How can I programmatically create VPN connections to custom VPN types? (e.g. Cisco any connect)

Looking at VPN configuration in apple's Configurator tool, it offers many different types of VPN, such as L2TP PPTP Cisco AnyConnect Juniper SSL Check Point Mobile VPN etc I'd like to create a custom VPN configuration programmatically using…
Orion Edwards
  • 121,657
  • 64
  • 239
  • 328
10
votes
2 answers

NEVPNManager check is connected after restart the app?

I coding a VPN tool, using the NetworkExtension framework. I can connect IPSec through NEVPNManager.sharedManager, and can grab the notification when VPN connect status changed. But when I kill the app, and reopen it, the NEVPNManager.Connect.Status…
7
votes
1 answer

PersistentRef of keychain item on macOS catalyst

Background I'm trying to build an app that connects to VPN using native IKEv2 implementation. The app should be built for iOS but run on macOS as well by using Catalyst platform. Situation When connecting to VPN using native IKEv2 implementation in…
hockeyman
  • 1,141
  • 6
  • 27
  • 57
5
votes
1 answer

Connect to a VPN with certificate - iOS/Swift

I am making a VPN connection that requires the certificate to authentication. The code below is how i set the configuration that VPN requires. The parameter identityData is where i put my certificate as Data. func setupVPN(){ guard let vpnManager =…
Pincha
  • 93
  • 1
  • 10
5
votes
1 answer

NEVPNManager Connect to VPN in Swift

I can't find a clear answer on how to do this, so that's why I created this thread. I'm developing a Swift application (Swift 2), where I want to connect with an VPN Server using a function. So I want to create a func connect() { //Handle the…
5
votes
1 answer

Error on NEVPNManager.saveToPreferencesWithCompletionHandler

My target platform is OS X 10.10 / Xcode 7.2 I'm trying to save the preference for NEVPNManager and I got an error in the domain=NEConfigurationErrorDomain: Error Domain = NEConfigurationErrorDomain Code = 10 "permission denied" UserInfo =…
YBW
  • 654
  • 2
  • 5
  • 10
4
votes
1 answer

NEVPNManager stop working with iOS 14 beta

I've tried to run my app on iOS 14 beta. It works fine on iOS 13 but can't connect to any server on iOS 14 beta. NEVPNManager.shared().connection.startVPNTunnel() doesn't throw any error and NEVPNStatus become .disconnected with any server that I…
4
votes
2 answers

iOS NETunnelProviderManager saving multiple configurations

I'm trying to save my VPN configuration to the preferences, which already works (I'm able to connect to my VPN). But for some reason each time i run the code again instead of using the last configuration it creates a new one. So, i end up with a…
4
votes
0 answers

How do I configure identityData of NEVPNProtocolIKEv2 with String certificate?

I using NetworkExtension framework to creating an application, it connect to VPN server via NEVPNProtocolIKEv2. After research, I found an tutorial about working with NetworkExtension framework, and I try to follow it.…
4
votes
1 answer

Is it possible to use the SSL protocol with NEVPNManager (and without using NETunnelProvider APIs)

My client would like me to write a VPN client for IOS (IOS 9.2). The VPN client is supposed to use SSL to connect to an openVPN server. I will be using the NEVPNManager class provided by apple (The NEVPNManager class has a class method…
bobbydev
  • 525
  • 3
  • 12
4
votes
2 answers

How to detect if NEVPNManager configuration is installed?

I am working with VPN on iOS using the NetworkExtension framework. I am able to install the config and make connection. My question is if there's a way to detect if the VPN config is still installed or detect if user has un-installed the config? I…
puru020
  • 808
  • 7
  • 20
3
votes
1 answer

iOS: Some apps seem to bypass NEPacketTunnelProvider. How to enforce it?

I am working on a NetworkExtension which uses the NEPacketTunnelProvider to provide VPN-like tunnel so I can modify the traffic. This works great for basically all the apps I tried so far, but Facebook Messenger seems to be able to ignore it. I…
Filip
  • 1,824
  • 4
  • 18
  • 37
3
votes
0 answers

Saving a VPN profile on NEVPNManager crashes due SecKeychain security

I'm getting suddenly a crash when trying to save my VPN profile. I believe this happens due to permission problems when accessing the keychain. Unlike iOS where I can delete the whole app on the simulator and fully reset it, on mac I don't seem to…
Houman
  • 64,245
  • 87
  • 278
  • 460
3
votes
1 answer

How to deactivate on demand connect VPN from network extension?

I have configured an always on VPN with a NEOnDemandRuleConnect I retrieve some user data from a backend such as expiration date if the user has paid the subscription. If it expires I'd like to deactivate the VPN without opening the main app, doing…
javierdemartin
  • 595
  • 6
  • 24
1
2 3 4 5 6