ASPF

ASPF was proposed to address the issues that a static firewall cannot solve. An ASPF implements application layer and transport specific, namely status-based, packet filtering. An ASPF can inspect application layer protocols including FTP, GTP, HTTP, SMTP, Real RTSP, SCCP, SIP, and H.323 (Q.931, H.245, and RTP/RTCP), and transport layer protocols TCP and UDP.

ASPF functions

An ASPF provides the following functions:

At the border of a network, an ASPF can work in coordination with a packet-filter firewall to provide the network with a security policy that is more comprehensive and better satisfies the actual needs.

Basic concepts of ASPF

Application layer protocol inspection

As shown in Figure 112, ACLs on the edge device deny incoming packets to the internal network. The ASPF application layer protocol inspection allows return packets from the external network to the internal network.

Figure 112: Application layer protocol inspection

After the application layer protocol inspection is enabled on the router, the ASPF inspects each application layer session and creates a status entry and a temporary access control list (TACL) for the session. For a multi-channel protocol, a TACL will also be created for data channels.

Multi-channel application layer protocol inspection—Using FTP inspection as an example, the following explains the process of multi-channel application layer protocol inspection:

As shown in Figure 113, FTP connections are established as follows:

  1. The FTP client initiates an FTP control connection from port 1333 to port 21 of the FTP server.

  2. As a result of negotiation, the server initiates a data connection from port 20 to port 1600 of the client.

  3. When data transmission times out or ends, the data connection is removed.

Figure 113: Network diagram for FTP inspection

ASPF implements FTP inspection during the FTP connection lifetime:

  1. The ASPF checks IP packets on the outbound interface to identify TCP-based FTP packets.

  2. Based on the port number, the ASPF determines whether the connection is a control connection. If yes, it creates a TACL for returned packets and a status entry.

  3. The ASPF checks each FTP control connection packet, analyzes the FTP instruction, and updates the status entry based on the instruction. If the packet contains a data channel setup instruction, the ASPF creates a TACL for the data connection. For a data connection, the ASPF does not perform status inspection.

  4. For returned control connection packets, the ASPF first matches these packets against the control connection TACL, and then checks their application status based on the application type, and determines whether to permit the packets to pass according to the results of the match checks. For returned data connection packets, the ASPF only performs the data connection TACL match.

  5. When the FTP connection is removed, the ASPF removes the status entry and TACL accordingly.

Single channel application protocol inspection—The inspection process for a single-channel protocol (such as SMTP and HTTP) is relatively simple: a TACL is created at the connection initiation and is deleted when the connection is removed.

Transport layer protocol inspection

The transport layer protocol inspection here refers to general TCP/UDP inspection. Different from application layer protocol inspection, general TCP/UDP inspection is specific to the transport layer information in the packets, such as source and destination addresses and port number. General TCP/UDP inspection requires a full match between the packets returned to the external interface of the ASPF and the packets previously sent out from the external interface of ASPF, namely a perfect match of the source and destination address and port number. Otherwise, the return packets will be blocked. Therefore, for multi-channel application layer protocols like FTP and H.323, the deployment of TCP inspection without application layer inspection will lead to failure of establishing a data connection.