Configuring CBAC

Configuring CBAC

To configure CBAC, accomplish the afterward steps:

Step 1. Select an interface: centralized or external.

Step 2. Configure an IP admission list.

Step 3. Define an analysis rule.

Step 4. Configure all-around timeouts and thresholds (optional).

Step 5. Administer the admission account and the analysis aphorism to an interface.

Step 6. Verify and adviser CBAC.

Step 1—Select an Interface: Centralized or External

CBAC can be configured either on an centralized or alien interface of the firewall.

Internal refers to the trusted/protected ancillary area sessions charge arise for cartage to be permitted

through the firewall.

External refers to the untrusted/unprotected ancillary area sessions cannot originate. Sessions originating

from the alien ancillary will be blocked.

Figure 5-2. Centralized Versus Alien Interface

Although CBAC is recommended to be configured in one administration per interface, it can be configured in two

directions (also accepted as bidirectional CBAC) at one or added interfaces back the networks on both abandon of the

firewall crave protection, such as with extranet or intranet configurations, and for aegis adjoin DoS

attacks.

Step 2—Configure an IP Admission List

For CBAC to work, an IP admission account is configured to actualize acting openings through the firewall to allow

return traffic. It is important to bethink that the admission account charge be an continued admission list.

There is no basal arrangement for configuring the admission list. Agreement depends on the aegis action of an

organization. The admission account should be kept simple, starting with a basal antecedent configuration. Authoritative the access

list circuitous and chaotic could accidentally acquaint aegis risks by acceptance exceptionable cartage through the

firewall, thereby putting the adequate arrangement at risk. It is capital to accept and verify the admission list

before applying it in a assembly environment.

Follow these accepted guidelines to actualize an admission list:

Explicitly block all arrangement cartage that originates from the caught area and moves to the protected

zone, unless required. For example, back hosting a web server in the adequate zone, it is explicitly

required to admittance HTTP (TCP anchorage 80) that originates from the caught zone.

Step 3—Define an Analysis Rule

CBAC requires defining an analysis aphorism to specify which IP cartage (application-layer protocols) will be

inspected by the firewall engine.

An analysis aphorism should specify anniversary adapted application-layer agreement as able-bodied as the all-encompassing TCP or UDP if

required. The analysis aphorism consists of a alternation of statements, anniversary advertisement a agreement that specifies the same

inspection aphorism name, as apparent in Archetype 5-5. Analysis aphorism statements can accommodate added options, such as

controlling active and analysis aisle letters and blockage IP packet fragmentation.

Use the ip audit name all-around agreement command to actualize a CBAC analysis aphorism set for the required

application-layer protocol. Archetype 5-5 shows how to accredit analysis for HTTP, FTP, SMTP, and all-encompassing TCP

and UDP protocols. Added appliance protocols (not authentic here) can be enabled as required.

Example 5-5. Define CBAC Analysis Rules

Router(config)# ip audit name myfw http

Router(config)# ip audit name myfw ftp

Router(config)# ip audit name myfw smtp

Router(config)# ip audit name myfw tcp

Router(config)# ip audit name myfw udp

Step 4—Configure All-around Timeouts and Thresholds

CBAC uses several abeyance and beginning ethics to actuate the accompaniment of the affair and the continuance for

which it is maintained. At times, admission are always maintained for abruptly concluded sessions that

occupy accidental resources. Incomplete sessions, abandoned (unused) sessions, or abruptly concluded sessions can

be austere application the abeyance and beginning values.

The abeyance and beginning ethics can be acclimated either with absence ethics or can be acquainted to clothing the network

requirement. Table 5-1 shows the accessible CBAC abeyance and beginning commands and their absence values.

Use the commands listed in the table to adapt all-around abeyance or beginning ethics as required.

Step 5—Apply the Admission Account and the Analysis Aphorism to an Interface

For CBAC to booty effect, the admission account and the analysis rules configured beforehand charge to be activated to the

interface.

Deciding area CBAC should be configured (internal or alien interface) is subjective. As apparent in Figure 5-3,

CBAC analysis can be configured on either centralized or alien interfaces—a accommodation that depends absolutely on

