1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-07-08 00:34:57 +03:00

Merge pull request #1122 from benrubson/ban

Log client IP in failed accesses
This commit is contained in:
Ilya Shipitsin
2020-05-13 15:35:45 +05:00
committed by GitHub
8 changed files with 11 additions and 8 deletions

View File

@ -2017,8 +2017,11 @@ bool ServerAccept(CONNECTION *c)
if (auth_ret == false)
{
// Get client IP to feed tools such as Fail2Ban
char ip[64];
IPToStr(ip, sizeof(ip), &c->FirstSock->RemoteIP);
// Authentication failure
HLog(hub, "LH_AUTH_NG", c->Name, username);
HLog(hub, "LH_AUTH_NG", c->Name, username, ip);
}
else
{