If PC, which is an easy VPN client, has a request to connect to an easy VPN server (flowchart here):
- PC sends ISAKMP policies that it has been configured with plus nonce, a key, and identification payload.
- Server sends a reply back after getting the first packet and checking for AAA values.
- If the AAA authorization is not configured, it drops the packet.
- Otherwise, it continues with the IKE phase I negotiation:
- Either finds a matching policy
- Server sends the accepting policy back plus ID, nonce, and key payload back to the client.
- The IKE peer on the server enters XAUTH mode
- Otherwise
- It does not find a matching policy, it drops the packet.
- If the group name and group key, that the client has sent the request to, do not match or do not exist, it drops the packet.
- If the server has sent back its ID, Key and nonce with the matching policy.
- PC sends back an ACK.
- This ACK packet is encrypted with the DH shared key that has been calculated with nonce, and key of the received packet from the server.
- IKE peer on the PC enters XAUTH negotiation phase.
- Otherwise, it drops the packet and removes the PKE peer.
- Server sends its first XAUTH packet to the client:
- If server is configured with AAA authentication for the client it sends a prompt to the client and requests the client's username/password.
- Otherwise server authenticates the user and continues with the next message.
- The client sends username/password when it receives the prompt from the server.
- The server receives the username/password. It consults with either AAA server or its local configuration (based on the configuration):
- If match found:
- Authenticates the client
- Gets an IP from the IP pool and sends it to the client.
- Otherwise, it denies the client to access the server and sends a notification back to the client.
- The client receives the packet:
- If it is a notification, the client stops the negotiation.
- Otherwise, the client gets the IP, assigns the IP to its tunnel interface, and sends the last message of XAUTH mode, which is an ACK to the server.
- Server gets the ACK and:
- Creates a new route in its routing table to the tunnel IP address of the new client.
- Creates an interesting traffic for the client.
- Marks the IKE peer with XAUTH mode complete .
- Sends a packet to the client to notify the PC to start the phase II.
- Client receives the notification from the server and sends first phase II packet to the server. (for phase II please refer to router's phase II)