Why does "what is my IP" not match what I see in my Apache logs?

Solution 1:

Your cell phone ISP is using carrier-grade NAT. This is true almost anywhere in the world except if you pay for special IoT/business services.

While a carrier-grade NAT system does work somewhat like your home router, it typically has multiple public IP addresses assigned and will try to balance the load between them. The specifics of the load balancing algorithm vary, but one simple key could be (source IP, destination IP). Azure isn’t Google, so your communication ended up being translated to a different public IP address.


This is also why firewall rules like “allow traffic only from 1.1.1.1” only work if 1.1.1.1 is actually a static IP address. Even without carrier-grade NAT, your IP address on a non-business Cable/DSL connection could change at any time.