Is it possible to see my external IP address without making an outbound web request?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
7
down vote

favorite












If your connection is NAT'ed, is it possible to see your external IP address without making an outbound web request?



Any OS (Windows, Linux, etc.) is fine.










share|improve this question



















  • 2




    Are you only trying to avoid HTTP, or are you trying to avoid sending any outgoing traffic at all? The only universal solutions involve sending some kind of outgoing traffic, but it doesn't have to be HTTP.
    – Spiff
    11 hours ago










  • This was more of just a hypothetical, I didn't want to make any outbound traffic at all.
    – Axel Persinger
    11 hours ago










  • Are you saying that your network/router is behind a Enterprise grade NAT setup (ie. it is getting a private IP address from your ISP)? If so, there is no way I have think of that you can find the public IP address without something reaching out to the public network and essentially "looking back" like whatsmyip.com or similar services.
    – acejavelin
    11 hours ago














up vote
7
down vote

favorite












If your connection is NAT'ed, is it possible to see your external IP address without making an outbound web request?



Any OS (Windows, Linux, etc.) is fine.










share|improve this question



















  • 2




    Are you only trying to avoid HTTP, or are you trying to avoid sending any outgoing traffic at all? The only universal solutions involve sending some kind of outgoing traffic, but it doesn't have to be HTTP.
    – Spiff
    11 hours ago










  • This was more of just a hypothetical, I didn't want to make any outbound traffic at all.
    – Axel Persinger
    11 hours ago










  • Are you saying that your network/router is behind a Enterprise grade NAT setup (ie. it is getting a private IP address from your ISP)? If so, there is no way I have think of that you can find the public IP address without something reaching out to the public network and essentially "looking back" like whatsmyip.com or similar services.
    – acejavelin
    11 hours ago












up vote
7
down vote

favorite









up vote
7
down vote

favorite











If your connection is NAT'ed, is it possible to see your external IP address without making an outbound web request?



Any OS (Windows, Linux, etc.) is fine.










share|improve this question















If your connection is NAT'ed, is it possible to see your external IP address without making an outbound web request?



Any OS (Windows, Linux, etc.) is fine.







networking nat ip-address






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 15 mins ago









Peter Mortensen

8,271166184




8,271166184










asked 12 hours ago









Axel Persinger

463




463







  • 2




    Are you only trying to avoid HTTP, or are you trying to avoid sending any outgoing traffic at all? The only universal solutions involve sending some kind of outgoing traffic, but it doesn't have to be HTTP.
    – Spiff
    11 hours ago










  • This was more of just a hypothetical, I didn't want to make any outbound traffic at all.
    – Axel Persinger
    11 hours ago










  • Are you saying that your network/router is behind a Enterprise grade NAT setup (ie. it is getting a private IP address from your ISP)? If so, there is no way I have think of that you can find the public IP address without something reaching out to the public network and essentially "looking back" like whatsmyip.com or similar services.
    – acejavelin
    11 hours ago












  • 2




    Are you only trying to avoid HTTP, or are you trying to avoid sending any outgoing traffic at all? The only universal solutions involve sending some kind of outgoing traffic, but it doesn't have to be HTTP.
    – Spiff
    11 hours ago










  • This was more of just a hypothetical, I didn't want to make any outbound traffic at all.
    – Axel Persinger
    11 hours ago










  • Are you saying that your network/router is behind a Enterprise grade NAT setup (ie. it is getting a private IP address from your ISP)? If so, there is no way I have think of that you can find the public IP address without something reaching out to the public network and essentially "looking back" like whatsmyip.com or similar services.
    – acejavelin
    11 hours ago







2




2




Are you only trying to avoid HTTP, or are you trying to avoid sending any outgoing traffic at all? The only universal solutions involve sending some kind of outgoing traffic, but it doesn't have to be HTTP.
– Spiff
11 hours ago




Are you only trying to avoid HTTP, or are you trying to avoid sending any outgoing traffic at all? The only universal solutions involve sending some kind of outgoing traffic, but it doesn't have to be HTTP.
– Spiff
11 hours ago












This was more of just a hypothetical, I didn't want to make any outbound traffic at all.
– Axel Persinger
11 hours ago




This was more of just a hypothetical, I didn't want to make any outbound traffic at all.
– Axel Persinger
11 hours ago












Are you saying that your network/router is behind a Enterprise grade NAT setup (ie. it is getting a private IP address from your ISP)? If so, there is no way I have think of that you can find the public IP address without something reaching out to the public network and essentially "looking back" like whatsmyip.com or similar services.
– acejavelin
11 hours ago




