C# Network Programming

  • Thread starter Thread starter Coder
  • Start date Start date
C

Coder

Hi,

I was wondering how you can tell (if possible) if a computer is
accessible from the internet (outside of the computers' domain)?

When I find what the ip is I get a 192.168.0.2

And if so what is the ip address of the machine from the outside?


- Thanks.
 
That is a non-routable private IP address. You cannot touch that IP
address
from the INTERNET, but the client can initiate a connection _to_ the
INTERNET
using network address translation and an a valid IP INTERNET address.

http://www.jpsdomain.org/networking/nat.html

Regards,
Jeff
When I find what the ip is I get a 192.168.0.2
And if so what is the ip address of the machine from the outside?<
 
While the address being reported is a private address that may not be routed
across the Internet per RFC 1918, that does not necessarily mean the computer
itself may not be accessed from the Internet. If the Internet access method is
anything other than dial-up, then this system is most likely behind some router
or firewall. Such a device may perform NAT to allow connections targeted at
a public IP address on the external side of the Internet connection to be forwarded
to an internal, RFC 1918 address. If this is the case, the only way I can think of
to find out what that public address is that NAT's to the private address would
involve parsing router and/or firewall configurations and is probably not very
practical.

Cletus
 
Do you have something on the internet that you want to reach this computer
with?

If so, have this machine send a message to another machine on the internet.
The packets, once they have passed over the firewall and have a NAT address,
will show the internet address. That DOESN'T mean that the outside machine
will normally be able to send a packet to the local machine, except in
response. Most firewalls prevent you from receiving packets unless they are
in response to a request, and then usually only over ports 80 or 443.

The address, 192.168.x.x is not a routable address. Therefore it is behind
a firewall.

HTH,
--- Nick
 
Back
Top