Can an IP address in the private range be used as a public address?

I know that the IP addresses in range 192.168.0.0 - 192.168.255.255 are reserved and to be used for private network.

My system IP is in 10...* range (private). It is connected to our corporate Intranet and it further connects to the Internet through a proxy. When I try to check my IP (by accessing http://whatismyip.org/ for example), it shows the IP as 192.168.x.x (i.e. in private range). How can this be possible?

Is it acceptable to use the IPs in the private range as a public IP? Does it mean that there is no NAT happening before the requests leave our internal network?


Solution 1:

Any IP can be routed. But a network admin or an ISP that's worth their salt will block the egress/ingress of packets sourced from or destined for those addresses at the edge of their network.

There is no good that can come of allowing that traffic in or out of your network. Apply:

Extended IP access list 111
    10 deny ip 127.0.0.0 0.255.255.255 any
    20 deny ip 224.0.0.0 31.255.255.255 any
    30 deny ip 10.0.0.0 0.255.255.255 any
    40 deny ip 172.16.0.0 0.15.255.255 any
    50 deny ip 192.168.0.0 0.0.255.255 any

to the outbound interface of your edge router. Reverse for the inbound.

Solution 2:

You probably don't connect directly to whatismyip.com but via a firewall or proxy. In that case, whatismyip should display the IP of said proxy. Maybe they are smart and examine the HTTP header which might still contain your private IP.

Or whatismyip.com is so close (from your ISPs point if view) that the private address range does in fact resolve. ISP usually don't filter private address ranges; they rely on the fact that replies won't make it back home (since the routers on the way have no idea to know where to send the package). But some network components are "smart" and remember "hey, that address range always comes from there" and try to send packets back.

Also, someone within the company could have created a local copy for http://whatismyip.org/ which resolved addresses internally.

Solution 3:

Private IPs cannot be routed on the Internet. Some proxies though will include your private IP as an HTTP header when connecting to public sites. It's then possible for those public sites to display your private IP address. Whether whatismyip.com is doing this, I do not know.

If a gateway router receives a packet destined for a private IP address it will just drop the packet, because there's nothing it can do.