This question already has an answer here:
It appears connecting on any premium account does not let me connect to any servers and displays:
"Failed to login: Invalid ip 184.108.40.206"
Possibly Minecraft Authentication issue, from reports is seems it may be worldwide? Login authentication through the launcher works fine. But connecting to a server responds with "Invalid ip"
EDIT MojangStatus has posted on twitter regarding this for anyone wondering:
We’re working on fixing the issue people are currently experiencing with authentication - TM
I will also link the mojang portal although it says everything is working fine: https://help.mojang.com/
This question provides far more useful info and the correct answer than: How do I fix Invalid IP? If the answers could be marked appropriately and not marked as a duplicate as this does not provide users with the correct answer. Thank you