我如何知道我的计算机是否在 NAT 之后? [英] How can I know if my computer is behind NAT?

查看:87
本文介绍了我如何知道我的计算机是否在 NAT 之后?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试了解 NAT(网络地址转换).

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

谁能解释我如何确定我的计算机是否正在使用 NAT(在 NAT 后面),或者如果它使用自己的IP地址?

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 ?

推荐答案

Barmar 在评论中说的是最简单的方法.通过 HTTP 获取您的 IP 地址表明您位于 NAT 或 HTTP 代理服务器之后.(我想您可能有一个公共 IP 地址,但您的设备配置为通过缓存代理路由 HTTP).

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).

正式的 NAT 检测和 NAT 分类可以使用 STUN 协议 或等效协议来完成,其中UDP 或 TCP 服务将 IP 地址回传给与其连接的客户端.

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.

如果您在 NAT 后面,另一个明显的迹象是您的本地 IP 地址在 私有 IP 地址范围内 如 192.168.xy 范围,10.xyz 范围,或 172.16.0.0-172.31.255.255 范围.

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.

而且几乎所有 Wi-Fi 设置都将是 NAT 配置.

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

这篇关于我如何知道我的计算机是否在 NAT 之后?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