0

I have set an home webserver with my application running. My machine runs ubuntu 14.04 LTS and i tested it to be working within the devices connected to that router.

I also found the ip address that is assigned to the router for internet and port forwarding is working. when i type the IP address it opens the apache webserver index.html

http://192.168.1.4/ --- ip address assigned by the router = works.
http://10.1.10.149/ --- ip address assigned to the router = works with port forwarding

my ip address when i use http://whatismyipaddress.com/ ----- 129.217.129.129 

how do i find my webserver in the internet.

2

If your router has been assigned a 10.*.*.* address, then it is not on the public Internet, but is sitting behind another NAT router. This is confirmed by whatismyipaddress.com. To reach your server from the Internet, you would need to get a port forwarding rule in this second NAT router.

  • before I ask the company to provide me a port forwarding, i want to explore if there are other possibilities. If so, please direct me to the right one – akrv Jul 29 '14 at 15:35
  • @akrv, there aren't... the only way someone on the Internet can reach you is if the router chooses to forward the connection. – psusi Jul 29 '14 at 17:37
  • so what should i be asking them which is not bad on both sides? port forwarding to my IP address? or something else? – akrv Jul 30 '14 at 16:11
  • @akrv, I don't know what you mean by "not bad on both sides". As I already said in the answer, you need to get them to forward the port, but that's not going to happen, at least not for a standard port like 80. They will probably tell you that you need to pay them extra for a real IP address instead of at NATed one. – psusi Aug 20 '14 at 17:52
4

Please Read RFC 1918 - Address Allocation For Private Internets, specifically Part 3.

Quoting:

Private Address Space

The Internet Assigned Numbers Authority (IANA) has reserved the
following three blocks of the IP address space for private internets:

 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)  

We will refer to the first block as "24-bit block", the second as
"20-bit block", and to the third as "16-bit" block. Note that (in
pre-CIDR notation) the first block is nothing but a single class A
network number, while the second block is a set of 16 contiguous
class B network numbers, and third block is a set of 256 contiguous
class C network numbers.

An enterprise that decides to use IP addresses out of the address
space defined in this document can do so without any coordination
with IANA or an Internet registry. The address space can thus be used by many > enterprises. Addresses within this private address space will only be unique within the enterprise, or the set of enterprises which choose to cooperate over this space so they may communicate with each other in their own private internet.

As before, any enterprise that needs globally unique address space is required to obtain such addresses from an Internet registry. An enterprise that requests IP addresses for its external connectivity
will never be assigned addresses from the blocks defined above.

In order to use private address space, an enterprise needs to
determine which hosts do not need to have network layer connectivity
outside the enterprise in the foreseeable future and thus could be
classified as private. Such hosts will use the private address space
defined above. Private hosts can communicate with all other hosts
inside the enterprise, both public and private. However, they cannot
have IP connectivity to any host outside of the enterprise. While not having external (outside of the enterprise) IP connectivity private
hosts can still have access to external services via mediating
gateways (e.g., application layer gateways).

All other hosts will be public and will use globally unique address space assigned by an Internet Registry. Public hosts can communicate
with other hosts inside the enterprise both public and private and
can have IP connectivity to public hosts outside the enterprise.
Public hosts do not have connectivity to private hosts of other
enterprises.


Explanation

Your Internet Connection is divided logically into two parts:

  1. The LAN - Local Area Network
  2. The WAN - Wide Area Network

The LAN is managed by your router, and the WAN is managed by your ISP, who is a LAN themselves connected to a WAN, and ALL ISP's are like a railroad or highway. The end of every ISP's highway ends by merging onto a backbone. A backbone is the logical section of the Internet where traffic travels at a high rate of throughput.

How This all Works - NAT in Layman's Terms

According to RFC 1631 - Network Address Translation, NAT was created to bridge the GAP between a LAN and a WAN. Imagine the following:

You and I are two Medieval Kings in Neighboring Castles, separated by a Cobblestone Road. We're nice Kings, but we follow strict security standards because the other kingdoms don't like us. Each of us has a knight standing at our drawbridge. If I want to talk to you I give my knight my information, and he travels down the road to your knight. My knight gives your knight my information, and your knight carries it to you.


Given that story, my castle is my LAN, and your castle is Your LAN. As kings, we each have a Private IP Address given to us by our Routers(Knights). In order for me to talk to you, I must tell my knight I need him to travel on the highway. Our knights are smart. They take the Private IP Address and stick it in one of their pockets, and exchange it with the Public IP Address in their other Pocket. While traveling on the road(Internet), the knights only carry the Public IP Address. When my knight returns from your castle, he switches pockets again, and exchanges the Public IP Address for the private one that he hid in his pocket, and gives me the information I requested from you without telling me the Public IP Address.


The Exchanging of Private IP's for Public Ones in the knight's pockets, and vice-versa is NAT. The knight keeping track of the IP Addresses he gave the kings is DHCP. When we add townsfolk, each person in town connected to the castle is given an IP address by the knight. When the peasants need information from other peasants in the other kingdom the knight must travel the cobblestone road for them too. When 2 peasants in the same castle need to exchange information, they still go to the knight, but the knight doesn't travel on the road, he travels within the castle as he knows the Private IP Address of every peasant.


In answer to your question above, WhatIsMyIP is giving you the IP Address, that the knight uses when he travels on the road between my castle and yours(WAN). As such, I can use that information to find out which "castle" you live in.

The castle you were living in when you wrote this post was: The Technical University of Dortmund in North Rhine-Westphalia, Germany

IP Location Finder

Update
You need to contact your ISP and ask them if your equipment is configured correctly. Normally, you do not receive a Class A (10.x.x.x Address, because this address is non- routable according to the RFC from earlier) from an ISP unless IP sharing among customer LAN segments is occurring. This saves the ISP money because they don't have to spend money on buying routable IP Addresses. In my Analogy, the knight in your castle must go to another knight in a bigger Castle, and the knight from the bigger castle travels the road(Internet). This method allows multiple knights to share one road traveling knight for many castles. In the US, ISP's use one knight per every LAN. In short ask your ISP if the 10. Address is legal before setting up SSH. If so, you must set up SSH as a double pass.

  1. Forward all traffic from your WAN IP Address Port 22, 129.217.129.129:22 to your Primary ISP Address of 10.1.10.149, and then:
  2. Forward all Traffic from 10.1.10.149:22 to your LAN IP Address of 192.168.1.4

On most Consumer Services setting up a Webserver this way is against the AUP/TOS, but since your ISP is a University, the rules may be different. If your ISP tells you that IP Address of 10.x.x.x is incorrect have them help you fix it properly. If you tell them you're setting up a home webserver to access remotely and they say it's against policy, use a service like DynDNS. Last but not least, remember that since all these IP Addresses are Dynamic, you must redo the setup each time each IP Address in your setup changes.

  • but how does this help me access my computer from the internet. – akrv Jul 29 '14 at 15:39
  • It depends. Are you trying to access your home PC from the University or the University PC from home?? In case 1, you need to create an SSH connection. This will be hard if your university uses DHCP. In case 2, you need to ask the university for VPN access. – eyoung100 Jul 29 '14 at 15:44
  • I was just asking for a brief answer. Could you can do that for other SE. – Dishank Jindal Jul 29 '14 at 16:05
  • 1
    @Dishank: I disagree, see here for why. My answer follows the guidelies established in that question – eyoung100 Jul 29 '14 at 16:11
  • Thank for the link Carter. I will keep that in my mind for ever. But still the content is a bit extra, delete some useless lines. – Dishank Jindal Jul 29 '14 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.