How can I know an IP is a public IP or not?

How can I know an IP is a public IP or not?

To determine whether an IP address is public or private, you can compare it to a list of private IP address ranges specified in RFC 1918. If the IP address falls within one of these ranges, it is a private IP address and not accessible from the internet:

  • 10.0.0.0 - 10.255.255.255 (10/8 prefix)
  • 172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
  • 192.168.0.0 - 192.168.255.255 (192.168/16 prefix)

If the IP address does not fall within one of these ranges, it is a public IP address and is accessible from the internet. Note that there are some special IP address ranges that are reserved for other purposes, such as loopback addresses (127.0.0.0/8) and link-local addresses (169.254.0.0/16), but these should not be used for public internet communication.

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章