Jump to content


Photo

Find public IP address through cli


  • Please log in to reply
7 replies to this topic

#1 squidden

  • Member
  • 9 posts

+1
Neutral

Posted 31 July 2012 - 15:50

Hi,

A have a dreambox located behind a router/fw.
The dreambox is receiving a local IP address from the DHCP server (192.168.0.x/24).

Does anyone know how I can find out my public IP address from the CLI.
There are several websites that provides this using a web browser, but I can't find how to do this from the CLI.

Re: Find public IP address through cli #2 Lukin

  • Senior Member
  • 137 posts

+8
Neutral

Posted 31 July 2012 - 15:58

run "Netstat -nat" from PPanel via blue button.

Re: Find public IP address through cli #3 squidden

  • Member
  • 9 posts

+1
Neutral

Posted 31 July 2012 - 16:22

Thanks for your quick answer but it won't show me the public ip-address. Only the internal.


root@vuuno:~# netstat -nat
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:8001 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN
tcp 0 164 192.168.0.5:23 192.168.0.6:52331 ESTABLISHED
tcp 0 0 :::22 :::* LISTEN

Re: Find public IP address through cli #4 hemispherical1

  • Senior Member
  • 1,596 posts

+49
Good

Posted 31 July 2012 - 16:28

I think you'd have to log into the router (telnet/ssh) and run the ifconfig command. The dreambox itself doesn't see/know/need the external IP, all it sees is the internal gateway IP...


--
hemi

PS. I stand corrected, see below... ;)

Edited by hemispherical1, 31 July 2012 - 16:30.


Re: Find public IP address through cli #5 squidden

  • Member
  • 9 posts

+1
Neutral

Posted 31 July 2012 - 16:28

Found the solution. I'll write it down in case someone else need it in the future.

Install:
opkg install curl

Run:
curl ifconfig.me

Re: Find public IP address through cli #6 spock

  • Senior Member
  • 214 posts

+1
Neutral

Posted 31 July 2012 - 16:37

wget -q -O - http://icanhazip.com

is probably the simplest, as you wont need to install anything extra.

Re: Find public IP address through cli #7 MartiniB

  • Senior Member
  • 49 posts

0
Neutral

Posted 2 August 2012 - 07:55

http://www.CanYouSeeMe.org/

Re: Find public IP address through cli #8 kalavani

  • Member
  • 2 posts

0
Neutral

Posted 31 August 2012 - 05:19

Hai, i don't know how to get through client service. But i could found my public ip address simply on google. just type "my ip" in search box. It shows public ip address. I got my public ip address details like ISP, country details with geo location result at Ip-Details.com


2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users