Are you saying that your network/router is behind a Enterprise grade NAT setup (ie. it is getting a private IP address from your ISP)? If so, there is no way I have think of that you can find the public IP address without something reaching out to the public network and essentially "looking back" like whatsmyip.com or similar services.
– acejavelin
11 hours ago










4 Answers
4






active

oldest

votes

















up vote
8
down vote













If your computer is behind NAT, it is possible for you to see the external IP address
of your router, but you need administrative access to the router.



The router knows your external IP address, so by accessing its configuration
page you can find that IP address.



Any other way will require making an external Web request.






share|improve this answer






















  • This seems like it's answering a different question than OP is asking.
    – Spiff
    11 hours ago










  • @Spiff: I have re-written my answer. A comment would have been enough to signal that misunderstanding.
    – harrymc
    11 hours ago

















up vote
5
down vote













There are a few ways that work with some NATs but nothing that's guaranteed to work everywhere.



I believe uPnP, NAT-PMP, and PCP (Universal Plug And Play, NAT Port Mapping Protocol, and the Port Control Protocol) all have ways to ask a compliant NAT gateway what the public address is, but not all NATs support these protocols. Support is more common in home gateway routers than in corporate or carrier-grade NAT solutions.



When you find yourself behind a NAT, the only sure way to see what public IP address it is translating your traffic into is to send some outgoing traffic to some public host that will report back, in a way the NAT won't translate, what address your traffic appeared to come from. Using a web based service is one way, but you could also do it by, say, SSHing into a cloud server instance and seeing where sshd says your SSH session is coming from.






share|improve this answer
















  • 4




    Also UPnP etc. could give a false result if the system was behind double (or more) NAT.
    – user71659
    7 hours ago










  • @user71659 I have been wondering if there exist an anycast address which will automatically be routed to the outermost NAT such that it can be used for that kind of request.
    – kasperd
    6 hours ago










  • @kasperd Every NAT thinks it's the outermost NAT. There are certainly IPs that are automatically routed outside of all NATs. Those are called public IPs.
    – user20574
    3 hours ago


















up vote
2
down vote













I would like to add one point to already existing answers.



It also depends on the network complexity. It is possible that your computer is located within a network that has multiple external IP addresses and the router somewhere up the line sends the traffic out to the Internet based on some criteria: for example, destination IP-address, or time of day (may be one uplink channel is cheaper at night or for other reasons).



So, to be complete, a notion of "external IP address" may require defining a destination point to which your address is being external.



In the example below Router #2 could perform NAT and send traffic to either uplinks and the receiving host could see different external IP-address for the Host.



Or it could be that a certain destination (for example host1.example.com) always routes thru the Uplink A, and the host host2.example.com always routes via Uplink B. So, your external IP addresses as seen by those hosts will be different, providing that Uplink A and Uplink B are different ISPs.



 Uplink A Uplink B
------------- -------------
| |
| |
| 192.168.1.1 192.168.50.50 |
| ----------- |
|---------------|Router #2|---------------|
-----------
| 192.168.100.1
|
| 192.168.100.2
-----------
|Router #1|
-----------
| 192.168.200.1
|
| 192.168.200.2
-----------
| Host |
-----------


So, sending traffic out will allow to get more reliable results.






