Operating System - HP-UX
1833568 Members
3411 Online
110061 Solutions
New Discussion

Re: Moving servers: How to check for IP references

 
Stuart Abramson
Trusted Contributor

Moving servers: How to check for IP references

We're moving to a new Data Center.

We're changing IP addresses. All of them!

How do I "scan" a system looking for references to IP addresses instead of DNS-defined hostnames.

I know where to look in HP-UX:
/etc/hosts
/etc/resolv.conf
/etc/ntp.conf
/etc/etc...

But I'm thinking of application areas.

I have thought of just:

find / -type f | while read FILE
do
file $FILE | grep -q text
if [[ $? = 0 ]] # We have a text file
then
strings $FILE | grep $STRING
if [ $? = 0 ] # I found the
then
print "==> " $FILE "\n"
fi
fi
done

where STRING is some kind of IP address sequence.

Has anyone done this before?
2 REPLIES 2
Florian Heigl (new acc)
Honored Contributor

Re: Moving servers: How to check for IP references

No, and I don't think there's a much easier way for doing it :(

You might also run ethereal and create logs of incoming / outgoing connections (the first packet should be enough)
yesterday I stood at the edge. Today I'm one step ahead.
Robert Salter
Respected Contributor

Re: Moving servers: How to check for IP references

As we all know apps should use FQDN instead of IP, but there's always those few that have the IP hardcoded. So, don't your application folks know where to look? Probly not.
Depending on how big your system is the find command could take a bit.

Good luck

Time to smoke and joke