Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Are there any built in system commands such as ping that let me discover my public ip-address either on a Windows or Linux operating system? This should not rely on any third party websites or services.

share|improve this question
2  
You cannot. Didn't you see the other nearly identical question on the front page? serverfault.com/questions/475445/… –  Zoredache Feb 5 '13 at 4:59
    
@Zoredache Thank you for the information with the link. I have seen ways of using third party utilities. I have figured out how to do it and will post the answer. –  ponsfonze Feb 5 '13 at 5:08
    
Several protocols, such as SMNP and UPnP, can be used to automatically query your router for its WAN-side IP address. But, as @Grant mentions, this might not be the same as your external Internet-facing address. –  BlueRaja Feb 5 '13 at 8:58
add comment

closed as not constructive by Zoredache, Michael Hampton, RobM, John Gardeniers, Dave M Feb 5 '13 at 13:20

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

To tell what your public ip address appears to be to third parties you need a third party to tell you what they see.

If you don't want to rely on a third party...be the third party and have your own web server located somewhere else tell you.

Even if you can get the information from your router that may not always be what other systems see - you may be behind carrier NAT or an ISP proxy server.

share|improve this answer
add comment

Before the packets reach the NAT device, there's not enough information to determine what the external IP address is going to appear as. To answer your question, I'd log on to the ADSL modem (if that's what is supplying your internet connection and doing the NAT for you) and check the connection and see what IP address was assigned by the ISP.

If my assumptions accurately reflect your network setup, that IP address you see should be the address other hosts on your LAN appear to be when viewed from the Internet.

The config at my workplace is messy and has unnecessary bits... if I do a tracert, I don't see a hop with an IP address that matches what whatismyip.com reports is my IP address.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.