Should I throttle my Ubuntu server that is on my home network?

0

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.

cbalos

Posted 2013-12-24T05:41:33.330

Reputation: 378

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 – 2013-12-24T05:51:04.263

ill go ahead and try w/o throttling first then. Could you tell me how to set it up in case I decide to? – cbalos – 2013-12-24T06:54:05.157

Answers

1

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.

MariusMatutiae

Posted 2013-12-24T05:41:33.330

Reputation: 41 321