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
-
Edit the Stunnel configuration file
sudo nano /etc/stunnel/stunnel.conf
-
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.
-
-
Save and exit (
Ctrl + X
, thenY
, thenEnter
).
3. Start Stunnel
sudo systemctl start stunnel4
sudo systemctl status stunnel4
4. Verify Setup
-
Check if Stunnel is listening:
netstat -tulnp | grep stunnel
-
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
(replacePORT
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
(replaceSTUNNEL_IP
with the IP address of the device running Stunnel andPORT
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
-
Download the latest Stunnel installer from the official website.
-
Run the installer and follow the prompts.
-
After installation, navigate to the Stunnel directory (usually
C:\Program Files (x86)\stunnel
).
2. Configure Stunnel
-
Open
stunnel.conf
in a text editor. -
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. -
Save the file.
3. Run Stunnel as a Service
-
Open a command prompt as Administrator.
-
Navigate to the Stunnel directory:
cd "C:\Program Files (x86)\stunnel"
-
Install Stunnel as a service:
stunnel.exe -install
-
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
(replacePORT
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
(replaceSTUNNEL_IP
with the IP address of the device running Stunnel andPORT
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.
Comments
Article is closed for comments.