Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

GTP Traffic, Inspection and Tunnel Enhancements

Learn about GTP traffic, GTP-U Inspection, how it performs security checks on GTP-U packets and the validation of IP address in GTP messages.

The GPRS Tunneling Protocol (GTP) establishes a GTP tunnel for a user equipment, between a Service gateway GPRS support node (SGSN) and gateway GPRS support node (GGSN), and an SGSN and mobility management entity (MME). The SGSN receives packets from the user equipment and encapsulates it within a GTP header before forwarding to the GGSN through the GTP tunnel. When the GGSN receives the packets, it decapsulates the packets and forwards the packets to the external host.

GTP-U Inspection

The GPRS tunneling protocol, user plane (GTP-U) inspection performs security checks on GTP-U packets. When GTP-U inspection is enabled, the invalid GTP-U packets are blocked and the GPRS support node (GSN) is protected from a GTP-U attack.

Once GTP-U inspection is enabled, depending on the device configuration, GTP-U inspection might include checks on GTP-in-GTP packets, end-user authorization, packet sequence validity, and tunnel validity. If any configured check fails, the GTP-U packet is dropped.

If the GTP-U inspection is enabled while the GTP-U distribution is disabled then, the following message is displayed: GTP-U inspection is enabled, please enable GTP-U distribution to ensure that GTP-U packets are inspected by the proper inspectors, and avoid dropping GTP-U packets wrongly. Execute CLI “set security forwarding-process application-services enable-gtpu-distribution" to enable GTP-U distribution. It is strongly recommended that when you enable GTP-U inspection, GTP-U distribution is also enabled.

Use Feature Explorer to confirm platform and release support for specific features.

Review the Platform-Specific GTP-U Inspection Behavior section for notes related to your platform.

The following list describes the various types of GTP-U inspections that are performed on the traffic:

  • GTP-U tunnel check—The GTP-U module checks whether the incoming GTP‑U packet matches an existing GTP tunnel. If no matching tunnel is found, the packet is dropped.

  • GTP-in-GTP check—In the Services Processing Unit (SPU), the GTP module checks to ensure that the GTP-U payload is not a GTP packet. If the payload is identified as a GTP packet, the GTP packet is dropped.

  • End-user address check—If a matching user tunnel is found for the GTP-U packet, the GTP-U module checks for the end-user address. If the GTP-U payload address does not match the end-user address, then the GTP-U packet is dropped.

    The end-user address in certain scenarios is not carried in GTP create messages. For example, if DHCPv4 is used for IPv4 address allocation, the IPv4 address field in the GTP create message will be set to 0.0.0.0. The user equipment and GGSN or PGW get the address from the DHCP server. In this scenario, the GTP module cannot get the address for the end-user address check. Subsequently, if this configuration is enabled, the GTP create message will be dropped.

  • Sequence number check—The GTP-U module compares the GTP-U packet sequence number with the sequence number stored in the GTP-U tunnel. If the sequence number is not in the specified range, then the GTP-U packet is dropped. If it is in the range, then the GTP-U tunnel refreshes the sequence number and allows the GTP-U packet to pass.

At the end of the GTP-U inspection, the GTP-U tunnel refreshes the timers and counters.

GTP Tunnel Enhancements

A GTP tunnel is a channel between two GPRS support nodes through which two hosts exchange data. The GTP tunnel consists of the GTP, control plane (GTP-C) and GTP, user plane (GTP-U). GTP-C is used to signaling between the GGSN and the SGSN, while the GTP-U tunnel is used to encapsulate and route the user plane traffic across multiple signaling interfaces.

GTP handling is enhanced to update the GTP tunnel and session lifetime to avoid GTP tunnel timeout issues. The GTP tunnel timeout value is configured in the GTP profile and bound to the GTP-U tunnel. The timer value is refreshed when the data traffic reaches the GTP-U tunnel and the timer value decreases when the GTP-U tunnel, is in an idle state. The GTP-U tunnel is deleted when the timer value decreases to zero and the corresponding GTP-C tunnel is also deleted when all the GTP-U tunnels bound to the GTP-C tunnels are deleted.