share|improve this answer



























    up vote
    0
    down vote













    You can use a DNS request, which I believe would not fall under the category of "web request":



    nslookup myip.opendns.com resolver1.opendns.com




    share




















      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "3"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1371963%2fis-it-possible-to-see-my-external-ip-address-without-making-an-outbound-web-requ%23new-answer', 'question_page');

      );

      Post as a guest






























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      8
      down vote













      If your computer is behind NAT, it is possible for you to see the external IP address
      of your router, but you need administrative access to the router.



      The router knows your external IP address, so by accessing its configuration
      page you can find that IP address.



      Any other way will require making an external Web request.






      share|improve this answer






















      • This seems like it's answering a different question than OP is asking.
        – Spiff
        11 hours ago










      • @Spiff: I have re-written my answer. A comment would have been enough to signal that misunderstanding.
        – harrymc
        11 hours ago














      up vote
      8
      down vote













      If your computer is behind NAT, it is possible for you to see the external IP address
      of your router, but you need administrative access to the router.



      The router knows your external IP address, so by accessing its configuration
      page you can find that IP address.



      Any other way will require making an external Web request.






      share|improve this answer






















      • This seems like it's answering a different question than OP is asking.
        – Spiff
        11 hours ago










      • @Spiff: I have re-written my answer. A comment would have been enough to signal that misunderstanding.
        – harrymc
        11 hours ago












      up vote
      8
      down vote










      up vote
      8
      down vote









      If your computer is behind NAT, it is possible for you to see the external IP address
      of your router, but you need administrative access to the router.



      The router knows your external IP address, so by accessing its configuration
      page you can find that IP address.



      Any other way will require making an external Web request.






      share|improve this answer














      If your computer is behind NAT, it is possible for you to see the external IP address
      of your router, but you need administrative access to the router.



      The router knows your external IP address, so by accessing its configuration
      page you can find that IP address.



      Any other way will require making an external Web request.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited 14 mins ago









      Peter Mortensen

      8,271166184




      8,271166184










      answered 11 hours ago









      harrymc

      244k10254537




      244k10254537











      • This seems like it's answering a different question than OP is asking.
        – Spiff
        11 hours ago










      • @Spiff: I have re-written my answer. A comment would have been enough to signal that misunderstanding.
        – harrymc
        11 hours ago
















      • This seems like it's answering a different question than OP is asking.
        – Spiff
        11 hours ago










      • @Spiff: I have re-written my answer. A comment would have been enough to signal that misunderstanding.
        – harrymc
        11 hours ago















      This seems like it's answering a different question than OP is asking.
      – Spiff
      11 hours ago




      This seems like it's answering a different question than OP is asking.
      – Spiff
      11 hours ago












      @Spiff: I have re-written my answer. A comment would have been enough to signal that misunderstanding.
      – harrymc
      11 hours ago




      @Spiff: I have re-written my answer. A comment would have been enough to signal that misunderstanding.
      – harrymc
      11 hours ago












      up vote
      5
      down vote













      There are a few ways that work with some NATs but nothing that's guaranteed to work everywhere.



      I believe uPnP, NAT-PMP, and PCP (Universal Plug And Play, NAT Port Mapping Protocol, and the Port Control Protocol) all have ways to ask a compliant NAT gateway what the public address is, but not all NATs support these protocols. Support is more common in home gateway routers than in corporate or carrier-grade NAT solutions.



      When you find yourself behind a NAT, the only sure way to see what public IP address it is translating your traffic into is to send some outgoing traffic to some public host that will report back, in a way the NAT won't translate, what address your traffic appeared to come from. Using a web based service is one way, but you could also do it by, say, SSHing into a cloud server instance and seeing where sshd says your SSH session is coming from.






      share|improve this answer
















      • 4




        Also UPnP etc. could give a false result if the system was behind double (or more) NAT.
        – user71659
        7 hours ago










      • @user71659 I have been wondering if there exist an anycast address which will automatically be routed to the outermost NAT such that it can be used for that kind of request.
        – kasperd
        6 hours ago










      • @kasperd Every NAT thinks it's the outermost NAT. There are certainly IPs that are automatically routed outside of all NATs. Those are called public IPs.
        – user20574
        3 hours ago















      up vote
      5
      down vote













      There are a few ways that work with some NATs but nothing that's guaranteed to work everywhere.



      I believe uPnP, NAT-PMP, and PCP (Universal Plug And Play, NAT Port Mapping Protocol, and the Port Control Protocol) all have ways to ask a compliant NAT gateway what the public address is, but not all NATs support these protocols. Support is more common in home gateway routers than in corporate or carrier-grade NAT solutions.



      When you find yourself behind a NAT, the only sure way to see what public IP address it is translating your traffic into is to send some outgoing traffic to some public host that will report back, in a way the NAT won't translate, what address your traffic appeared to come from. Using a web based service is one way, but you could also do it by, say, SSHing into a cloud server instance and seeing where sshd says your SSH session is coming from.






      share|improve this answer
















      • 4




        Also UPnP etc. could give a false result if the system was behind double (or more) NAT.
        – user71659
        7 hours ago










      • @user71659 I have been wondering if there exist an anycast address which will automatically be routed to the outermost NAT such that it can be used for that kind of request.
        – kasperd
        6 hours ago










      • @kasperd Every NAT thinks it's the outermost NAT. There are certainly IPs that are automatically routed outside of all NATs. Those are called public IPs.
        – user20574
        3 hours ago













      up vote
      5
      down vote










      up vote
      5
      down vote









      There are a few ways that work with some NATs but nothing that's guaranteed to work everywhere.



      I believe uPnP, NAT-PMP, and PCP (Universal Plug And Play, NAT Port Mapping Protocol, and the Port Control Protocol) all have ways to ask a compliant NAT gateway what the public address is, but not all NATs support these protocols. Support is more common in home gateway routers than in corporate or carrier-grade NAT solutions.



      When you find yourself behind a NAT, the only sure way to see what public IP address it is translating your traffic into is to send some outgoing traffic to some public host that will report back, in a way the NAT won't translate, what address your traffic appeared to come from. Using a web based service is one way, but you could also do it by, say, SSHing into a cloud server instance and seeing where sshd says your SSH session is coming from.






      share|improve this answer












      There are a few ways that work with some NATs but nothing that's guaranteed to work everywhere.



      I believe uPnP, NAT-PMP, and PCP (Universal Plug And Play, NAT Port Mapping Protocol, and the Port Control Protocol) all have ways to ask a compliant NAT gateway what the public address is, but not all NATs support these protocols. Support is more common in home gateway routers than in corporate or carrier-grade NAT solutions.



      When you find yourself behind a NAT, the only sure way to see what public IP address it is translating your traffic into is to send some outgoing traffic to some public host that will report back, in a way the NAT won't translate, what address your traffic appeared to come from. Using a web based service is one way, but you could also do it by, say, SSHing into a cloud server instance and seeing where sshd says your SSH session is coming from.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered 11 hours ago









      Spiff

      75.1k10114156




      75.1k10114156







      • 4




        Also UPnP etc. could give a false result if the system was behind double (or more) NAT.
        – user71659
        7 hours ago










      • @user71659 I have been wondering if there exist an anycast address which will automatically be routed to the outermost NAT such that it can be used for that kind of request.
        – kasperd
        6 hours ago










      • @kasperd Every NAT thinks it's the outermost NAT. There are certainly IPs that are automatically routed outside of all NATs. Those are called public IPs.
        – user20574
        3 hours ago













      • 4




        Also UPnP etc. could give a false result if the system was behind double (or more) NAT.
        – user71659
        7 hours ago










      • @user71659 I have been wondering if there exist an anycast address which will automatically be routed to the outermost NAT such that it can be used for that kind of request.
        – kasperd
        6 hours ago










      • @kasperd Every NAT thinks it's the outermost NAT. There are certainly IPs that are automatically routed outside of all NATs. Those are called public IPs.
        – user20574
        3 hours ago








      4




      4




      Also UPnP etc. could give a false result if the system was behind double (or more) NAT.
      – user71659
      7 hours ago




      Also UPnP etc. could give a false result if the system was behind double (or more) NAT.
      – user71659
      7 hours ago












      @user71659 I have been wondering if there exist an anycast address which will automatically be routed to the outermost NAT such that it can be used for that kind of request.
      – kasperd
      6 hours ago




      @user71659 I have been wondering if there exist an anycast address which will automatically be routed to the outermost NAT such that it can be used for that kind of request.
      – kasperd
      6 hours ago












      @kasperd Every NAT thinks it's the outermost NAT. There are certainly IPs that are automatically routed outside of all NATs. Those are called public IPs.
      – user20574
      3 hours ago





      @kasperd Every NAT thinks it's the outermost NAT. There are certainly IPs that are automatically routed outside of all NATs. Those are called public IPs.
      – user20574
      3 hours ago











      up vote
      2
      down vote













      I would like to add one point to already existing answers.



      It also depends on the network complexity. It is possible that your computer is located within a network that has multiple external IP addresses and the router somewhere up the line sends the traffic out to the Internet based on some criteria: for example, destination IP-address, or time of day (may be one uplink channel is cheaper at night or for other reasons).



      So, to be complete, a notion of "external IP address" may require defining a destination point to which your address is being external.



      In the example below Router #2 could perform NAT and send traffic to either uplinks and the receiving host could see different external IP-address for the Host.



      Or it could be that a certain destination (for example host1.example.com) always routes thru the Uplink A, and the host host2.example.com always routes via Uplink B. So, your external IP addresses as seen by those hosts will be different, providing that Uplink A and Uplink B are different ISPs.



       Uplink A Uplink B
      ------------- -------------
      | |
      | |
      | 192.168.1.1 192.168.50.50 |
      | ----------- |
      |---------------|Router #2|---------------|
      -----------
      | 192.168.100.1
      |
      | 192.168.100.2
      -----------
      |Router #1|
      -----------
      | 192.168.200.1
      |
      | 192.168.200.2
      -----------
      | Host |
      -----------


      So, sending traffic out will allow to get more reliable results.






      share|improve this answer
























        up vote
        2
        down vote













        I would like to add one point to already existing answers.



        It also depends on the network complexity. It is possible that your computer is located within a network that has multiple external IP addresses and the router somewhere up the line sends the traffic out to the Internet based on some criteria: for example, destination IP-address, or time of day (may be one uplink channel is cheaper at night or for other reasons).



        So, to be complete, a notion of "external IP address" may require defining a destination point to which your address is being external.



        In the example below Router #2 could perform NAT and send traffic to either uplinks and the receiving host could see different external IP-address for the Host.



        Or it could be that a certain destination (for example host1.example.com) always routes thru the Uplink A, and the host host2.example.com always routes via Uplink B. So, your external IP addresses as seen by those hosts will be different, providing that Uplink A and Uplink B are different ISPs.



         Uplink A Uplink B
        ------------- -------------
        | |
        | |
        | 192.168.1.1 192.168.50.50 |
        | ----------- |
        |---------------|Router #2|---------------|
        -----------
        | 192.168.100.1
        |
        | 192.168.100.2
        -----------
        |Router #1|
        -----------
        | 192.168.200.1
        |
        | 192.168.200.2
        -----------
        | Host |
        -----------


        So, sending traffic out will allow to get more reliable results.






        share|improve this answer






















          up vote
          2
          down vote










          up vote
          2
          down vote









          I would like to add one point to already existing answers.



          It also depends on the network complexity. It is possible that your computer is located within a network that has multiple external IP addresses and the router somewhere up the line sends the traffic out to the Internet based on some criteria: for example, destination IP-address, or time of day (may be one uplink channel is cheaper at night or for other reasons).



          So, to be complete, a notion of "external IP address" may require defining a destination point to which your address is being external.



          In the example below Router #2 could perform NAT and send traffic to either uplinks and the receiving host could see different external IP-address for the Host.



          Or it could be that a certain destination (for example host1.example.com) always routes thru the Uplink A, and the host host2.example.com always routes via Uplink B. So, your external IP addresses as seen by those hosts will be different, providing that Uplink A and Uplink B are different ISPs.



           Uplink A Uplink B
          ------------- -------------
          | |
          | |
          | 192.168.1.1 192.168.50.50 |
          | ----------- |
          |---------------|Router #2|---------------|
          -----------
          | 192.168.100.1
          |
          | 192.168.100.2
          -----------
          |Router #1|
          -----------
          | 192.168.200.1
          |
          | 192.168.200.2
          -----------
          | Host |
          -----------


          So, sending traffic out will allow to get more reliable results.






          share|improve this answer












          I would like to add one point to already existing answers.



          It also depends on the network complexity. It is possible that your computer is located within a network that has multiple external IP addresses and the router somewhere up the line sends the traffic out to the Internet based on some criteria: for example, destination IP-address, or time of day (may be one uplink channel is cheaper at night or for other reasons).



          So, to be complete, a notion of "external IP address" may require defining a destination point to which your address is being external.



          In the example below Router #2 could perform NAT and send traffic to either uplinks and the receiving host could see different external IP-address for the Host.



          Or it could be that a certain destination (for example host1.example.com) always routes thru the Uplink A, and the host host2.example.com always routes via Uplink B. So, your external IP addresses as seen by those hosts will be different, providing that Uplink A and Uplink B are different ISPs.



           Uplink A Uplink B
          ------------- -------------
          | |
          | |
          | 192.168.1.1 192.168.50.50 |
          | ----------- |
          |---------------|Router #2|---------------|
          -----------
          | 192.168.100.1
          |
          | 192.168.100.2
          -----------
          |Router #1|
          -----------
          | 192.168.200.1
          |
          | 192.168.200.2
          -----------
          | Host |
          -----------


          So, sending traffic out will allow to get more reliable results.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 6 hours ago









          VL-80

          3,56922133




          3,56922133




















              up vote
              0
              down vote













              You can use a DNS request, which I believe would not fall under the category of "web request":



              nslookup myip.opendns.com resolver1.opendns.com




              share
























                up vote
                0
                down vote













                You can use a DNS request, which I believe would not fall under the category of "web request":



                nslookup myip.opendns.com resolver1.opendns.com




                share






















                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  You can use a DNS request, which I believe would not fall under the category of "web request":



                  nslookup myip.opendns.com resolver1.opendns.com




                  share












                  You can use a DNS request, which I believe would not fall under the category of "web request":



                  nslookup myip.opendns.com resolver1.opendns.com





                  share











                  share


                  share










                  answered 21 secs ago









                  Mehrdad

                  13.9k36111185




                  13.9k36111185



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1371963%2fis-it-possible-to-see-my-external-ip-address-without-making-an-outbound-web-requ%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Comments

                      Popular posts from this blog

                      Long meetings (6-7 hours a day): Being “babysat” by supervisor

                      Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

                      Confectionery