This sounds like an unfortunate build decision coming back to hurt maintenance; that in itself is a common occurrence. One phrase I must repeat here is "if things dont go as you planned, you have had an experience." The issue that you have, at least in the school I went to, is called a Magic Number
Unique values with unexplained meaning or multiple occurrences which could (preferably) be replaced with named constants
A better method would be to define a site variable ( code example ) to hold the ip address and then go and edit all of the references to it throughout the entire site to use that variable instead. This works if all of the links are generated in php somewhere, and not just hard-coded in the body field of various nodes. The advantage here is, if that ip address changes again you only have to update the variable value. That can even be done with a drush vset.
Now, assuming these links are in node bodies and do not have the ability to use a php variable, you can get a similar result with a hook. I would still recommend setting the new ip in a variable. Then using a hook_node_view you can preg_replace the old ip address with the contents of the variable in the whole body field for any node. Or in other fields too, or only on nodes of