Feb 10, 2012

Disabling idle timeout for specific traffic

The ASA enforces a timeout for idle connections and the default value is one hour for TCP connections. It helps to save resources and avoid overloads, but it can also crash some applications. We can disable this feature at all, but it is not a good idea as it can impact the firewall performance. Thus the best thing to do when you are running some application which you expect to have idle connections for long time is disabling the idle control for that traffic only. We can do that with Advanced Connection Settings.

First of all we have to classify the traffic:

asa(config)# access-list ACL_NO_TIMEOUT extended permit ip any
asa(config)# class-map CM_NO_TIMEOUT
asa(config-cmap)# match access-list ACL_NO_TIMEOUT

Then set the policy (global or per interface) for the class and disable the timeout:

asa(config)# policy-map global_policy
asa(config-pmap)# class CM_NO_TIMEOUT
asa(config-pmap-c)# set connection timeout tcp 0

The new policy will be enforced for new connections, so you may want to clear the old ones. Now you should see no timeout for that traffic:

asa# show conn detail address
TCP outside: inside:,
    flags UIOB, idle 45m24s, uptime 4h30m, timeout -, bytes 1019

asa(config)# end
asa# wr mem


  1. I want to implement similar for one of our remote locations where primary connection is MPLS and Ipsec VPN tunnel is backup. MPLS is up all the time so ipsec tunnel goes down. I want to keep VPN tunnel up all the time. How can I do that?

    1. Hello Jay

      These articles will help you to implement what you need:



      Once you have the static route for the IPsec link active, the tunnel will be established.