IIS IP and Dynamic restriction

For me, it’s not working for “IP and dynamics option” to block all IP and allow one IP’s alone.

But we can use URL Rewrite to block the IPs. I tried from google, for code its not works.

Its will work for other application like WordPress with webconfig file or Apache with .htaccess file.