Can someone tell me a command that will find my external ip for a freebsd 10 system.
Asked
Active
Viewed 1.1k times
2
-
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 Answers
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
-
2The
fetch
command is part of the OS, unlike wget, so it's always there, might be better to use it. – Steve Wills Jan 05 '15 at 02:36 -
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