When GTP-U inspection is disabled, data traffic is unable to refresh the GTP-U tunnel after the timer value expires and all GTP tunnels timeout even though data traffic flows across the tunnels. In this scenario, the device drops any update requests as the corresponding GTP‑U tunnel no longer exists.

To avoid GTP tunnel timeout issues, GTP‑U traffic can continue to refresh the GTP tunnel even when GTP user validation is disabled. GTP-U traffic can refresh only GTPv1 and GTPv2 tunnels, and not GTPv0 tunnels. You need to configure the set security forwarding-process application-services enable-gtpu-distribution command to avoid aging of or expiry of the GTP tunnels.

The GTP-U tunnel has a session attach flag that is checked when scanning the GTP-U tunnels. If the sessions attach flag is present in the tunnel, the timer value does not decrease and prevents the tunnel from being deleted while the tunnel is in service.

Validation of IP Address in GTP Messages

IP addresses in GTP message on Gp or the S8 interface are validated with the configured IP group list to prevent attacks. The IP group list is a list of IP addresses that belongs to all kinds of network equipment (NE). You must configure the IP addresses that belongs to NE in the IP group list.

The S8 interface connects an SGW in a visited PLMN (VPLM) and a PGW in a home PLMN (HPLMN). S8 is the inter-PLMN variant of S5. The S8 interface is equivalent to the Gp interface in a 3G mobile network.

The GTP firewall determines if the IP addresses in GTP messages and matches with the configured IP group list, and following action take place:

  • If the IP addresses are found in the IP group list, the GTP messages are considered valid and forwarded to the Packet Forwarding Engine.

  • If the IP addresses are not found in the IP group list, the GTP messages are dropped.

IP Group Setup in GTP Message

The IP group is a list of IP addresses that belongs to all kinds of NE. IP group name(s) are referenced in GTP profiles. The GTP firewall applies configured policies in incoming and outgoing IP addresses in GTP message mentioned in GTPv0 Messages and GTPv1 Messages tables.

For example, the traffic between the client and the server in the figure, two policies configured.

  • GTP Policy Out is for the traffic from the client to the server.

  • GTP Policy In is for the traffic from the server to the client.

Figure 1: GTP Profile for Incoming and Outgoing GTP messagesGTP Profile for Incoming and Outgoing GTP messages

All the IP addresses of the client and the server must be configured in the IP group list and bound to the GTP Policy Out and GTP Policy In policies.

There are two different types of groups are introduced for different IP addresses. One is for NE IP addresses group, and the other is for User Equipment (UE) IP addresses group listed in the below table.

Table 1: NE and UE IP Address Support on Various Networks

Network Types

NE IP Address

UE IP Address

2G(GPRS) and 3G(UMTS)

RNC, SGSN, and GGSN

End-User Address

4G (LTE)

eNodeB, MME, SGW, and PGW

PDN Address Allocation (PAA)

When GTP messages come to the message handler stage, NE IP addresses group and UE IP addresses group are validated, respectively, based on the parsed information elements and IP address header information.

  • NE IP address group: The IP address (IP address header and the information element) is validated against the configured ME IP address group list, if available. If the NE IP address is found in the configured NE IP addresses group, the data packet is forwarded to the UE IP address group. If no match is found, the packet is discarded.

  • UE IP addresses group: All end-user IP addresses are validated against the configured UE IP addresses group list. If the UE IP address is found in the configured user equipment IP addresses group, the data packet is forwarded to the UE IP address group. If no match is found, the packet is discarded

Supported GTP Messages

Many types of messages pass through the Gp or S8 interfaces. Some of the supported GTP messages are listed in the table.

