Using a text based editor, find and edit config.php file at the root
of moodle code.
Add the following lines right after:
$CFG->admin = 'admin'; of that file.
Save file. That overrides values in tables of DB and sets both columns for ip allow/blocking to 'nothing'. As long as those lines are in config.php file one cannot set/add/change the settings as admin or any other moodle user.
No need to restart any service or server.
Just access with browser.
When it comes to allow or blocking ip addresses, there must be a reason ... are you having issues related?
IMHO, best way to handle such is by using the operating system tools/config for networking on server. That then works at the network layer of the server and not the application layer. How easily that is done depends upon access to server.