Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.5
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
If you are connected via a router, you can go to a site like http://www.whatismyip.com/ and it will be displayed for you similar to this:
What Is My IP Address - WhatIsMyIP.com
Your IP Address Is: 14.254
Why are they different?
Sometimes they're not. If your computer is connected directly to the Internet, then your machine is assigned an Internet IP address. The IP address you see using ipconfig will be the same as that which you see reported by the "what's my IP" sites. If you're behind a router then the Internet IP address is actually assigned to the router. The router then hands out "local" IP addresses to the individual machines connected to it. Those are the "192.168." addresses you'll commonly see when running ipconfig.
So if your behind a router...
You will have to use Port Forwarding to reach your PC behind the router. Here is an example.
How to find your website.
If your router does not have a static ip address, the address will change every time it is restarted. So if you have people trying to access your website, you can't give them a static ip as it will change. Here are two variations of a solution that I use (if you have other ideas, please let me know, I'd be interested).
First, I have my web server "publish" it's location. You can use something elaborate as a messaging service, a field in a SQL Server database or a simple as a line in a text file.
I use something like the C# code below programatically find the routers ip:
private void GetNetworkConfig()
{
ManagementClass mc = new
ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection nics = mc.GetInstances();
foreach (ManagementObject nic in nics)
{
if (Convert.ToBoolean(nic["ipEnabled"]) == true)
{
string IpAddress = (nic["IPAddress"] as String[])[0];
string IPSubnet = (nic["IPSubnet"] as String[])[0];
string DefaultGateWay = (nic["DefaultIPGateway"] as String[])[0];
}
}
}
then publish it to a text file on the Internet where either:
1) A web site that I do own (i.e. Estrellasoft.com) will do a REDIRECT from the page it is on to the web server behind the router, but this will display the ip address (and port if used) and it will look less professional.
2) I use frames or Iframes and set the target of the main frame page to the web server behind the router but the URL with the domain name (i.e. Estrellasoft.com) is still displayed as if the content was hosted there on that Internet page. It will look like the page rendered by the web server behind the router is being hosted on the Internet when it is actually sitting on a desk in your office. Great for hosting applications that you may own (Crystal Reports, Dundas Charts) that and ISP may charge you an arm and a leg for, assuming your ISP does any app hosting at all.