If you are using HiveOS check out the following guide on how to get your public ip address: https://hiveos.farm/guides-yourip/

If your mining rig has a desktop environment open a browser and navigate to http://whatismyipaddress.com/ or http://whatsmyip.org/ from your mining rig to get your public ip.

If your have a headless mining rig then connect to your mining rig using a remote connection tool like SSH and run the following command: curl ifconfig.co

You must enter the IP address that ends with the digits given in the interface. For example if the system is asking for ip *.*.*.212 than you need to enter your ip address that ends with 212 (in case you mine from multiple different IP addresses).