【问题标题】:iOS Configuration Profile VPN on demand working on iOS8 but not on iOS9 dev betaiOS Configuration Profile VPN on demand 适用于 iOS8 但不适用于 iOS9 开发测试版
【发布时间】:2015-11-08 05:44:31
【问题描述】:

我有一个 iOS 配置文件,上面配置了 IPSec VPN。 OnDemand 选项在 iOS8 上效果很好。

在 iOS9 上测试配置文件(为即将发布的版本做好准备)时,我遇到了 OnDemand 配置问题。当我尝试访问 safari 上的某些域时,它根本无法连接。 手动连接到 VPN 可以工作

这是我的 mobileconfig 的按需部分:

<key>IPSec</key>
        <dict>
            <key>AuthenticationMethod</key>
            <string>Certificate</string>


        <key>OnDemandEnabled</key>
            <integer>1</integer>


<key>OnDemandRules</key>
            <array>
                <dict>
                    <key>Action</key>
                    <string>EvaluateConnection</string>
                    <key>ActionParameters</key>
                    <array>
                        <dict>
                            <key>Domains</key>
                            <array>
                                <string>duckduckgo.com</string>

                            </array>
                            <key>DomainAction</key>
                            <string>ConnectIfNeeded</string>
                            <key>RequiredURLStringProbe</key>
                            <string>https://vpn.test.mydomain.com</string>
                        </dict>
                    </array>
                </dict>
            </array> 
            ....
            ....

在为 iOS9 尝试了很多配置之后,我还设法让 VPN 始终连接 OnDemand,除了配置文件安装之外没有任何操作,但这不是我想要的行为。

这是始终允许按需的配置:

<key>IPSec</key>
        <dict>
            <key>AuthenticationMethod</key>
            <string>Certificate</string>


        <key>OnDemandEnabled</key>
            <integer>1</integer>


<key>OnDemandRules</key>
            <array>
                <dict>
                    <key>Action</key>
                    <string>Connect</string>
                    <key>ActionParameters</key>
                    <array>
                        <dict>
                            <key>Domains</key>
                            <array>
                                <string>duckduckgo.com</string>

                            </array>
                            <key>DomainAction</key>
                            <string>ConnectIfNeeded</string>
                            <key>RequiredURLStringProbe</key>
                            <string>https://vpn.test.mydomain.com<</string>
                        </dict>
                    </array>
                </dict>
            </array>

我认为这是因为“action”键的“connect”值不检查 ActionParameters,只是自动连接到 VPN 服务器。

我希望我错过了一些苹果尚未在其official docs for the configurations 中更新的小新功能。

如有任何修复 iOS9 配置文件的建议,我们将不胜感激。 谢谢。

【问题讨论】:

    标签: ios vpn ios9 ondemand configuration-profile


    【解决方案1】:

    iOS 9 和 onDemand 已损坏。过去适用于 iOS 8 的功能不适用于 iOS 9,尽管在发行说明中没有提及。

    我建议您注册为开发人员以访问 9.1

    【讨论】:

      【解决方案2】:

      经过大量研究,我发现了一种使按需功能在 iOS9 上运行的配置。这是适合我的:

      注意RequiredURLStringProbe 键。它应该是在 VPN 网络之外无法访问的 url。

      <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
      <dict>
      
      
          <key>PayloadContent</key>
              <array>
                  <dict>
                      <key>IPSec</key>
                      <dict>
                  <key>AuthenticationMethod</key>
                  <string>Certificate</string>
      
      
      <key>OnDemandEnabled</key>
                      <integer>1</integer>
      
      
      <key>OnDemandRules</key>
                  <array>
                      <dict>
                          <key>Action</key>
                          <string>EvaluateConnection</string>
                          <key>ActionParameters</key>
                          <array>
                              <dict>
                                  <key>Domains</key>
                                  <array>
                                      anyDomainForOnDemand.com
                                  </array>
                                  <key>DomainAction</key>
                                  <string>ConnectIfNeeded</string>
                                  <key>RequiredURLStringProbe</key>
                                  <string>https://a.url.accecable.only.from.vpn</string>
                              </dict>
                          </array>
                      </dict>
                  </array>
      
      ....
      ....
      ....
      

      【讨论】:

        猜你喜欢
        • 2015-11-27
        • 1970-01-01
        • 2015-12-16
        • 1970-01-01
        • 2011-09-16
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多