the aegis policy. Back authoritative that decision, accede which articulation is appropriate to be protected:

Apply CBAC analysis to the alien (outbound) interface back configuring CBAC for outbound traffic.

Apply CBAC analysis to the centralized (inbound) interface back configuring CBAC for entering traffic.

Figure 5-3. Applying ACL and CBAC Inspection

[View abounding admeasurement image]

To administer an analysis aphorism to an interface, use the ip audit inspection-name {in | out} command in

interface agreement mode.

Step 6—Verifying and Monitoring CBAC

Use the appearance ip audit [config | interface] command or the appearance ip audit all command to verify CBAC

configuration settings. To appearance the statistics and affair advice table with all the accustomed and half-open

connections for all affair breeze through the firewall, use the appearance ip audit affair [detail] command. In

addition, use the appearance ip admission lists command to verify the activating admission account entries busy in the

firewall admission list, as apparent in Archetype 5-1 and Archetype 5-2.

Per-Host DoS Prevention

Per-Host DoS Prevention

CBAC provides a added advancing TCP-based host-specific DoS prevention. CBAC monitors the absolute cardinal of

half-open access accomplished to the aforementioned destination host address. When the cardinal of abridged (halfopen)

TCP access exceeds the configured threshold, CBAC blocks all consecutive access to the host

for the defined block-time, thereby preventing the flood. To configure per-host CBAC monitoring, use the ip

inspect tcp max-incomplete host command. Refer to Table 5-1 for added capacity on this command.

Example 5-4 shows how to change the max-incomplete host to 100 half-open sessions, with block-time timeout

to 5 minutes.

Example 5-4. Per-Host CBAC Ecology for DoS Prevention

Router(config)# ip audit tcp max-incomplete host 100 block-time 5

Embryonic (Half-Open) Sessions

Embryonic (Half-Open) Sessions

CBAC provides DoS apprehension and prevention. An boundless cardinal of half-open sessions (either complete or

measured as the accession rate) could announce the accessible accident of a denial-of-service attack. Traffic

patterns can be accustomed for a TCP SYN-flood blazon attack. TCP is a connection-oriented carriage protocol

that requires commutual a three-way handshake mechanism. Abridged (half-open) access beggarly that the

session has not completed the TCP three-way handshake; hence, the affair is not established. Because UDP is

a connectionless protocol, there is no handshake mechanism; abridged sessions (half-open) in UDP context

indicate that the firewall has detected no acknowledgment traffic.

CBAC monitors the absolute cardinal of half-open access and the amount of affair enactment attempts for

both TCP and UDP half-open connections. CBAC monitors these ethics several times per minute. Adjusting

threshold ethics for arrangement access helps anticipate DoS attacks by authoritative the cardinal of half-open

sessions, thereby absolution up arrangement assets active by half-open sessions.

Example 5-3 shows a CBAC affair table with few half-open (incomplete) TCP connections.

Example 5-3. Sample Half-Open Connections

Router# appearance ip audit session

Half-open Sessions

Session 63938D28 (10.1.1.2:11000)=>(20.1.1.2:23) tcp SIS_OPENING

Session 63938EB8 (10.1.1.2:11001)=>(20.1.1.2:25) tcp SIS_OPENING

Session 639C2343 (10.1.1.20:11012)=>(20.0.0.20:23) tcp SIS_OPENING

Session 63976A22 (10.1.1.20:11013)=>(20.0.0.20:80) tcp SIS_OPENING

When the cardinal of half-open access exceeds the defined beginning (using the ip audit maxincomplete

high or ip audit one-minute aerial number), CBAC will annul consecutive half-open sessions as

required to board new admission connections. CBAC continues to annul the half-open connection

requests as appropriate until the cardinal of absolute half-open sessions drops beneath addition defined threshold

(using the ip audit max-incomplete low or ip audit one-minute low number). See Table 5-1 for more

details on these commands and beginning values.

Table 5-1. Global Timeout and Beginning Values

Timeout or Beginning Ethics Command Default

The breadth of time the software waits for a

TCP affair to ability the accustomed state

before bottomward the session

ip audit tcp synwaittime

seconds

30 seconds

The breadth of time a TCP affair will still

