Top
Enable Security Features in DGW
This document describes the steps required to configure a Mediatrix unit loaded with the DGW firmware for secure SIP signalling and secure media (SRTP) operation.
This is not a complete key-exchange, TLS or general security tutorial. For more information on these topics, please see the links section.
In this scenario, the endpoints used are a Mediatrix 4102 and a Mediatrix C740 BRI Gateway units. Both Mediatrix units must be loaded with DGW. We will use the freely available openSIPS (http://www.opensips.org) as the SIP proxy and configure it for TLS operation.
Top
TLS-Enabled Server/Proxy Installation with openSIPS
Using two Mediatrix gateways connected back-to-back using a SIP trunk would be sufficient to demonstrate the use of the new security features. However, we prefer to demonstrate the configuration of the units and test scenarios in a more real-world environment by using a separate TLS-enabled SIP proxy. For this purpose, we have chosen openSIPS as it is free and easy to configure for basic use.
Please note that at the moment of writing this, openSIPS is configured by default to keep the TLS links up for a period of 2 minutes. We have made a small code modification that allows the links to stay up for 120 minutes. See the annex for more information on how to procede.
Top
Certificates
The Mediatrix unit uses digital certificates, which are a collection of data used to verify the identity of individuals, computers, and other entities on a network.
- the certificate's name
- the issuer and issued to names
- the validity period (the certificate is not valid before or after this period)
- the use of certificates such as:
- TlsClient: The certificate identifies a TLS client. A host authenticated by this kind of certificate can act as a client in a SIP over TLS connection when mutual authentication is required by the server.
- TlsServer: The certificate identifies a TLS server. A host authenticated by this kind of certificate can serve files or web pages using the HTTPS protocol or can act as a server in a SIP over TLS connection.
- whether or not the certificate is owned by a Certification Authority (CA)
Although certificates are factory-installed new ones can also be added. Since TLS certificates are validated in terms of time (certificate validation/expiration date, etc.), the use of NTP (Network Time Protocol) is mandatory when using the security features.
- Host Certificates: used to certify the unit (e.g.: a web server with HTTPS requires a host certificate).
- Others: Any other certificate including trusted CA certificates used to certify peers (e.g.: a SIP server with TLS).
- Conf.ScriptsTransferCertificateValidation
- Cwmp.TransportCertificateValidation
- Eth.Eap.CertificateValidation
- Fpu.MfpTransferCertificateValidation
- Nlm.PCaptureTransferCertificateValidation
- Sbc.CertificateValidation
- SipEp.InteropTlsCertificateValidation (also available in the DGW Web page under SIP/Interop)
The certificates must be uploaded to the Mediatrix units. They define how a Mediatrix unit will certify the remote host in order to mark it as secure and suitable for a TLS connection. If the Mediatrix unit does not trust the remote certificate (i.e. does not authenticate it with either one of the 3 methods: HostName, trustedCertificate, DnsSrv), then the Mediatrix unit will not establish the connection.
- for testing purpose,
- if one cannot identify the required CA cert, or
- the CA cert has mismatched Common Name/Subject Alternate Name. (In this case there is no fallback, it will fail if the name does not match)
- SIP
- Configuration Web pages
- File transfers (scripts, firmwares, etc.) with HTTPS
- Configuration using TR-069
- Wired Ethernet Authentication with EAP (802.1x)
One common use of the host certificate is to allow HTTPS Web access to the unit (which in this case, the device is the TLS server). For more details refer to the Technical Bulletins - Creating a Media5 Host Certificate with Open SSL document on the Media5 Documentation Portal.
Top
Basics of Security Exchanges
At the level at which we are working, establishing a TLS connection may seems fairly straightforward. However in practice, at a lower level, there are a lot of additional complications to consider to insure a protection against various possible attacks.
-
- The client (Mediatrix) initially connects to the server on a configured TCP port (16000 is the default source port, the destination port is the configured SIP proxy port ).
- The client sends a “Client Hello” message with the supported TLS/SSL protocol version, cipher specifications and compression algorithms.
- The server replies with a “Server Hello” message with the selected cipher and the server certificate.
- The client verifies the server certificate (validations are configured via the TlsCertificateValidation variable).
- The client generates a secret and encrypts it with the server’s public key. This encrypted secret is then sent to the server.
- The client and the server use the secret to create the same symmetric encryption key.
- The client and the server switch to encrypted communication by using the previously agreed cipher and the key just established
This brief exchange can be seen in the follwing Wireshark capture.
-
- the server's signature,
- the CA (Certification Authority) who signed the certificate,
- validate that the server identified in the certificate is the same as the one that presented it,
- the expiration date of the certificate.
If any of these steps fail, the TLS link will not go "up". For those familiar with HTTPS, this is essentially the same procedure but using a SIP server/proxy instead of a HTTPS server.
Top
Enabling Security Features
Importing Certificates on the Mediatrix Unit
Top
Adding the OpenSIPS Gateway
- Go to SIP/Gateways.
- In the Gateway Configuration table, in the Name field, enter OpenSIPS .
- Click .
-
Complete the fields as follows:
- From the Type selection list, select Trunk.
- From the Signaling Network selection list, select Uplink.
- In the Port field, enter 5062.
- In the Secure Port port field, enter 5061.
- Click Apply.
The OpenSIPS gateway will be available under the SIP > Servers page.
Top
Assigning a Specific Registrar Server to the OpenSIPS Gateway
Top
Assigning a Specific Proxy Server to the OpenSIPS Gateway
Top
Enabling Secure Signaling (TLS)
The Ready LED will turn to a steady green. The SipEp Notification messages #303 and #310 are sent once the TLS connection is established. For example:
Syslog message: USER.INFO: SipEp: 1400-SIP Endpoint: 303-TLS connection with remote host 10.5.128.14:5063 is now ready to be used for SIP gateway default.
Syslog message: USER.INFO: SipEp: 1400-SIP Endpoint: 310-Server 10.5.128.14:5063 is now reachable for SIP gateway default.
Top
Enabling Secure Media (SRTP) on All Endpoints
All new SIP exchanges will contain RTP/SAVP negotiation elements.
Top
Enabling Secure Media (SRTP) on a Specific Endpoint
All new SIP exchanges going through the specified endpoint will contain RTP/SAVP negotiation elements.
Top
Troubleshooting
Enabling TLS Debugging on Wireshark
Top
REGISTER Messages Not Being Answered
TLS is enabled on one of the Mediatrix gateways and not on the second gateway.
Issue: The REGISTER requests from the second gateway are not being answered.
Reason: The proxy is expecting the SIP message to be SSL encapsulated.
Procedures to solve the issue: Restart the Wireshark capture and enable TLS on the second gateway. Restart the required services.
Top
Server Internal Error (or Similar Messages)
Some servers/proxies will require Interop variables to be enabled.
For example, the default openSIPS installation requires adding the SIP transport field in the registration and contact headers.
Top
Enabling Interop Variables
- Go to SIP/Transport.
- In the General Configuration table, set the Add SIP Transport in Registration and Add SIP Transport in Contact Header variables to Enable.
- ClickApply.
Top
Mikey and SDES Mismatch
This document explains why it is highly recommended to choose only one single key management protocol.
In the following example, SDES is configured on endpoint 1 (192.168.120.30) and Mikey on endpoint 2 (192.168.120.12)
The gateway 192.168.120.12 returns a SIP 415 Unsupported Media error because it is not configured to manage SDES.
The following Syslog message should also be seen: syslog: SdpTools [D3A2] Received the wrong key management protocol. Secure stream disabled.
Top
Audio Issues with Secured Media (SRTP)
This document explains how to detect an audio issue with a Mediatrix gateway when the media is secured with SRTP.
In the following example, both gateways are configured with different SRTP Preferences configurations. This situation may be encountered when the SRTP behaviors with different SIP devices are not compatible.
The gateway 192.168.121.5 is configured to keep the cryptographic elements while the the gateway 192.168.121.10 is configured to regenerate the cryptographic elements.
After some times, when the Mediatrix detects that the incoming SRTP stream cannot be decrypted, it will send the following notification message: Mipt: 1600-Media IP Transport: 110-The call #### on endpoint XYZ detected an SRTP cryptographic error. The secured RTP stream is not properly decoded.
This audio issue occurred after the sequence number of one of the SRTP streams had rolled over and the SRTP cryptographic contexts of both peers are desynchronised. This event may also happen when resuming a SIP call on hold.
Top
Annexes
Mediatrix Support Portal
http://www.media5corp.com/support-portalTop
Online Help
If you are not familiar with the meaning of the fields and buttons, click Show Help, located at the upper right corner of the Web page. When activated, the fields and buttons that offer online help will change to green and if you hover over them, the description will bedisplayed.
Top
DGW Documentation
Mediatrix devices are supplied with an exhaustive set of documentation.
Mediatrix user documentation is available on the Media5 Documentation Portal.
- Release notes: Generated at each GA release, this document includes the known and solved issues of the software. It also outlines the changes and the new features the release includes.
- Configuration notes: These documents are created to facilitate the configuration of a specific use case. They address a configuration aspect we consider that most users will need to perform. However, in some cases, a configuration note is created after receiving a question from a customer. They provide standard step-by-step procedures detailing the values of the parameters to use. They provide a means of validation and present some conceptual information. The configuration notes are specifically created to guide the user through an aspect of the configuration.
- Technical bulletins: These documents are created to facilitate the configuration of a specific technical action, such as performing a firmware upgrade.
- Hardware installation guide: They provide the detailed procedure on how to safely and adequately install the unit. It provides information on card installation, cable connections, and how to access for the first time the Management interface.
- User guide: The user guide explains how to customise to your needs the configuration of the unit. Although this document is task oriented, it provides conceptual information to help the user understand the purpose and impact of each task. The User Guide will provide information such as where and how TR-069 can be configured in the Management Interface, how to set firewalls, or how to use the CLI to configure parameters that are not available in the Management Interface.
- Reference guide: This exhaustive document has been created for advanced users. It includes a description of all the parameters used by all the services of the Mediatrix units. You will find, for example, scripts to configure a specific parameter, notification messages sent by a service, or an action description used to create Rulesets. This document includes reference information such as a dictionary, and it does not include any step-by-step procedures.
Top
Copyright Notice
Copyright © 2023 Media5 Corporation.
This document contains information that is proprietary to Media5 Corporation.
Media5 Corporation reserves all rights to this document as well as to the Intellectual Property of the document and the technology and know-how that it includes and represents.
This publication cannot be reproduced, neither in whole nor in part, in any form whatsoever, without written prior approval by Media5 Corporation.
Media5 Corporation reserves the right to revise this publication and make changes at any time and without the obligation to notify any person and/or entity of such revisions and/or changes.