2

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

Anthon
  • 79,293
  • 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

2 Answers2

7

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.

terdon
  • 242,166
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.

MariusMatutiae
  • 4,372
  • 1
  • 25
  • 36