Old 12-26-2005, 05:42 PM   #1
Grendel
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Grendel's Avatar
 
Join Date: Jul 2004
Posts: 187
Default ioHOSTSRULES

ioHOSTSRULES v1.0
(tested on WinXP/Win2003 only)


Syntax:

Code:
.---[HostsRules]----------------------------------------------.
|                                                             |
| Usage: SITE HR <opt> [<action> <ip|host> <ipadr|hostname>   |
|                       <class|log> [<connections_per_ip>]]   |
|                                                             |
| <opt>        LIST   or L : List complete Hosts.Rules        |
|              ADD    or A : Add a rule                       |
|              DEL    or D : Delete a rule                    |
|                                                             |
| <action>     ACCEPT or A : ACCEPT rule                      |
|              DENY   or D : DENY rule                        |
|                                                             |
| <ip|host>    IP     or I : define ip-adress                 |
|              HOST   or H : define hostname                  |
|                                                             |
| <ipadr|hostname> any ip-adress, ip-range or host            |
|                                                             |
| <class>          in case of IP defines a class              |
|                  (case sensitive)                           |
|                  (only necessary for ACCEPT rules)          |
|                                                             |
| <log>            defines a Log-string                       |
|                  (only necessary for DENY rules)            |
|                                                             |
| <connections_per_ip> defines number of connects per ip/host |
|                      (only necessary for ACCEPT rules)      |
|                                                             |
| Note: add or delete rules to/from Hosts.Rules               |
|                                                             |
| Info: if deleting a DENY rule, a log text is not necessary  |
|       script doesn't check, if ip/host-syntax is correct.   |
|                                                             |
| List-Examples:                                              |
| ~~~~~~~~~~~~~~                                              |
|                                                             |
| SITE HR L                                                   |
| SITE HR LIST                                                |
|                                                             |
| Add-Examples:                                               |
| ~~~~~~~~~~~~~                                               |
|                                                             |
| SITE HR ADD ACCEPT I 66.66.66. USER 20                      |
| SITE HR ADD A I 66.66.66. USER 20                           |
| SITE HR A A I 66.66.66. USER 20                             |
| SITE HR ADD DENY I 193.193. "No Access from 193.193."       |
| SITE HR A DENY H .aol.com "No Access allowed: .aol.com"     |
| SITE HR A D H .aol.com "This range sux ;-) : .aol.com"      |
|                                                             |
| Delete-Examples:                                            |
| ~~~~~~~~~~~~~~~~                                            |
|                                                             |
| SITE HR DEL A I 66.66.66. USER 20                           |
| SITE HR D A I 66.66.66. USER 20                             |
| SITE HR D D H .aol.com "This range sux: .aol.com"           |
| SITE HR D D H .aol.com                                      |
|                                                             |
.----------------------------------------------------[ioHelp]-.
Installation:

1) copy ioHOSTSRULES.exe and ioHOSTSRULES.ini
to ..\scripts\ioHOSTSRULES\

2) configure fullpath to your Hosts.Rules in ioHOSTSRULES.ini

3) add the lines below to ioFTPD.ini

Code:
[FTP_Custom_Commands]
hr = EXEC ..\scripts\ioHOSTSRULES\ioHOSTSRULES.exe
 
[FTP_SITE_Permissions]
hr = M
4) rehash config

Additionally:

5) if you use ioHELP v1.10, copy "hr.site" to your ioHELP\Site dir


Known limitations:

- no syntax check for hostnames/ips
- no add/delete for CLASS or POLICY supported
- it does not sort the rules, adds new one at the end of file

About "REHASH"

so...and before someone tell me something about this matter below...
Quote:
http://www.inicom.net/pages/en.ioftpd-kb.php

Q: What is the Hosts.Rules file ? How do I configure it ?

Note: You need to restart ioFTPD.exe each time you modify Hosts.Rules. A rehash won't do.
... this KB seems to be incorrect !
a simple rehash is enough (tested out with ioFTPD versions 0.5.85r and above.)


...and now be careful playing around with your Hosts.Rules
(i case of problems your will find a .BAK file in .\etc dir )

bugreports and suggestions are welcome...
have fun
__________________
- FlashFXP v4.0 BETA (v3.7.9 Build 1401) registered
- Windows 7 x64
- McAfee Antivirus Enterprise 8.7i Patch 2 + Antispyware 8.7i
Grendel is offline   Reply With Quote
Reply

Tags
.aol.com, add, deny, hosts.rules, site

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:13 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)