![Conceder acceso a mi computadora local desde el exterior](https://rvso.com/image/1502877/Conceder%20acceso%20a%20mi%20computadora%20local%20desde%20el%20exterior.png)
Estoy en OS X El Capitain 10.11.5.
Intentando ejecutar el servidor web localmente y otorgar acceso desde algún lugar externo.
Para acceder a Internet utilizo un punto wifi.
El firewall no está disponible en mi computadora Mac.
ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=1<PERFORMNUD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether f4:5c:89:90:96:7d
inet6 fe80::f65c:89ff:fe90:967d%en0 prefixlen 64 scopeid 0x4
inet 10.37.44.92 netmask 0xfffffc00 broadcast 10.37.47.255
nd6 options=1<PERFORMNUD>
media: autoselect
status: active
en1: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
options=60<TSO4,TSO6>
ether 6a:00:01:80:39:90
media: autoselect <full-duplex>
status: inactive
en2: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
options=60<TSO4,TSO6>
ether 6a:00:01:80:39:91
media: autoselect <full-duplex>
status: inactive
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
ether 06:5c:89:90:96:7d
media: autoselect
status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
ether 9a:46:fc:f3:8c:a2
inet6 fe80::9846:fcff:fef3:8ca2%awdl0 prefixlen 64 scopeid 0x8
nd6 options=1<PERFORMNUD>
media: autoselect
status: active
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether f6:5c:89:09:14:00
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x2
member: en1 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 5 priority 0 path cost 0
member: en2 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 6 priority 0 path cost 0
nd6 options=1<PERFORMNUD>
media: <unknown type>
status: inactive
vboxnet0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
ether 0a:00:27:00:00:00
inet 192.168.99.1 netmask 0xffffff00 broadcast 192.168.99.255
Como puede ver, la dirección IP de mi computadora dentro de la red wifi es10.37.44.92
Al mismo tiempo Google muestra que mi IP pública es77.88.196.39
Así es como ejecuto el servidor web:
dmac:solidus-sample dob$ rails s -p 3001
=> Booting WEBrick
=> Rails 4.2.7 application starting in development on http://localhost:3001
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2016-08-09 15:32:15] INFO WEBrick 1.3.1
[2016-08-09 15:32:15] INFO ruby 2.2.4 (2015-12-16) [x86_64-darwin15]
[2016-08-09 15:32:15] INFO WEBrick::HTTPServer#start: pid=16366 port=3001
Me gustaría obtener acceso a mi servidor web mediantehttp://77.88.196.39:3001. Pero ahora no es accesible.
¿Qué he hecho?
Cuando ejecuto el servidor web de esa manera (la tecla -b significa vinculante):
rails s -p 3001 -b 10.37.44.92
Puedo acceder http://10.37.44.92:3001
desde cualquier ordenador dentro de la misma red Wifi.
Pero no hay acceso exitoso al servidor web desde Internet.
Gracias.
Respuesta1
Creo que necesitas un puerto de avance para que sea viable en el exterior. Por ejemplo su dirección es:192.168.1.21y desea proporcionar su servidor web en el exterior, necesita verificar su IP pública, en su caso es77.88.196.39.Entonces, para abrir la web debes abrirpuerto 80en su enrutador. Necesita ir a la ventana de configuración del enrutador y buscar con un reenvío de puerto o algunos piensan que suena así. Y luego ponte la dirección local.192.168.1.21y agregue el puerto 80 y haga clic en guardar. Ahora tu web debería ser viable en el exterior. Si no tiene acceso al enrutador, comuníquese con su administrador de red.
En su caso, debe abrir el puerto 3001 en el enrutador.