I re-edit to simplify my question. My computer’s IP address is 192.168.1.10 and the router/gateway's IP is 192.168.1.1 (internal IP). I'm trying to find the external IP of my gateway or router. The router is connected to the ISP and id doesn't have a public IP, so that external IP should be a private IP. How can I find that external private IP?
84 Answers
This is what I always use when I need this info but cant access the modem.
1I believe you are looking for the IP between the modem and the ISP, i.e. the external IP of the modem, not the external IP the router (The router is connected to the modem, perhaps in your case its internal). This isn't possible from your computer (traceroute will give you the private address), but you have a couple of choices.
1) Go to your default gateway on a browser and see if the WAN's private/CGN address is there.
2) Call your ISP (If you can get someone to ping your modem, you may have the same success as this guy)
3) Get a cable splitter* (may be illegal, but I mean if you don't go reading your neighbors stuff doesn't really matter, websites will always use https for sensitive information anyway), and then get a modem for that cable to turn it into ethernet, and then sniff that ethernet.
*Make sure the splitter/tap is read-only, and that the write port is plugged into your actual modem / wall cable!
As you are looking for External IP of modem instead of IP address of router. So you can visit at , as whenever I have an issue related to IP I visit the website.
I have the same question as yours, after searching for a long time I found this answer:
# debian/ubuntu setup: # sudo apt-get install miniupnpc # get WAN IP address from UPNP router: upnpc -s | grep ^ExternalIPAddress | cut -c21- This works when you are behind a NAT Router with UPNP. Try this and comment on me if it doesn't work :)