Page 1 of 1

Lua to checl an IP befor allowing an IP to logon

Posted: Fri Jun 23, 2023 5:28 pm
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

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

Posted: Mon Jun 26, 2023 3:17 am
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"