Pseudo code (assuming php is used), Also assuming IP block range is 18.104.22.168 to 22.214.171.124
1) User loads admin page (IP Sent automatically to webserver)
2) PHP in index.php/admin.php inside of the admin page executes
3) Gathers current users IP address from web server
4) Depending on broadness from block table in a database, flat file, or hard coded; preform the following test on the ip
4a) Extract the Users IP address in to an array with each block its own array (example ip is 126.96.36.199)
Meaning Array  = 141 : Array = 20 : Array = 154 : Array = 90
4b) using first segment (Array ) match to first segment IP segment in block list (If using multiple IP address loop through) IF Match continue to 4c Else show the page
4c) Continue process with other IP segments, Repeat and match while looping through if multiple IP Address IF Match repeat 4c Else If black list IP Segment is 0 proceed to step 5 Else Show the page .
5) User IP matches an IP in our black list. At this time you can do a few things depending on how you want it handled. You could cause an HTTP Error 404 Page Not Found, Redirect to your site or another site, or show the infamous white page of death.
HTH, and that you where able to follow along.