Add soms user scenario samples please
Hi, its hard to understand what chisel does and does not do. Is it possible to add some user scenario examples on the readme please?
If I understand correctly you can use chisel to:
- set up a proxy on the internet that allows you to connect to ports your firewall blocks
- set up your own socks proxy on the internet somewhere so you can make connections to internet sites that you are not allowed to go to by a firewall
You cannot use chisel to:
- remotely login into a desktop say on your work behind corporate firewall, like you can with logmein hamachi or other remote login services
Yep this is a good suggestion, will update the readme at some point :)
However, if I read this : http://www.thegeekstuff.com/2013/11/reverse-ssh-tunnel/
One should be able to tunnel a shell from a lan behind a firewall to internet over 443 or 80.
First layer would be to use a reverse ssh tunnel to a remote server, that is just sitting there waiting
Using ssh -fN -R 7000:localhost:22 username@yourMachine-ipaddress as explained in the url above
Second layer would be to tunnel the port 22 traffic over chisel using port 80 or 443
That would result in a host on internet, you can use to get a shell on a desktop/server in a network behind a firewall.
1- server on lan (machine A) connects to internet over ssh, over http, to an internet ssh host (machine B) 2- from your home (machine C) you connect to machine B. There you can connect to machine A.
Voila. But could that work?
If you jpillora can confirm this could work, I can built and document it and write a blog on it. All you have to do than is make a link.
I tried chisel and (client) installation is really easy. Also, the idea is awesome. However, I would like to use it on my own server. And on my server I already have HTTPS website.
As I understand, for chisel server you have to define host and port. But on my host (let's say myhost.org) at port 443 I already have a webserver running. So as I understand, I cannot run chisel on the same port as my webserver is already running. Is that true?
Anyway, I see that chisel server has an option --proxy.
My next question is then: how I can perform the proxying? Because I have an HTTPS-only website, this means all HTTP requests are redirected to HTTPS automatically.
So one option would be:
- run chisel on port 80 with proxy set to localhost:8080.
- run Nginx on localhost:8080 with auto redirection to 443
- run Nginx also on 443.
In that case:
- if user come to HTTPS with web browser, he will get HTTPS website;
- if user come to HTTP with web browser, he will be redirected to HTTPS website;
- if user come to HTTP with chisel, he will get connection to chisel server.
But could there been another option?
- run Nginx on port 80 with auto redirection to 443
- run Nginx also on localhost:4443.
- run chisel on 443 with proxy set to Nginx on localhost:4443
In that case:
- if user come to HTTP with web browser, he will be redirected to 443 port;
- if user come to 443 port with web browser, he will be proxyed to 4443 port and will get HTTPS website;
- if user come to 443 port with chisel, he will get connection to chisel server.
So, my question is, is that scenario possible?
An my next question is... Nginx can be used as a WebSocket proxy. In that case, Nginx "creates" a tunnel between a client and a backend server. Is it possible that backend server would be chisel? That would mean that client should connect to a specific URL, for instance https://myserver/websocket and from this location there will be tunnel established to let's say localhost:8080, where chisel would be listening.
That is possible?
As I understand, for chisel server you have to define host and port. But on my host (let's say myhost.org) at port 443 I already have a webserver running. So as I understand, I cannot run chisel on the same port as my webserver is already running. Is that true?
I have an idea of using a virtual host on the webserver and using something like nginx reverse proxy, however I haven't tried it yet, so I'm not sure as it's not confirmed at the moment.
EDIT: link to related discussion:
- https://github.com/jpillora/chisel/issues/2
- https://github.com/jpillora/chisel/issues/221
I give it a try, and document it on the wiki page, I know I'm late, this issue is created at 2017 and the people here might not need it anymore, but I hope it can help some people like me in the future even by just a little bit information.
anyway, thanks for this awesome project, and please correct me if there's something misleading or incorrect/inaccurate on the revision I made ^^