Giter Site home page Giter Site logo

Comments (16)

jpillora avatar jpillora commented on August 17, 2024 8

I plan on merging this fork https://github.com/mcbernie/chisel at some point (supports using clients as proxy endpoints) and then with the chisel server also acting as a client (server can also provide remotes), then it would result in this functionality.

from chisel.

sunshineco avatar sunshineco commented on August 17, 2024 2

Pull request #72 implements reverse port forwarding.

from chisel.

abraiante avatar abraiante commented on August 17, 2024 1

I second this. Initially I thought this was what Chisel did, but when setting it up I noticed it was the other way around.

My use case:

I have a local (like in the client) HTTP service, that I want to expose to the internet. Chisel is running on the server and I would to set-up a reverse tunnel, so issuing for instance, in the server a

wget http://localhost:8080

would open a connection to a port in the client where the HTTP service is offered.

The reverse tunnel would be set-up when Chisel clients connects to the server, and as @penguinpowernz mentioned it could be described in the command-line with something like the thing SSH client uses:

-L [bind_address:]port:host:hostport
             Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side.  This works by allocating a socket
             to listen to port on the local side, optionally bound to the specified bind_address.  Whenever a connection is made to this port, the connection is forwarded
             over the secure channel, and a connection is made to host port hostport from the remote machine.

 -R [bind_address:]port:host:hostport
             Specifies that the given port on the remote (server) host is to be forwarded to the given host and port on the local side.  This works by allocating a socket
             to listen to port on the remote side, and whenever a connection is made to this port, the connection is forwarded over the secure channel, and a connection is
             made to host port hostport from the local machine.

This would make chisel one of the most versatile hole-punching firewall tools I know.

from chisel.

smerschjohann avatar smerschjohann commented on August 17, 2024 1

How is the status about this plan? Can I help with something?

from chisel.

penguinpowernz avatar penguinpowernz commented on August 17, 2024

How to extend the remote spec to signal remote port forward? Prefix with an R? Make the centre colon an equals sign?

from chisel.

jpillora avatar jpillora commented on August 17, 2024

So this would make the server listen/accept connections and the client terminate them? I have another plan to allow clients to make connections #9 though since it's quite a large change I decided not to include it in the 1.2 release

from chisel.

penguinpowernz avatar penguinpowernz commented on August 17, 2024

Oh I'm thinking SSH protocol... perhaps I misunderstood the SSH related lines in your code.

Internally do you use SSH to do the local port forwards? If so we could simply use that to enact remote port forwards.

from chisel.

jpillora avatar jpillora commented on August 17, 2024

No, internally, I use the SSH protocol. The SSH program implements it, so chisel would also need to implement it.

from chisel.

vizv avatar vizv commented on August 17, 2024

Initially I thought this was what Chisel did, but when setting it up I noticed it was the other way around.

That's exactly what I thought... After I setup the server, I found it's impossible to do the reverse tunneling.

Adding reverse tunnel support will be nice.

from chisel.

hanscees avatar hanscees commented on August 17, 2024

Same here. This means the project page could use soms user scenario samples.

from chisel.

 avatar commented on August 17, 2024

Me too. Did this get merged ?

from chisel.

steom avatar steom commented on August 17, 2024

we who love the holes are all eagerly waiting

from chisel.

zurp avatar zurp commented on August 17, 2024

hey, is there any update on when/if this will land in chisel?

from chisel.

segator avatar segator commented on August 17, 2024

very robust and stable, but we need reverse tunneling.

from chisel.

 avatar commented on August 17, 2024

from chisel.

jpillora avatar jpillora commented on August 17, 2024

#72 has been merged. @mcbernie's implementation (https://github.com/mcbernie/chisel) looks good though I haven't tested it. It could still be merged one day still though for now, I chose @sunshineco's implementation for its simplicity. chisel now implements remote forwarding like SSH. Search "reverse" in the README for more info, in short:

    When the chisel server has --reverse enabled, remotes can
    be prefixed with R to denote that they are reversed. That
    is, the server will listen and accept connections, and they
    will be proxied through the client which specified the remote.

from chisel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.