Global Pre recieve hooks to block push from IP range

I’ve checked the documentation, but I still don’t understand how to get the information about who pushed the commit( I need at least IP address)
G

The server side hooks do not have the information about the client IP address — they run commands in a limited scope as the git user on the server.

To block IP ranges, you can manage group/project level access for users by IP address. Group access and permissions | GitLab Additionally, protected branches can help with limiting access too.