Only if the salt is kept secret. There also needs to be a different salt value per ip, obviously. But given those conditions, it works.
Of course, it would be just as simple to use the salt as-is, in that case, since you have to look it up anyway.
A salt will render rainbow tables useless, but AIUI will not prevent brute-forcing after the fact. IPv4 has ~4 billion addresses, which would be too expensive for data analytics but could be brute-forced if someone really wants this one piece of data in particular.