Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
641 views
in CompleteFTP by
Is it possible to automate adding IP addresses to the whitelist for a site? Sometimes I get a user that gets falsely flagged for auto-ban. What I was thinking was that I could add their IP to the whitelist based on successful authentication into my other application. I could write a .NET extension if that would work. Just don't know where to start. Thanks!

1 Answer

0 votes
by (51.5k points)

You should be able to do this with a combination of a process trigger event and an IP filter extension.

The process trigger event would trigger on a successful login and record the IP address of the client in a file or a database (e.g. SQLite, which has inbuilt support).

The IP filter extension would look for the client IP address in the file/database and return 'AllowAlways' if it finds it and 'Allow' otherwise.  'AllowAlways' makes the client immune to autobans, where as 'Allow' enables them (if the conditions are met).

I'd recommend doing it in Javascript (i.e. JSS) as the development cycle is a lot quicker since server restarts aren't required between tests.

One place to start might be too look at the example customer IP filter that uses an SQLite database to implement a blacklist.  Feel free to keep asking questions.  I enjoy these types of questions.

by
Thank you for the answer and example link. That looks like a perfect place to start. Appreciate it!
by (51.5k points)
I'd start by just logging the IP address on login and then watching the real-time log to see what happens.  To do this, go to the Events panel, add an event, choose the 'log in' event, select 'JSS script', enter the script below and client Apply changes.  Then go to the Monitoring panel and click 'Show'.

console.log(event.loginUserName + " logged in from " + event.clientIP);

Categories

...