Currently the IP comparison is done against the global variable $_SERVER['REMOTE_ADRRESS]. In case the TYPO3 instance is behind a reverse proxy, this variable contains the ip of the reverse proxy. The comparison is always false.
Solution is to use the request attribute normalizedParams and fetch the remote ip address from there with ->getRemoteAddress().