ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Get Your Public IP Address with WGET

    IT Discussion
    wget linux unix
    3
    3
    930
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      Once in a great while some crazy person built the server that you are working on and curl is not available, but you still need to pull your public IP from an external source. On that rare occasion when you have wget but not curl, which we faced just the other day, you can just do this:

      wget http://ipecho.net/plain -O - -q ; echo
      
      KellyK 1 Reply Last reply Reply Quote 3
      • KellyK
        Kelly @scottalanmiller
        last edited by

        @scottalanmiller said in Get Your Public IP Address with WGET:

        Once in a great while some crazy person built the server that you are working on and curl is not available, but you still need to pull your public IP from an external source. On that rare occasion when you have wget but not curl, which we faced just the other day, you can just do this:

        wget http://ipecho.net/plain -O - -q ; echo
        

        I can confirm that this works in Windows from bash.

        1 Reply Last reply Reply Quote 2
        • RomoR
          Romo
          last edited by

          A bit shorter

          wget -qO- icanhazip.com
          
          1 Reply Last reply Reply Quote 2
          • 1 / 1
          • First post
            Last post