Table 2: GTPv0 Messages

Message Type

GTP Message

Reference in TS 29.060

1

Echo Request

7.4.1

2

Echo Response

7.4.2

16

Create PDP Context Request

7.5.1

17

Create PDP Context Response

7.5.2

18

Update PDP Context Request

7.5.3

19

Update PDP Context Response

7.5.4

20

Delete PDP Context Request

7.5.5

21

Delete PDP Context Response

7.5.6

22

Create AA PDP Context Request

7.5.7

23

Create AA PDP Context Response

7.5.8

24

Delete AA PDP Context Request

7.5.9

25

Delete AA PDP Context Response

7.5.10

Table 3: GTPv1 Messages

Message Type

GTP Message

Reference in TS 29.060

1

Echo Request

7.2.1

2

Echo Response

7.2.2

16

Create PDP Context Request

7.3.1

17

Create PDP Context Response

7.3.2

18

Update PDP Context Request

7.3.3

19

Update PDP Context Response

7.3.4

20

Delete PDP Context Request

7.3.5

21

Delete PDP Context Response

7.3.6

Table 4: GTPv2 Messages

Message Type

GTP Message

Reference 3GPP TS 29.274

1

Echo Request

23.007

2

Echo Response

23.007

32

Create Session Request

29.274

33

Create Session Response

29.274

36

Delete Session Request

29.274

37

Delete Session Response

29.274

34

Modify Bearer Request

29.274

35

Modify Bearer Response

29.274

95

Create Bearer Request

29.274

96

Create Bearer Response

29.274

97

Update Bearer Request

29.274

98

Update Bearer Response

29.274

99

Delete Bearer Request

29.274

100

Delete Bearer Response

29.274

IEs involved in IP validity

The following IEs correspond to GTP messages on the 3GPP Gp or S8 interface.

Unexpected IEs are ignored and not checked, even if they contain an NE IP address.

Table 5: IEs in GTPv0 messages

GTP Message

Address Type

IE Type

Create PDP Context RequestCreate AA PDP Context Request

End User AddressSGSN Address for signallingSGSN Address for user traffic

End User AddressGSN AddressGSN Address

Create PDP Context ResponseCreate AA PDP Context Response

End user addressGGSN Address for signallingGGSN Address for user traffic

End User AddressGSN AddressGSN Address

Update PDP Context Request

SGSN Address for signallingSGSN Address for user traffic

GSN AddressGSN Address

Update PDP Context Response

GGSN Address for signallingGGSN Address for user traffic

GSN AddressGSN Address

Table 6: GTPv1 messages

GTP Message

Address Type

IE Type

Create PDP Context Request

End User AddressSGSN Address for signallingSGSN Address for user traffic

End User AddressGSN AddressGSN Address

Create PDP Context Response

End user addressGGSN Address for signallingGGSN Address for user trafficAlternative GGSN Address for Control PlaneAlternative GGSN Address for user traffic

End User AddressGSN AddressGSN AddressGSN AddressGSN Address

Update PDP Context Request (SGSN-initiated)

SGSN Address for signallingSGSN Address for user trafficAlternative SGSN Address for Control PlaneAlternative SGSN Address for user traffic

GSN AddressGSN AddressGSN AddressGSN Address

Update PDP Context Request (GGSN-initiated)

End User Address

End User Address

Update PDP Context Response (by GGSN)

GGSN Address for signallingGGSN Address for user trafficAlternative GGSN Address for Control PlaneAlternative GGSN Address for user traffic

GSN AddressGSN AddressGSN AddressGSN Address

Update PDP Context Response (by SGSN)

SGSN Address for User Traffic

GSN Address

Table 7: GTPv2 messages

GTP Message/Bearer Context

Address Type

IE Type

Create Session Request

Sender Address for Control PlanePDN Address AllocationH(e)NB Local IP AddressMME/S4-SGSN Identifier

