What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

RT-N66U limit FTP upload/download speed

Fire-Dragon-DoL

Occasional Visitor
I would like to know where is located the FTP configuration of the ftp server. I'm looking for it but actually if I change something in the UI, it's not reflected in NVRAM settings so I suppose that's not the right place.

Also, more important, are there any chance to limit bandwidth speed globally or on a per-user basis? No problem doing it by console, but I have yet to find settings :P

If I allow a friend to start downloading from my FTP I want to also avoid them to burn all my upload speed.

Thanks for any suggestion

P.S.
I use Merlin firmware
 
I found the solution by myself.
First, vsftpd is FTP used by our router, placed in /usr/sbin/vsftpd, the conf file instead is located in /etc/vsftpd.conf

I noticed that by manually restarting the ftp config (in the web page) or change any settings, will overwrite the file, so the solution I found is "temporary" (until router restarted).

Kill all vsftpd instances, I noticed only -9 works as signal. (use kill -9 PID, found with ps)

Edit /etc/vsftpd.conf and add the following lines:
local_max_rate=204800 <-- bytes per second (0 unlimited)
anon_max_rate=204800 <-- bytes per second (0 unlimited)

So I'm limiting bandwidth at 200KB/sec both for anonymous and normal user. But wait, we need to restart the FTP server!

Just run vsftpd /etc/vsftpd.conf & <-- Yes with "and" symbol, and it's done, type "exit" and you have your ftp server with bandwidth limit.

Docs about config file:
https://security.appspot.com/vsftpd/vsftpd_conf.html
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top