Lua to checl an IP befor allowing an IP to logon

Please post here if you have problems in using Wing FTP Server.
Post Reply
DomDis
Posts: 33
Joined: Sat Mar 18, 2023 7:44 pm

Lua to checl an IP befor allowing an IP to logon

Post by DomDis »

Can I use a Lua script to deny access based on blacklist like

Code: Select all

 	Blacklist 	Reason	TTL	ResponseTime	
Status Problem LISTED	BARRACUDA 	180.101.88.235 was listed  900	33	Ignore
Status Problem LISTED	MAILSPIKE BL 	180.101.88.235 was listed  120	150	Ignore
Status Problem LISTED	MAILSPIKE Z 	180.101.88.235 was listed  120	150	Ignore
Status Problem LISTED	SORBS SPAM 	180.101.88.235 was listed  3600	0	Ignore
Status Problem LISTED	Spamhaus ZEN 	180.101.88.235 was listed  60	0	Ignore
Status Problem LISTED	UCEPROTECTL2 	180.101.88.235 was listed  2100	16	Ignore
Status Problem LISTED	UCEPROTECTL3 	180.101.88.235 was listed  2100	16	Ignore
By using the BeforUserLoggedIn action or event
FTP
Site Admin
Posts: 2080
Joined: Tue Sep 29, 2009 6:09 am

Re: Lua to checl an IP befor allowing an IP to logon

Post by FTP »

Yes, of course you can if you know how to read your blacklist, for the event "BeforUserLoggedIn", you can get the client IP address like this:
local clientIP = "%IP"
Post Reply