fin-invalidate-session
Syntax
fin-invalidate-session;
Hierarchy Level
[edit security flow tcp-session]
Description
Invalidates a TCP session after the 4-way or 3-way handshake completes, with each session endpoint signalling conclusion of the session independently. New incoming SYN packets will need to establish a new TCP session.
When either session endpoint wants to terminate the session, it sends a FIN(ish) message. When the other session endpoint receives the packet with the FIN flag set, it sends an ACK(nowlege) message. Typically, tearing down a session involves transmission of a pair of FIN-ACK messages from each session endpoint.
After the side that sent the first FIN responds with the final ACK, it waits for a time-out period to expire before closing the connection. During the time-out period, the local port cannot be used for new connections. The time-out period protects against delayed packets from the terminating session being delivered during subsequent connections.
On SRX Series Firewalls with fin-invalidate-session
configured the invalidation of the session occurs immediately whereas
without fin-invalidate-session
configured the session
is set to time out 2 seconds after the 4-way or 3-way handshake completes.
Table 1 shows the sequence of packets for a 4-way handshake to terminate a session. In this case, the client signals the server that it is terminating the session. The server responds with an ACK message signaling acknowledgement of the client’s FIN message. The ACK is followed immediately by a FIN message that the server sends to the client, signaling that it is terminating the session connection on its end. Finally, the client sends an ACK message to the server signalling that it received the server’s FIN message.
Step |
Client |
Server |
1. |
FIN |
|
2. |
ACK |
|
3. |
FIN
|
|
4. |
ACK
|
A session can be terminated by a 3-way handshake. In this case, the client sends a FIN message to the server. The server responds with message that combines the FIN and ACK messages. The sequence of packet exchange for a three-way handshake session close is as follows:
Step |
Client |
Server |
1. |
FIN |
|
2. |
FIN/ ACK
|
|
3. |
ACK
|
Required Privilege Level
security—To view this in the configuration.
security-control—To add this to the configuration.
Release Information
Statement introduced in Junos OS Release 10.4 R13.