# ProFTPD and TransferRate

## DecoR

Hello, I've searched the forum for ProFTPD and TransferRate, and found one topic almost matching, but they give noe description on my problem.

ProFTPD

This is sure a newbee thing:

I dont want my friends on the internet lagging me down, so I have

```

TransferRate 40

```

in my proftpd.conf file.

But on my home LAN i want my other computer (10.0.0.4) to have no limitations.

How do I do this?

Thanks  :Wink: 

----------

## Diorf

you have to define VirtualHosts to do this. One for the internet and one for your lan.

just let global parameters of your server in the global section and define two virtualhost like this:

```
<VirtualHost lan_hostname>

         what you need for it

</VirtualHost>

<VirtualHost net_hostname>

         TransfertRate 40

</VirtualHost>

```

and people who access your FTP by net_hostname (like ftp://net_hostname) would have the transfert rate activated, and people who access your FTP by lan_hostname won't.

----------

## sgaap

TranferRate (or the above syntax) doesnt seem to work with proftpd 1.2.9

I use "TransferRate number_of_max_kbits" 

and proftpd bails out with:

 Fatal: TransferRate: wrong number of parameters

I searched with goodle, on this forum and on the proftp site and nowhere there is usefull documentation on 1.2.9

With 1.2.8 I used MaxBPS, but that only limited the rate per connection (which sucks), I now use 1.2.9 because I hoped proftp supported bandwidth capping for all connections (total bandwidth for a user is divided among the number of connections that user has open)

As it seems TransferRate 75000 (which is the number of bytes I want for as a max upload in total) is not working, has someone here an idea howto get proftpd 1.2.9 working with TransferRate or with an alternate config option?

----------

## fragbert

sgaap,

You have to specify the type of transfer (RETR, etc). Here is an example that I'm using: 

```
<Anonymous ~ftp>

# Limit everyone to 8 KB/sec

TransferRate RETR 8

...

</Anonymous>
```

So this only limits downloads to 8 KB/sec. Uploads are still uncapped (but they're disabled, so who cares?  :Razz: )

Good luck,

Michael

----------

## sgaap

Hmm, that did the trick with TransferRate, but it still doesn't divide the bandwidth (75kB max, 2x37,5, 5x15 etc)

Is this still not possible with 1.2.9 (I know it wasnt in 1.2.8 but its such basic functionality so I expected it to be in 1.2.9+)

I am really used to the easy of use of proftpd (pureftp is a lot different and definitly not as easy as proftpd --> where do you define ftp paths and users for example) so I hope someone here knows how to fix this.

I am looking into iptables bandwidth control and that seems a nice solution but it involves a lot more work (a bit too much for only a simple ftp server)

----------

