The IP address you get from whatismyip will be the external IP address of your router or equivalent, which has a separate IP address for your local network side. Only external servers can see the external IP, while you can only see the local IP. Try connecting a socket to an external server and asking what your IP is.