Get a public IP address of arduino wifi shield

Is there a way to get a public IP address of the wifi shield in order to connect to it remotely.

wifi.localIP() only returns local address.

Any help is appreciated.

Thanks in advance.

You would need to use one of the 'my ip address' web sites, which echo back your external ip address. Rather than list one here, I recommend googling for 'my ip address'.

There are many such sites, and may have different ways to post an inquiry to them. Generally speaking, you just send them an HTTP request and back comes your IP address.

Current internet IP address.

http://checkip.dyndns.com/