Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have just set up one of my old computers to be a web-server with Ubuntu 12.04.3. I was thinking that i should probably throttle/limit the bandwidth/speeds over ssh/ftp in order to not murder my internet at home when the server is being accessed. Ive got Comcast internet 28mbps down 5mbps up. I probably wont set throttling up unless the server starts bogging down my internet but if some one could tell me how would I go about throttling it for ssh and ftp connections.

share|improve this question
    
I wouldn't bother unless it's actually affecting something. I run a webserver at home, and the only time when my internet at home gets affected is when someone downloads a big file from my home server, which was almost never. –  Lawrence Dec 24 '13 at 5:51
    
ill go ahead and try w/o throttling first then. Could you tell me how to set it up in case I decide to? –  cojomojo Dec 24 '13 at 6:54

1 Answer 1

up vote 1 down vote accepted

There are many ways to do it.

1) you can do it directly by acting on your program. For instance, with ProFTPd, insert this line

   TransferRate RETR,STOR,APPE,STOU 1000 

in the file /etc/proftpd.conf. This will limit bandwidth to 1000 kB/s. The same thing cannot be done with ssh though, which has always been meant for interactive sessions, not background downloads.

2) You can use tc (=Traffic Control, appropriately). I have little experience with it, I can just point you to this fine Introduction to the topic. I find this solution too ad hoc for my tastes, and too difficult to port, but of course you may differ, so do take a look at it.

3) You can use QoS (=Quality of Service) in your router. You will have to find a voice QoS in your GUI, and see the specifics. It will allow you to set limits depending on MAC address or application (you can define a new application as you wish, if the one you want to throttle is not already in the list), but not the two simultaneously. This means that if you throttle ftp this way, it will be throttled for all pcs on your LAN. If you want to evade this constrain, you will have to set up a VLAN or a DMZ (which might be a good idea anyway, security-wise), in which you place only your server.

As ever, YMMV.

share|improve this answer
    
thanks so much, this will come in handy! –  cojomojo Dec 25 '13 at 9:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.