[Bug]: Unable to forward remotehost:port
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
OS/Web Information
- Web Browser: Safari
- Local OS: MacOS
- Remote OS: Linux
- Remote Architecture: amd64
code-server --version
: 4.8.0
Steps to Reproduce
- Spawn a service in a neighbour container
- Under ports, paste container-ip:host
- It tells remotehost:port is forwarded, but it is unable to do
When I open the forwarded URL proxy, it says
connect ECONNREFUSED 0.0.0.0:8080
Expected
The service running at remotehost:port should be forwarded via web proxy
Actual
Only locally running ports are being forwarded and remorehost:port is not being forwarded unlike VS Code Desktop. It is not even respecting the host part and just attempting to forward a locally running port.
Logs
No response
Screenshot/Video
No response
Does this issue happen in VS Code or GitHub Codespaces?
- I cannot reproduce this in VS Code.
- I cannot reproduce this in GitHub Codespaces.
Are you accessing code-server over HTTPS?
- I am using HTTPS.
Notes
No response
Issue Analytics
- State:
- Created a year ago
- Comments:23 (10 by maintainers)
Top Results From Across the Web
Error while port forwarding to remote host - Mender Hub
Trying to communicate with a remote device via the mender device through port forwarding. if anybody has an idea about what might be...
Read more >SSH: Troubleshooting "Remote port forwarding failed for listen ...
The objective is to establish a reverse tunnel with port forwarding in order to consistently ssh into a host behind a NAT router...
Read more >SSH remote port forwarding failed - Server Fault
The reason it failed to reconnect is almost certainly due to the AliveInterval values (kasperd's answer). Using the ExitOnForwardFailure option ...
Read more >Can't forward port in remote VS Code · Issue #118395 - GitHub
Try to forward a port. Error message: Unable to forward localhost:8000. The host may not be available or that remote port may already...
Read more >Make a failed SSH forward a fatal error - Unix Stack Exchange
I have a script which connects to a remote host to replicate some files via SSH. I must connect to an rsync daemon...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great points and thank you for the links!!
I prefer the query parameter as well but I am concerned that the application itself might use query parameters and have one called
ip
or maybe it is an app with multiple pages and navigating to a page drops theip
query parameter.If we embed it into the path on the other hand the application would not be able to mess it up.
We could make it a requirement that applications running behind code-server’s proxy specially treat the
ip
query variable if it exists but I could see that not going too well. XD@code-asher @jsjoeio Please make sure that proxying is restricted to the following ranges:
IPv4
10.0.0.0/8
^1172.16.0.0/12
^1192.168.0.0/16
^1plus
127.0.0.1
^2/localhost
.IPv6
fc00::/7
^3plus
::1
^4/localhost
.Proxying to arbitrary IPs must be prevented.
👉 Otherwise, this opens up an incredible number of (undesirable) use cases.