Port forwarding |
||
Issue descriptionAllow users to choose VM ports in Settings to make accessible from external devices. This will allow users to debug their website on a mobile phone.
,
May 31 2018
I think port forwarding is also useful for web developers who want to debug HTTPS websites. Possibly the two use cases should be separate bugs.
,
Jul 18
There is a workaround for this. Run "ip addr" to find the IP of your VM then use "Connection Forwarder" from the chrome store to forward connections to your chromebooks local ip into the container's ip. https://chrome.google.com/webstore/detail/connection-forwarder/ahaijnonphgkgnkbklchdhclailflinn I use this setup to test a web app running in development mode with my phone.
,
Aug 2
,
Sep 19
Doesn't look like the extension works with a web socket. Also it looks like port 8000 is already forwarding. Any others set by default?
,
Sep 22
Looks like port 8080 works also by default
,
Sep 24
re: default ports and workaround:
When I grep for ssh processes in crosh (`ps aux | grep ssh`), there's one that forwards ports to the container I'm running:
```
/usr/bin/ssh \
-i /run/vm_cicerone/private_key \
-o UserKnownHostsFile=/run/vm_cicerone/known_hosts \
-N \
-p 2222 \
-L 3000:localhost:3000 \
-L 4200:localhost:4200 \
-L 5000:localhost:5000 \
-L 8000:localhost:8000 \
-L 8008:localhost:8008 \
-L 8080:localhost:8080 \
-L 8085:localhost:8085 \
-L 8888:localhost:8888 \
-L 9005:localhost:9005 \
<username redacted>@<ip address redacted>
```
I guess these ports are the ones forwarded by default.
I was able to forward an additional port by executing a similar command in a crosh shell:
```
sudo su \
-s /bin/bash
-c '/usr/bin/ssh \
-i /run/vm_cicerone/private_key
-o UserKnownHostsFile=/run/vm_cicerone/known_hosts
-N \
-p 2222 \
-L 9000:localhost:9000 \
<username redacted>@<ip address redacted>' \
vm_cicerone
```
I have developer mode enabled and I'm not sure if that's necessary for this workaround though.
,
Sep 24
I keep losing the port forwards for some reason today. I'm fine if I use my 100.*.*.* address to access web services running. I'm guessing the SSH sessions are dying? Everything was working great last night. I don't know what I'm doing different other than taxing the system more. I start the terminal and it works great. Then within a few minutes all the port forwards die. |
||
►
Sign in to add a comment |
||
Comment 1 by rjwright@chromium.org
, May 31 2018