3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

strongSwan で iOS 端末の VPN 接続が 1 時間で切れないようにする

Last updated at Posted at 2020-07-19

strongSwan の IKE SA のリキー間隔はデフォルトで 4 時間になっていますが、iOS は 1 時間経過すると IKE SA を破棄してしまうため、それまでにリキーが行われないと VPN 接続が切れてしまいます。
そのため strongSwan の設定でIKE SAのリキー間隔を 1 時間にします。Child SA のリキー間隔はそれよりも短い 30 分にします。

swanctlの場合

swanctl.conf
connections {
    <コネクション名> {
        ...
        rekey_time = 1h
    }

    ...

    children {
        <子SA名> {
            ...
            rekey_time = 30m
        }
    }
}

ipsec.conf を使う場合

ipsec.conf
conn <コネクション名>
  ...
  ikelifetime=1h
  lifetime=30m

これで 1 時間以上接続しても VPN 接続が切れないようになります。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?