Skip to content

Instantly share code, notes, and snippets.

@iMushlih
Forked from ipoddubny/ipconfig.md
Created December 8, 2022 06:12
Show Gist options
  • Select an option

  • Save iMushlih/f8599fc6677e5f90349b802f9e2912d0 to your computer and use it in GitHub Desktop.

Select an option

Save iMushlih/f8599fc6677e5f90349b802f9e2912d0 to your computer and use it in GitHub Desktop.
How to get public IP address from Linux shell

http

curl ifconfig.co
curl icanhazip.com
curl ifconfig.me
curl ipv4.ipogre.com
curl http://smart-ip.net/myip

telnet

telnet myip.gelma.net

dns

dig +short myip.opendns.com @resolver1.opendns.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment