Private IP

From LQWiki
Jump to navigation Jump to search

A private IP address or internal IP address is an IP address that has been reserved for private networks and is not accessible from the internet. The main use of these is for networks behind a firewall or NAT router. The firewall or router will have a single public IP address used for all internet traffic for all computers on the private network.

There are only a few IP addresses which can be reliably used on private networks. The official (assigned by IANA) IP ranges defined in RFC 1918 [1] for this use are:

  • 192.168.0.0 - 192.168.255.255
  • 172.16.0.0 - 172.31.255.255
  • 10.0.0.0 - 10.255.255.255

You find out your internal IP with the ifconfig command. It is reported as the "inet addr" of one of the eth network interfaces. Typically, it will be (depending on the router manufacturer and configuration) 192.168.0.x, 192.168.1.x, or 10.0.0.x, where x represents some number assigned by the router.