reverse-tunnel | Reverse tunnel TCP and UDP | Proxy library
kandi X-RAY | reverse-tunnel Summary
kandi X-RAY | reverse-tunnel Summary
[Build Status][build-badge]][build-url] [Release][release-badge]][release-url] [MIT License][license-badge]] LICENSE.txt). [build-badge]: [build-url]: [release-badge]: [release-url]: [license-badge]: rtun is a tool for exposing TCP and UDP ports to the Internet via a public gateway server. You can expose ssh and mosh server on a machine behind firewall and NAT.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Start starts the agent
- WebSocket upgrades websocket connection
- Watch sends a ping message to the websocket connection
- run runs the agent
- extractAuthKey extracts the auth key from the request
- NewService returns a new Service .
- Add adds a session to the sessionStore
- parsePort parses a string to a port number .
- hookCancel executes the given function with the given context .
- Load config file
reverse-tunnel Key Features
reverse-tunnel Examples and Code Snippets
Community Discussions
Trending Discussions on reverse-tunnel
QUESTION
There are many posts on SO and elsewhere on how to set this up. So far I've been unsuccessful in getting it working.
Setup
Local machine - Windows 10, with Cygwin, git bash, and WSL2 with Ubuntu installed; and MacBook Air (Mojave)
Host machine - AWS EC2 instance running Amazon Linux 2
Docker container - CentOS 7.8 running PHP with Xdebug
Goal
Remotely debug PHP code in container from local machine by utilizing a reverse tunnel from the local machine to the container.
I have gotten this working before when the PHP code was installed locally on the host machine, so the question is not around Xdebug. As soon as I moved the PHP code into the container, debugging no longer works.
What I've tried
Setting up a reverse tunnel from the local machine to the host EC2 instance works. For this I'm doing ssh -vvv -i "aws.pem" -R 9000:localhost:9000 user@ec2instance
in terminal, cygwin, or git bash and testing with nc -z localhost 9000 || echo 'no tunnel open'
on the host machine.
When I docker exec -it container bash
into the container and run nc, the tunnel is not available.
I'm using docker-compose:
...ANSWER
Answered 2020-Jun-26 at 03:56I got this working. After reading up on the ssh man page and looking over things again, I realized I was binding to the docker container IP not the bridge (docker0) IP.
I updated my connect command to ssh -vvv -i "aws.pem" -R 9000:172.17.0.1:9000 user@ec2instance
with the right IP and the tunnel started working. I do still have GatewayPorts enabled (per the man page) and removed the 9000:9000 mapping.
I then updated my xdebug.remote_host value to the same IP and debugging is now working. Not sure why host.docker.internal didn't work, but that's for another day.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install reverse-tunnel
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page