rvokal (rvokal) wrote,
rvokal
rvokal

How do I figure out my public IP from cmd line?

So I need to quickly figure out my public IP from cmdline to allow access to different box. I could look thru the logs on the machine I was accessing but I had only access to its web ui. I need the public IP of my test box and from terminal. Honestly, I couldn't figure it out, from open connections or traceroute I could only see the internal IP, not the public one on NAT. I found this quick hack curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'

Do you know something nicer?
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 7 comments