If this device is behind a NAT, there is no way to do it. The NATted device does not know how its packets are being NATted en route - only the NATting device (firewall, router, whatever) knows this.
Edit: no, technically I mean it is unknowable, as you have defined the question. This sort of thing happens all the time. There is no way for your computer to know which generating authority is being billed for the electricity which powers that computer. It's not unknowable in principle, but there is no generally-valid technique that you can use from the computer concerned to find this information out, because the electrons don't have little labels on them saying who last gave them a push.
If your question is "how can I find out the generating authority", we can help; if it is "how can I find it out from my computer, without consulting external services", the question has no answer.
Similarly, if you'd asked "how do I find out what my computer's IP address is being NATted to", then we could help, as indeed Jenny D is above; the answer won't be generally-valid, and will depend on the brand of NAT device, the access arrangements it currently supports, and so on (though that question is probably off-topic for Server Fault, and would probably get closed, even as this one might). But you asked "how does my computer find out what its IP address is being NATted to", and that question has no general answer.
As for how not to get downvoted, you could do much worse than to read and inwardly digest our help document on asking good questions.