Cisco IOS Firewall
CBAC – Context Based Access Control
CBAC allows examination of traffic at the Application Layer, not just Layer 3 or Layer 4 as in ACLs. It can maintain session information and create temporary openings to allow return traffic for permissible sessions. CBAC maintains a state table both for TCP and UDP (aproximated state – since the service is connectionless). Packets in the return traffic must match the information in the state table to be allowed. CBAC is set on an interface in one direction (incoming or outgoing) and will only inspect those packets that passed the ACL in that direction. (see Order of operations). when traffic originates in the direction that the inspection rule is applied, it will generate shortcuts that will bypass any ACLs in the opposite direction, regardless of the interface. This means an inspect on the incoming traffic of the inside interface will allow returning packets on the outside (even if there is an ACL that denies them). Also, if the inspection is configured on the outside interface, in the outgoing direction, it will still allow return traffic.
To define the CBAC inspection rule, use:
Apply the inspection rule on an interface:
TCP Intercept
TCP intercept is used to prevent servers from TCP SYN-flood attacks. When this type of attacks occur, an attacker sends multiple TCP SYN packets to a server, which should try to respond with a SYN-ACK and then keep this state information until the sender responds with an ACK and the three-way-handshake is completed. When the number of SYN packets received is high enough, the server may start dropping legitimate connections. The router can be configured to prevent this using the TCP Intercept feature. There are two modes of operation: active and passive. In the default active mode (intercept), the router will intercept the TCP SYN packets, and respond with a SYN-ACK on behalf of the server. Only when it receives an ACK back, it will create a three-way-handshake with the server and connect the 2 sessions with each other, thus stopping excess SYNs from reaching the server. In the passive mode(watch), the router forwards the SYN to the server but waits a limited amount of time (default:30 sec) for the three-way-handshake to complete, before it sends a RESET to the server to clear the connection.
The TCP Intercept also has an aggressive mode in which any new connection will generate the drop of an old connection. This aggressive mode is automatically enabled based on a couple of thresholds regarding total number of incomplete connections or number of connections in the last minute.
Unicast RPF (Reverse Path Forwarding)
Unicast RPF uses the same mechanism as the Multicast RPF used by PIM to verify that a packet arrived on the interface with the best route pointing to the source. If it did, then the packet is processed, if it didn’t, then it is dropped.
For multihomed environments, a loose version of uRPF can be enabled, where the packet does not need to enter a specific interface. A route to the source must exist in the routing table, otherwise the packet will be dropped. To enable the loose-mode uRPF, use:
Last updated