Tonino Jankov introduces the WordPress Settings API, and showing how to create a WordPress administration page to demonstrate the use of this API. In this article, he shows how to wrap this functionality into a plugin, though it can also be a part of a WordPress theme.
Using the WordPress Settings API to Build a Custom Admin Page
Setting IP Restrictions for the WordPress Login Page
Rafay Saeed Ansari walks us through a step-by-step procedure to set IP restrictions for the WordPress login page.