View Full Version : [REQ] BAN IP (site not user) for UP/DL
I do not know so there with already a script to do that
To ban a IP in DL or UP
example: No rlz can be up on IP banned from the site
glftpd do already that
hum in french...
Un script capable de bannir des ip pour DL ou UP Ã_ partir du site, glftpd gère déjÃ_ cet fonction, ainsi impossible d'uploader des rlz a partir du site vers l'ip ban, je ne suis pas sûr mais je pense que ca n'existe pas encore pour ioFTPD.. Ã_ confirmer
Mouton
08-24-2004, 07:53 PM
Not possible.
[L] PASV
[L] 227 Entering Passive Mode (ip1,port1)
[R] PORT ip1,port1
[R] 200 PORT command successful.
[R] STOR somefile.ext
[R] 150 Opening ASCII mode data connection for somefile.ext.
[L] RETR somefile.ext
[L] 150 Opening ASCII mode data connection for somefile.ext.
If your site is [R], in this case you could simply catch PORT commands, and return an error if ip1 is banned. But the thing is, if it fails that way, the FTP (FXP) client can simply try it the other way around, and it will work:
[R] PASV
[R] 227 Entering Passive Mode (ip2,port2)
[L] PORT ip2,port2
[L] 200 PORT command successful.
[L] STOR somefile.ext
[L] 150 Opening ASCII mode data connection for somefile.ext.
[R] RETR somefile.ext
[R] 150 Opening ASCII mode data connection for somefile.ext.
In this case, there's no way to block ip1, since we don't see it.
If you want to block all transfers to certain IPs, I suggest a firewall. Very simple then, simply add a custom rule to block all traffic to and from that IP.
Done.
Grendel
09-19-2004, 10:13 AM
..or... quick and dirty..
block the siteaccess in HOSTS.RULES file with
DENY I xxx.xxx.xxx.xxx "No Access allowed from Site <sitename>"
(you have to restart ioFTPD for that)
Mouton
09-19-2004, 10:52 AM
Hosts.Rules handles control connections, not data connections.
dink-puller
10-28-2004, 08:04 AM
I did it like this:
# Detailed permissions for directories
# Custom flags
Download = * D
Upload = * U
All users who can up/download will have these flags.
vBulletin® v3.8.11 Alpha 3, Copyright ©2000-2024, vBulletin Solutions, Inc.