Controlling anonymous ftp volumes.

lance.norskog lance at motcsd.csd.mot.com
Wed May 29 05:55:45 AEST 1991


russell at ccu1.aukuni.ac.nz (Russell J Fulton;ccc032u) writes:

>We have an anonymous ftp archive of mac, msdos and some other material. We
>set it up mainly for use of people within New Zealand to save traffic on
>our international link as lots of people download the latest version of
>4DOS or whatever from SIMTEL. Our problem is that we are now getting traffic
>from all over the world! Our connection to the rest of you is via an expensive
>satellite link on which we pay for *all* the traffic. 

If you're using inetd you can make it call a shell script
which then calls ftpd.  The shell script's standard input is
the incoming FTP socket.  The shell script can do any level
of checking it wishes: 1) write a program which prints getpeername()
from standard input, 2) check it against the database of assigned 
New Zealand network numbers.  You should be able to get this data from
the NIC.

Other sites use this trick to limit the total number of simultaneous
FTP sessions.

Lance



More information about the Comp.unix.admin mailing list