SMPP Over TLS

Our SMSC servers currently support only SMPP over TLS. Since some applications don't natively support SMPP over TLS, we recommend using Stunnel, an open-source SSL/TLS proxy, to securely connect your application to our servers. Stunnel acts as an encryption wrapper, enabling secure TLS channels between clients and servers.


Please follow the appropriate guidelines for your operating system:

LINUX

1. Installing Stunnel 

On Debian/Ubuntu

sudo apt update && sudo apt install stunnel4 -y
sudo systemctl enable stunnel4

On CentOS/RHEL

sudo yum install epel-release -y
sudo yum install stunnel -y

2. Configure Stunnel

  1. Edit the Stunnel configuration file

    sudo nano /etc/stunnel/stunnel.conf
  2. Add the configuration for two hosts on one listening port

    pid = /var/run/stunnel.pid
    client = yes
    
    [multi-host]
    accept = 12345  # The listening port
    connect = IP.HOST.1:PORT
    connect = IP.HOST.2:PORT
    • accept → The port Stunnel will listen on (e.g., 12345).

    • connect → The target hosts and ports (replace with the provided IPs and ports).

    • client = yes → Indicates that Stunnel is running in client mode.

  3. Save and exit (Ctrl + X, then Y, then Enter).


3. Start Stunnel

sudo systemctl start stunnel4
sudo systemctl status stunnel4

4. Verify Setup

  1. Check if Stunnel is listening:

    netstat -tulnp | grep stunnel
  2. Test the connection:

    openssl s_client -connect 127.0.0.1:PORT

5. Configuring your application:

After confirming that the TLS wrapper is operational, configure your application to interface with Stunnel:

  • If Stunnel is installed on the same server as your application: Direct your application to connect to 127.0.0.1:PORT (replace PORT with the specific port number you've set).

  • If Stunnel is running on a different machine, router, or server: Ensure that the designated device is configured to listen on the specified port. Then, configure your application to connect to STUNNEL_IP:PORT (replace STUNNEL_IP with the IP address of the device running Stunnel and PORT with the appropriate port number).

This setup will enable your application to establish a secure connection through Stunnel.


6.  You are ready

Stunnel is now configured to listen on your desired port and securely forward traffic to both hosts. You can begin testing our SMPP over TLS service.


7. Additional: Restart Stunnel After Changes

sudo systemctl restart stunnel4

 

WINDOWS:

1. Download and Install Stunnel

  1. Download the latest Stunnel installer from the official website.

  2. Run the installer and follow the prompts.

  3. After installation, navigate to the Stunnel directory (usually C:\Program Files (x86)\stunnel).


2. Configure Stunnel

  1. Open stunnel.conf in a text editor.

  2. Add the following configuration:

    client = yes
    
    [multi-host]
    accept = 12345  # The listening port
    connect = IP.HOST.1:PORT
    connect = IP.HOST.2:PORT
    accept → The port Stunnel will listen on (e.g., 12345).
    connect → The target hosts and ports (replace with the provided IPs and ports).
    client = yes → Indicates that Stunnel is running in client mode.
  3. Save the file.


3. Run Stunnel as a Service

  1. Open a command prompt as Administrator.

  2. Navigate to the Stunnel directory:

    cd "C:\Program Files (x86)\stunnel"
  3. Install Stunnel as a service:

    stunnel.exe -install
  4. Start the service:

    net start stunnel

4. Configuring your application:

After confirming that the TLS wrapper is operational, configure your application to interface with Stunnel:

  • If Stunnel is installed on the same server as your application: Direct your application to connect to 127.0.0.1:PORT (replace PORT with the specific port number you've set).

  • If Stunnel is running on a different machine, router, or server: Ensure that the designated device is configured to listen on the specified port. Then, configure your application to connect to STUNNEL_IP:PORT (replace STUNNEL_IP with the IP address of the device running Stunnel and PORT with the appropriate port number).

This setup will enable your application to establish a secure connection through Stunnel.


5.  You are ready

Stunnel is now configured to listen on your desired port and securely forward traffic to both hosts. You can begin testing our SMPP over TLS service.

 

 

 

 

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.