be managed afterwards the firewall detects a

FIN-exchange

ip audit tcp finwait-time

seconds

5 seconds

The breadth of time a TCP affair will still

be managed afterwards no action (the TCP idle

timeout)

ip audit tcp idle-time

seconds

3600 abnormal (1

hour)

The breadth of time a UDP affair will still

be managed afterwards no action (the UDP idle

timeout)

ip audit udp idle-time

seconds

30 seconds

The breadth of time a DNS name lookup

session will still be managed afterwards no

activity

ip audit dns-timeout

seconds

5 seconds

The cardinal of absolute half-open sessions

that will account the software to start

deleting half-open sessions

ip audit max-incomplete

high number

500 absolute halfopen

sessions

The cardinal of absolute half-open sessions

that will account the software to stop

deleting half-open sessions

ip audit max-incomplete

low number

400 absolute halfopen

sessions

The amount of new unestablished sessions in

1-minute intervals that will account the

software to alpha deleting half-open

sessions

ip audit one-minute high

number

500 half-open

sessions per minute

Timeout or Beginning Ethics Command Default

The amount of new unestablished sessions in

1-minute intervals that will account the

software to stop deleting half-open

sessions

ip audit one-minute low

number

400 half-open

sessions per minute

The cardinal of absolute half-open TCP

sessions with the aforementioned destination host

address that will account the software to

start bottomward half-open sessions to the

same destination host address

ip audit tcp maxincomplete

host number

block-time minutes

50 absolute halfopen

TCP sessions;

0 minutes

The advice in Table 5-1 is taken from "Configuring Context-Based Access Control" at

http://www.cisco.com/en/US/docs/ios/12_0/security/configuration/guide/sccbac.html#wp4154.

CBAC-Supported Protocols

CBAC-Supported Protocols

CBAC can be enabled to audit all TCP and UDP sessions, behindhand of the application-layer protocol. This

method is alleged single-channel, or generic, TCP/UDP inspection. For TCP/UDP all-encompassing analysis to work, the

return cartage charge accept the aforementioned source/destination IP abode and anchorage numbers. It charge additionally be aural the

sequence cardinal window. If the anchorage cardinal changes, the packet will be dropped.

In addition, CBAC can accurately audit alone application-layer protocols to advance the connection

information for anniversary session. Application-layer agreement analysis takes antecedence over the TCP or UDP

protocol inspection. The afterward application-layer protocols are accurate and can be configured for CBAC

inspection:

CU-SeeMe

FTP

H.323 (such as NetMeeting)

HTTP (Java blocking)

ICMP

Microsoft NetShow

RealAudio

RTSP (Real-Time Streaming Protocol)

RPC (Sun RPC, not DCE RPC)

SMTP (Simple Mail Transport Protocol)

ESMTP (Extended Simple Mail Transport Protocol)

SQL*Net

StreamWorks

TFTP

UNIX R-commands (such as rlogin, rexec, and rsh)

VDOLive

Dynamic ACL Entries

Dynamic ACL Entries

As discussed earlier, CBAC uses the affiliation advice from the affair table to accessible activating holes in the

firewall admission account for the abiding cartage (that would commonly be blocked). CBAC dynamically adds and

removes admission account entries at the firewall interfaces. These acting openings are created in accordance with

the accompaniment table for all inspected cartage that originates from an centralized (protected) arrangement outbound against the

unprotected area through the firewall. The purpose of these admission account entries is to appraise cartage abounding back

into the centralized network. These entries actualize acting openings in the firewall to admittance alone cartage that is

part of a permissible session. Example 5-2 shows a activating ACL admission (corresponding to Example 5-1) that

permits abiding Telnet cartage accomplished by a host from the centralized network.

Example 5-2. Activating ACL Admission Agnate to the Accompaniment Table

Router# appearance ip access-lists

Extended IP admission account 101

permit tcp host 20.1.1.1 eq telnet host 10.1.1.1 eq 11006 (16 matches)

permit tcp any host WebServer eq http

deny ip any any (12 matches)

Note

The dynamically created admission account entries that acquiesce abiding cartage are acting and are not saved

to the nonvolatile random-access anamnesis (NVRAM).