How do I find my public IP address through the command prompt in Windows/ Command line in Linux?
If I have to find my public (router) IP using an online "what's my IP" website, why can't I do this myself?
>>54732575
It's most reliable to just see directly what other machines see your IP as, since it's handled by your ISP as opposed to locally.
>>54732575
If you're not an ISP yourself, and you're behind a router, there's no way you control your IP. Any tool you can use "locally" will get your intranet addresses only. On the CLI you can `curl ifconfig.me' or similar - you have to go outside of your intranet.
It's not strictly necessary to query an external site if you can query your router. You router has the "public IP" assigned by ISP pretty much as you have (and you can locally check) the "local IP" assigned you by the router.
Your computer has a LAN IP address which the router serves or routes data to. Best case scenario your router has your WAN IP address, but sometimes it will instead be forwarding that task to a modem. If you're using some sort of wireless internet, then it's entirely beyond your network.
>>54732575
You can, you just need to log in to your router, either through the web gui or ssh.
IPFS daemon shows your public IP when starting, so there should be a way to do that.
http://lmgtfy.com/?q=How+do+I+find+my+public+IP+address+through+the+command+prompt+in+Windows
>>54732666
That's no different from querying an external site. That daemon uses an external site.
>>54732575
https://www.wtfismyip.com
$ lynx -dump ipecho.net/plain
>>54732575
Ipconfig for Windows
And I think ifconfig for Linux (don't quote me I may be wrong)
You can also use the Internet other than /g/, or ask in >>>/g/sqt/
>>54732575
run "nslookup myip.opendns.com resolver1.opendns.com" from your command line. "dig +short myip.opendns.com @resolver1.opendns.com" on unix.
>>54732659
>log in to your router
This is the only reliable way to find your external IP if you don't want to leave your local network. Local machines don't care what the external IP is because the routing system handles that, so there isn't a good way to ask them for the external IP.
trace route? ffs
>>54734951
To clarify, second address returned is your public IP, though should be pretty obvious.
curl https://wtfismyip.com/text