---
title: 'Tutorial: Change the VPN Client Disconnection Behavior'
canonical: https://openvpn.net/as-docs/v3/tutorials/tutorial--client-disconnection-behavior/
product: Access Server Docs
description: Configure whether the most recent or oldest VPN connections disconnect when exceeding the connection limit.
---

# Tutorial: Change the VPN Client Disconnection Behavior

## Overview

This tutorial shows you how to change the subscription enforcement order. You can configure whether the most recent or the oldest VPN connections should be disconnected when exceeding your subscription license's connection limit.

## Prerequisites

- An installed Access Server.
- An activated subscription.
- Console access and the ability to get root access.

## Option 1: Disconnect the newest connections

1. Connect to the console and get root privileges.
2. Run this command to disconnect the most recent or newest VPN connections (default):

   ```
   sacli --key "subscription.enforcement_order" --value "newest" ConfigPut
   ```
3. Restart the Access Server service:

   ```
   systemctl restart openvpnas
   ```

## Option 2: Disconnect the oldest connections

1. Connect to the console and get root privileges.
2. Run this command to disconnect the oldest VPN connections:

   ```
   sacli --key "subscription.enforcement_order" --value "oldest" ConfigPut
   ```
3. Restart the Access Server service:

   ```
   systemctl restart openvpnas
   ```

---

Prev: [Connection and Subscription Management](https://openvpn.net/as-docs/v3/tutorials/connection-and-subscription-management.md)
Next: [Tutorial: Set a Local Connection Limit](https://openvpn.net/as-docs/v3/tutorials/tutorial--local-connection-limit.md)
Index: https://openvpn.net/as-docs/llms.txt
