I am using an OpenSSH server for a client app that uses the traffic forwarding, SSH tunnelling and some users are consuming an extraordinary amount of bandwidth. Is there a way to shape the traffic on SSH port output or SSH/TCP/IP Session and make sure that the fair amount of bandwidth gets distributed for each connected user?
I have come across of this site and modified the script, but I was wondering if there is a better solution to resolve the occurred problem.
tc qdisc add dev eth0 root handle 1: htb
tc class add dev eth0 parent 1: classid 1:1 htb rate 4096kbps
tc class add dev eth0 parent 1:1 classid 1:5 htb rate 2048kbps ceil 2208kbps prio 1
tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 5 fw flowid 1:5
iptables -A OUTPUT -t mangle -p tcp --sport 22 -j MARK --set-mark 5
wondershaper clear eth0 && wondershaper eth0 4096 1024