Big Bill wrote:
>>> Iptables will block only known connections, suppose Joe gives his
>>> login to his brother !?
>>
>> iptables/netfilter would block *all* access (layer 3). Why do you
>> think netfilter cares about login IDs (layer 7)?
>
> Not login IDs but IPs.
> One only have to reset his modem to change the IP making the iptable
> useless.
Typically "blocking" without qualification in iptables means all IPs.
>>> There's a welcome banner_file that says that tfrs are only accepted
>>> from 9pm to 6am otherwise banished. But it's like income rules !!
>>
>> Yeah, income is nice, but I don't understand what it's got to do with
>> vsftpd.
>
> Rules are meant to discourage one from doing unwanted things by
> punishments enforcing . But they don't stop peoples from overspeeding.
> My rule is : no xfers during working time ; my punishment is banishment.
> But some overpass that.
Ah. Language barrier. "Income" is money that you get, as opposed to
money that you spend (outgo). Rules as a verb is a synonym for reigns.
> What I observe is that authorized X puts something in his ftp space and
> gives his login to unknown Z who grabs it. It's becomming a temporary
> xchange facility. I don't care as long as it doesn't restrict my use of
> the server, what it begins to do.
Warez? You said this was a "family" server. If you've lost control of
who has usernames and passwords, that seems to go beyond just family.
>> So *you* want 24 hour access, but everybody else is 9pm to 6am? Why
>> not use scp yourself 24/7 and turn vsftpd on and off for everyone else?
>>
>> Or you could set up two user_list/ftpusers files (which *is* a vsftpd
>> thing and a pam thing - see the other recent thread on vsftpd in this
>> group) and use cron to swap them at 9pm and 6am. One file allows only
>> you and one allows you and anyone else you want. It's kludgey and won't
>> kick off people who are already on at 6am, but it should work otherwise.
> I know and that's the problem. One could start a big transfer at 5:58.
>
> I think I'll have to stop ftp for all but me and write a http transfer
> page instead combined to .htaccess file. That way it'll be easy to deny
> any transfers that will be too long even if they give their login to
> others. Along with a rewrite rule to change the group and owner of the
> uploaded file, no one but the authorized one (like me) could then do
> what he wants with the file then discouraging non authorized loggers to
> come and sip on the server.
I'd still say use scp for yourself. There's an AlowedUsers directive in
the ssh config. Stop and start vsftpd for everyone else using cron.
When you stop vsftpd, make sure to kill all the children, too.
ssh/scp also has the benefit that your username and password aren't
transmitted in the clear across the Internet. Presumably only you can
become root. Even better is to disable password authentication in favor
of public keys, which stops brute force attacks on your password. Of
course, the security of ssh/scp and vsftpd is a whole other topic.
|