Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I know if my computer is behind NAT? [closed]

Tags:

networking

nat

I'm trying to understand NAT (Network Address Translation) .

Can someone explain how can I determine if my computer is using a NAT (behind a NAT) , or if it using its own IP address ?

like image 292
JAN Avatar asked Jan 21 '14 05:01

JAN


2 Answers

What Barmar said in the comments is the easiest way. Obtaining your IP address over HTTP is indicative that you are behind either a NAT or an HTTP Proxy server. (I suppose it's possible you could have a public IP address, but your device is configured to route HTTP over a caching proxy).

Formal NAT detection and NAT classification can be done with the STUN protocol or equivalent protocol in which a UDP or TCP service echoes back the IP address back to the client that connected to it.

Another telling sign if you are behind a NAT is that your local IP address is in a private IP address range such as the 192.168.x.y range, the 10.x.y.z range, or then 172.16.0.0-172.31.255.255 range.

And pretty much any Wi-Fi setup is going to be a NAT configuration.

like image 77
selbie Avatar answered Oct 22 '22 06:10

selbie


The NAT detection technique is based on two observations about the IP TTL (Time To Live) field.

  1. Host operating systems have characteristic initial TTL values. This property of individual operating system implementations of TCP/IP is well known and can be used as part of a "fingerprint" to identify the operating system that a host is running merely by examining its traffic.
  2. NAT devices or gateways decrement the TTL on packets that they forward.

For more details visit: http://www.sflow.org/detectNAT/

like image 24
sjpatel Avatar answered Oct 22 '22 08:10

sjpatel