Software > HFS ~ HTTP File Server

ban on the run

(1/2) > >>

snoop:
hello! How can I ban IP not directly from HFS? I need to do it using my own program.
I see HFS settings are saved in ini or in registry
So I can modify them using my own tools. But HFS wont reload it in runtime. So how can I solve this problem?
Maybe somehow send a command to HFS to add a ban?

Mars:
 Start HFS
In Menu/Limits/Bans…, enter the ip you will to be banned  example “192.168.1.10” without the quotation marks and yoy can check “Disconnect with no reply”

Apply + OK --> that's all!  ;)

LeoNeeson:
@Snoop: Welcome to the forum. It's not totally clear how you want to "send a command to HFS to add a ban" using your own program. May I ask you what type of program you want to use?. If you add more details it would be easier to help you. If you need to issue a ban from an external connection (because you are not sitting behind the HFS server), perhaps using some HFS's macro you could do the same and much easier. Please add more details.

@Mars: If I'm not mistaken, this user wants to 'add a ban' using an external program (or from an external connection). But if he externally edits the .ini settings file, HFS won't read those configurations until HFS is restarted. He needs a 'live' way to issue a ban from an external program (and not using HFS's menu option). OR perhaps he wants to issue a ban from an external connection, and using a macro this could be more easier to achieve (it would require an admin login that executes a macro that adds to HFS the IP to be banned).

Mars:
if it is necessary to send the addition of a ban ip remotely, it must be sended a form to an hfs script that will support the addition of the value using the macro {.set ini | .} but it is delicate from a safe point of view

you must retrieve the set using {.get ini | ban-list.}
but the data in return are in the form
192.168.1.1#banned|193.169.10.2#not allowed|255.3.45.36 # NO!|

including pipes and making the management pretty tricky because of the macros.

it is probably necessary to use these macros, but I do not know the exact effects in the handling of text strings

     'no pipe'        replace '|'  by '{:|:}'
     'no pipe'        replace '{:|:}'  by '|'

the fields must be separated and then reassembled to be fed back into the configuration, which will have to be saved automatically at the output or at regular intervals or in force by means of a macro.
everything that includes remote hfs configuration management is a risk for hacking, especially when the exchanges are not done in SSL

it must be remembered that mishandling or erroneous data may create a ban rendering hfs unreachable

I do not know if there is an equivalent in English but as we say in France, "the game is not worth the candle"

Fysack:
hardcore *muselarm*

Navigation

[0] Message Index

[#] Next page

Go to full version