Remote debugging - how to create a port proxy?

I am trying to access a remote debug port running in field A (Debian) from window B (Windows). In field A, I start Chrome with the flag --remote-debugging-port=9222, and I see that it works correctly (I can access it localhost:9222from another browser on A). In addition, I am sure that the A and B boxes are connected, because I can access :80(apache) running in field A from window B, just fine. I need to do now to allow access to block B :9222in field A. I did a research on port forwarding rules and iptables, but I couldn’t get it working.

EDIT

Machine B is Windows, so I'm not sure how to use ssh there, I found a port forwarding application that seems to work fine. This results in the error: "received a connection, but cannot connect to host-B: 9222". So it looks like 9222 is not open to external connections. The output from netstat on A gives me:

root@template:/home/developer# netstat -nap | grep 9222
tcp        0      0 127.0.0.1:9222      0.0.0.0:*    LISTEN      24300/user     
+5
source share
3 answers

I found my answer here . It all comes down to the following:

  • open Chrome in one console: google-chrome --remote-debugging-port=9222
  • and configure the proxy server in another: ssh -L 0.0.0.0:9223:localhost:9222 localhost -N
  • Now you can access remote debugging from another computer using http://192.168.1.123:9223/
+7
source

localhost. .

ssh.

ssh user@host-A.example.org -L 9111:127.0.0.1: 9222

localhost: 9111 B

ssh A localhost: 9222

+1

Another solution is to forward another port to host A using nc

http://en.wikipedia.org/wiki/Netcat

+1
source

All Articles