Score:0

How to do traffic shaping for a stunnel server that acts as a forwarder?

km flag

I am wondering if there is a way to perform traffic control using tc for a stunnel forwarder server. Here I explain the scenario:

I have an ubuntu server that has stunnel installed and is forwarding incoming traffic through port 443 to another server's port 443. The configuration file is something like this:

debug = 7
sslVersion = TLSv1.3
pid = /var/run/stunnel4/stunnel.pid
[client01]
accept = 443
connect = $remote_server:443
cert = /etc/stunnel/cert.pem
client = yes

Now every thing works perfectly and I can connect to port 443 of my remote server through my local server and get up to maximum of 200Mbits of download speed. Multiple users can connect at the same time and they do it from their arbitrary IP. I want to restrict their download speed so that each individual cannot exeed maximum of 15Mbit.

I want to do this through tc. But I don't know what is the best way of doing it. Should I setup tc to restrict the interface? If yes, what are the commands that do this for me?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.