0

Can someone tell me a command that will find my external ip for a freebsd 10 system.

  • What do you mean with external IP? Is your system connected to the internet directly without ppp or a router? – Anthon Dec 24 '14 at 19:09
5

Personally, I use wtfismyip.com which returns pure text and does not need parsing:

$ wget -qO - http://wtfismyip.com/text
123.456.78.9

User Steve Wills pointed out in a comment that the command fetch is installed by default on FreeBSD so it might be a better choice instead of wget.

  • 2
    The fetch command is part of the OS, unlike wget, so it's always there, might be better to use it. – Steve Wills Jan 5 '15 at 2:36
  • fetch -q http://wtfismyip.com/text ; cat ./text; – user77115 Oct 16 '18 at 11:48
1

Try from the CLI

 wget checkip.dyndns.org:80 -O - -o /dev/null | cut -d" " -f6 | sed 's/<\/body><\/html>//'

or

 wget 216.146.39.70:80 -O - -o /dev/null | cut -d" " -f6 | sed 's/<\/body><\/html>//'

if you do not wish to call the DNSs.

You can always load the following URL, www.whatismyipaddress.com in your browser; this is but one of many different sites returning your IP, among them is also speedtest.net.

Not the answer you're looking for? Browse other questions tagged or ask your own question.