HT203743: iOS 7: About the Always option for VPN On Demand

Learn about iOS 7: About the Always option for VPN On Demand
leinakesi

Q: iOS 9.3 VPN On Demand ignores RequiredDNSServers

We have an app which works well on iOS 9.2, it use the feature "RequiredDNSServers" of VPN On Demand. But when upgrade to 9.3 (9.3 all versions, including 9.3.2 beta 4), VPN On Demand just ignore "RequiredDNSServers".

 

"RequiredDNSServers" is an array of IP addresses used to resolving the specified domains. When DNS servers are not reachable, a VPN connection is established in response. On the other hand, the VPN connection should never start.

 

We submitted a bug to apple iOS SDK team and got response that "There is nothing Developer Technical Support can help, you should connect general VPN support which is supported by AppleCare". As I am using the same mobile configuration on iOS 9.2 and iOS 9.3 but get totally opposite result. So I think there must be something wrong with iOS 9.3. Could anyone help?

 

And I'm not the only person who encountered this problem. Another thread here: https://forums.developer.apple.com/thread/42624

 

Below is some code snippet of our mobile configuration.

 

Expected result:

When loading google.com, it should first check 8.8.8.8 for DNS result.

 

Actual result:

It will not request 8.8.8.8 for DNS result and will start VPN connection immediately.

 

  1. <key>OnDemandEnabled</key> 
  2.    <integer>1</integer> 
  3.   <key>OnDemandRules</key> 
  4.    <array> 
  5.      <dict> 
  6.        <key>Action</key> 
  7.          <string>EvaluateConnection</string> 
  8.        <key>InterfaceTypeMatch</key> 
  9.         <string>Wifi</string> 
  10.        <key>ActionParameters</key> 
  11.          <array> 
  12.            <dict> 
  13.              <key>Domains</key> 
  14.                <array> 
  15.                  <string>www.google.com</string> 
  16.                </array> 
  17.              <key>RequiredDNSServers</key> 
  18.                <array> 
  19.                  <string>8.8.8.8</string> 
  20.                </array>                
  21.              <key>DomainAction</key> 
  22.                <string>ConnectIfNeeded</string> 
  23.            </dict> 
  24.          </array> 
  25.      </dict> 
  26.    </array>

iPhone 6s Plus, iOS 9.3.1, 9.3 all versions have this problem

Posted on May 4, 2016 6:44 PM

Close

Q: iOS 9.3 VPN On Demand ignores RequiredDNSServers

  • All replies
  • Helpful answers