Servidores caseros y el Internet

De MoodleDocs

Nota: Pendiente de Traducir. ¡Anímese a traducir esta página!.     ( y otras páginas pendientes)



Para la mayoría de la gente, no es posible conectar un sitio Moodle instalado en una computadora casera al Internet. Los profesionales de las tecnologías de la Información (ingenieros y similares) dirán que una computadora casera no puede soportar a muchas personas intentando usar un sitio Moodle simultáneamente. En segundo lugar, la mayoría de las computadoras caseras no tienen una IP fija, que puedan encontrar otras computadoras en Internet.

Aquí estamos tratando de contestar la pregunta: "¿ Porqué un servidor web en mi computadora casera no puede ser usado por otras personas en el Internet ?".

Cómo funciona el Internet (para principiantes)

Cada computadora en internet tiene una direccion IP unica, que es una cadena de 4 numeros. Por ejemplo, en este servidor es 74.52.44.50. Para recibir datos de moodle.org, su computadora necesita conectarse a esta direccion IP. De manera similar, su computadora tiene una direccion IP, La que el servidor usara para enviar los datos que usted solicito, de nuevo a su computadora.

Ahora, estar escribiendo esos numeros todo el tiempo es un dolor de cabeza, y es por eso que tenemos el sistema de nombre de dominios(DNS). Eso es simplemente un servicio de busqueda, asi usted puede preguntar por la direccion http://moodle.org/ en lugar de tener que recordar cosas como http://74.52.44.50/.

Se sabe bien que cada computadora tiene una direccion real como 74.52.44.50, El estandard IP Define algunas direcciones magicas, de las cuales 127.0.0.1 es la mas util. No importa en cual computadora este usted, 127.0.0.1 significa 'esta computadora'. Y en el sistema DNS, localhost es siempre un alias para 127.0.0.1.

So, if you are accessing your Moodle site with a URL like http://localhost/moodle/, it will only ever work on your own computer. However, if you can work out the real address of your computer, and change http://123.234.345.456/moodle/ (and if you update wwwroot in config.php), then other people will be able to access your Moodle.

Now, the oversimplification in the above is the bit 'Every computer on the internet has a unique* IP address'. Actually, it is more complicated than that. For example, if you have a home network with several computers behind a router, then actually, to the rest of the internet, it will appear as if there is just one computer (the router) attached to the internet. The router does some magic (also called Network Address Translation - NAT) to make all your computers seem like one. That is because there are only 255*255*255*255 ~ 4 billion IP addresses, and there are more computers than that in the world. That is also why we are moving (very slowly) from IP4 to IP6, which allows more addresses.

If you are behind a NAT router, then getting a real address for your computer is harder. Also, if you are behind a filewall, people may not be able to get to your Moodle, even if they know the address.

Capacidad de un servidor casero o una intranet de oficina pequeña

La capacidad incluye el ancho de banda y la memoria RAM.


MACs, NATs, IPs, routers, DHCP, DNS y el Internet

For those who want a little more in the way of a simple explanation, read this. We are tying to answer the question: "Why a Moodle web server on my home computer can not be used by other people on the internet".

A computer generally communicates to and through a single network router. In the simple network example, routers communicate with each other. Since each router knows the computers attached to it, the router passes along messages to the right computer. The messages are called packets.

Servidor Web

A web server on a computer basically listens for something saying "I am looking for MoodleHouse.org" or "I am looking for 192.168.0.11". If the web server hears that and knows it is MoodleHouse.org or is 192.168.0.11, then the web server answers by sending some information back to the sender. The flow of information is contained in packets. The usual example is that the postal service has an envelope addressed to "1234 Anywhere Street", or "The Moodle House" in their area, with a return address on it of "101 Sender Way".

Algunos términos y contextos

DNS or a DNS server keeps tracks that MoodleHouse.org is located at 192.168.0.11. A router's NAT table keeps track that 192.168.0.11 is sent to a Media Access Control address (MAC address). A MAC address defines a specific network connection on a specific computer and is unique in the world. An example might be that the MAC address is like saying go to the front door of "The Moodle House", not the back or side door. Your area's postal service makes a note on all your outgoing mail and when it gets something for you it knows it.

Maneras de obtener direcciones IP

The Dynamic Host Configuration Protocol (DHCP) process on a router listens for computers that are turned on, do not have an IP in the NAT table. And the computers network connection is requesting an IP address. DHCP assigns that computer's MAC address an IP address and that is added to the NAT table in the router. The postal example: a new house is built and has 3 doors, and one is where the owners want the mail delivered. Or that a child comes home for the summer and wants their mail delivered to the side door at "The Moodle House" while they are there.

  • On some networks, you can or must tell your network connection that it is a specific IP address because DHCP is turned off. Further your router may only accept IP addresses in a certain range of numbers. Some networks assign fixed IPs to specific MAC addresses and ignore anything else that is not on it's list.


Direcciones IP misteriosas

One basic problem is that many home computer's have their IP address assigned by their network provider and these will be intentionally changed/reassigned every few days. This is like saying this week your area's postal service calls The Moodle House's address "1234 Orange Way", but last week it was "9876 Martin Street".

Further, the IP address you see on your computer's network connection is not always what other computers see on the information packets. Packet's can have many layers.

Todo es acerca de a quién conoces

Here is where it gets really complicated. We will try to be simple. Generally speaking, communication in a network comes down to who knows who.

Routers know that other 'router like things' exist which have their own set of IPs that they know about. With some IP addresses, there will be many 'router like things' that know where to send a packet that is addressed to a specific IP. Every time it gets sent along, the packet gets another layer. The area postal service puts the envelope in another one. The outside envelope is addressed to the postal service that the area postal service thinks may know where to find the "The Moodle House's" front door. However, the "101 Senders Way" return address on the outside of the envelope becomes the sending postman's. The inside envelope still contains the original return address but now it is hidden by the outside envelope.

Imagine that the original packet is forwarded through 10 routers before it reaches the right MAC address. There can be a lot of layers that are covering the return MAC address. Being very simple, when the packet reaches it's destination, it is opened and the original message is read along with the original IP address. In other words the envelope reaches the back door of "The Moodle House" and is opened. The message says send the front page to "101 Senders Way".

The Moodle House sends a packet with information out to the return address originally supplied by "101 Senders Way". The process works in reverse. The returning packet may not take the same route back (another long story).

Dímelo otra vez

Tell me again why people on the internet can not use my home Moodle server? In short, since you don't have a special address, ONLY your personal postal service knows your address. However, all the other postal services in the world wide web can find your personal postal service's address. Your postal service will not let your computer use it's IP address. Thus your Moodle Server will never hear any messages address to it.

Of course their are exceptions but for most home computers, that is the way it is.

Special circumstances and exceptions

There are places where you basically can rent a public ip for you computer. When your local friendly internet provider changes your IP, you log into one of these places, identify your self and the service will now recognize that your IP is not 192.168.0.42 but has changed to 192.168.40.14. However, more importantly all the computers in the world that know your computer as 127.127.127.127, will be able to find you.

There is an international body that essentially registers IP addresses. It might be possible to get them to issue you an IP address. Or if you work for a large college or organization that has its own range of IP address, they might make it possible for your computer to be assigned an IP that any computer on the internet can find.

An intranet describes all the computers "behind" a router that assigns N

... Continuará...


Experiencias de usuarios compartiendo red local en Internet

Vea una explicación paso a paso de cómo se hace


Vea otros casos y sus problemas peculiares

Vea también