F-TEIDPAAIP AddressIP Address

Create Session Request (Bearer context to be created)

S5/S8-U SGW F-TEID

F-TEID

Create Session Response

PGW S5/S8 F-TEID for Control Plane interfacePDN Address Allocation

F-TEIDPAA

Create Session Response (Bearer context to be created)

S5/S8-U PGW F-TEID

F-TEID

Create Bearer Request (Bearer context)

S5/8-U PGW F-TEID

F-TEID

Create Bearer Response

MME/S4-SGSN Identifier

IP Address

Create Bearer Response (Bearer context)

S5/8-U SGW F-TEIDS5/8-U PGW F-TEID

F-TEIDF-TEID

Modify Bearer Request

Sender Address for Control PlaneH(e)NB Local IP AddressMME/S4-SGSN Identifier

F-TEIDIP AddressIP Address

Modify Bearer Request (Bearer context)

S5/8-U SGW F-TEID

F-TEID

Delete Session Request

Sender Address for Control Plane

F-TEID

Delete Bearer Response

MME/S4-SGSN Identifier

IP Address

Update Bearer Response

MME/S4-SGSN Identifier

IP Address

Example: Configure the Validity of IP Address in GTP Messages

This example shows how you configure IP address validity in GTP message.

Requirements

SRX Series Firewall with Junos OS Release 19.3R1 or later. This configuration example is tested on Junos OS Release 19.3R1.

This example uses the following hardware and software components:

  • You need a firewall device.

  • UE that needs to connect to the Internet. You will also need a 3G or 4G mobile core network along with both a home network and a visited network

Overview

You can prevent a variety of attacks by validating the IP addresses of incoming and outgoing packets in GTP messages against the IP addresses configured in the IP group list. IP group is a list of IP addresses that belongs to various types of NE. IP group name(s) are referenced in GTP profiles. The GTP firewall applies configured policies in incoming and outgoing IP addresses in GTP messages.

Configuration of IP Address in GTP Messages

CLI Quick Configuration

To quickly configure this section of the example, copy the following commands, paste into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

  1. Configure a GTP profile to process the traffic that goes to the GTP firewall.

  2. Configure the security zone to support inbound and outbound traffic for all system services for all interfaces connected.

  3. Specify the IP address in the global address book, these IP addresses are used for validating IP addresses in incoming or outgoing GTP messages.

  4. Configure the defined NE and UE IP address group to IP group list, this IP group list is used in GTP messages.

  5. Apply GTP profile to NE and UE groups.

  6. Enable the GTP service in the security policies.

Results

From configuration mode, confirm your configuration by entering the show security gtp command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

From configuration mode, confirm your configuration by entering the show security zones command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

From configuration mode, confirm your configuration by entering the show security address-book command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

From configuration mode, confirm your configuration by entering the show security policies command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

If you are done configuring the device, enter commit from configuration mode.

Verification

To confirm that the configuration is working properly, perform these tasks:

Verify the IP Group

Purpose

Verify the IP Group is configured.

Action

Use the show security gtp ip-group command to get the details of the configured IP group.

Verify the GTP Profile

Purpose

Verify the GTP profile is configured.

Action

Use the show security gtp configuration 1 command to get the details of the configured IP group.

Platform-Specific GTP-U Inspection Behavior

Use Feature Explorer to confirm platform and release support for specific features.

Use the following table to review platform-specific storage media behaviors for your platform:

Platform Difference

SRX Series

  • SRX5400, SRX5600, and SRX5800 devices that support GTP-U inspection, support selection of the anchor SPU for distributing UDP traffic on ports 2123 and 2152 when a GTP profile is configured. GTP module functionality is not supported if the GTP profile is not configured.

  • SRX5400, SRX5600, and SRX5800 devices support an increased GTP tunnel scale from 200,000 to 600,000 tunnels per SPU which allows a total of up to 2,400,000 tunnels per SPC2 card.