throttle sftp connected to linux?

oog

Golden Member
Feb 14, 2002
1,721
0
0
hello,

i have a linux (gentoo) machine at home that i use to do various things. occasionally, while i'm away from home, i transfer files through sftp. i think that this file transfer puts additional load on my upstream bandwidth at home, and i would like to throttle it to a certain level if that's possible. does anyone have any pointers to how i would do this?

thanks!
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
There are throttling modules for netfilter, I believe. You could also use ALTQ on a BSD machine in front of the linux box. ;)
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
i started to take a look at netfilter, but most of the information i see on throttling is on a per-interface basis where the machine running the netfilter rules is acting as a router. is this possible to do on the same machine that is supporting the sftp?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: oog
i started to take a look at netfilter, but most of the information i see on throttling is on a per-interface basis where the machine running the netfilter rules is acting as a router. is this possible to do on the same machine that is supporting the sftp?

It should be possible. I can't think of a reason it wouldn't be...
 

Haden

Senior member
Nov 21, 2001
578
0
0
Simple solution would be to create netfilter rule which matches traffic you want and marks it (-j MARK).
Now, with tc you should use TBF (with specified rate).

This might seem to be a little to much for such primitive task, however it is rather simple and you will be "ready" for any limiting/shaping you might need later.
On how do it, consult howto