chisel icon indicating copy to clipboard operation
chisel copied to clipboard

How expose local website to internet

Open teopost opened this issue 6 years ago • 7 comments

Hi, I would like to expose my local web application (http://localhost: 8000/index.html) to internet address http://185.52.2.166:80/index.html.

I'm trying to use chisel to do it but I'm probably wrong in the configuration.

I ran chisel server on a cloud VM with public IP 185.52.2.166

server

[root@vm tmp]# chisel server --port 80
2020/03/19 15:58:44 server: Fingerprint a7:d9:a5:93:4d:86:d5:75:62:b4:72:93:b1:31:49:9f
2020/03/19 15:58:44 server: Listening on 0.0.0.0:80...

client (my laptop)

[root@mcbook tmp]#  ./chisel client http://185.52.2.166 8000
2020/03/19 17:00:58 client: Connecting to ws://185.52.2.166:80
2020/03/19 17:00:58 client: proxy#1:0.0.0.0:8000=>0.0.0.0:8000: Listening
2020/03/19 17:00:58 client: Fingerprint 8c:f6:15:9b:f8:c6:11:f0:8f:22:b4:dc:7c:d5:8c:af
2020/03/19 17:00:59 client: Connected (Latency 45.672614ms)

I wish my application was visible on the internet with address http://185.52.2.166:80/index.html

It's possible to do it ?

teopost avatar Mar 19 '20 16:03 teopost

By default, chisel tunnels ports listening on the client, if you want to tunnel ports listening on the server - you need to use --reverse. Note with --reverse enabled, you must have more trust in your clients as they can open any port on the server.

On Fri, 20 Mar 2020 at 03:04, Stefano Teodorani [email protected] wrote:

Hi, I would like to expose a local web application (http://localhost: 8000/index.html I'm trying to use chisel to do it but I'm probably wrong in the configuration. I ran chisel server on a cloud VM with public IP 185.52.2.166

server [root@vm tmp]# chisel server --port 80 2020/03/19 15:58:44 server: Fingerprint a7:d9:a5:93:4d:86:d5:75:62:b4:72:93:b1:31:49:9f 2020/03/19 15:58:44 server: Listening on 0.0.0.0:80...

client (my laptop) [root@mcbook tmp]# ./chisel client http://185.52.2.166 8000 2020/03/19 17:00:58 client: Connecting to ws://185.52.2.166:80 2020/03/19 17:00:58 client: proxy#1:0.0.0.0:8000=>0.0.0.0:8000: Listening 2020/03/19 17:00:58 client: Fingerprint 8c:f6:15:9b:f8:c6:11:f0:8f:22:b4:dc:7c:d5:8c:af 2020/03/19 17:00:59 client: Connected (Latency 45.672614ms)

I wish my application was visible on the internet with address http://185.52.2.166:80/index.html

It's possible to do it ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jpillora/chisel/issues/138, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE2X426FIXW6TVYSMI6RS3RII7AVANCNFSM4LPMNY5Q .

jpillora avatar Mar 20 '20 01:03 jpillora

I added the server side -reverse option, but I'm still wrong Can you give me an example? immagine

immagine

When I run the webserver on the laptop it tells me that port 8000 is in use

immagine

teopost avatar Mar 20 '20 09:03 teopost

See docs https://github.com/jpillora/chisel - Look under chisel client --help

jpillora avatar Mar 20 '20 09:03 jpillora

swap your 8000 argument for R:8000 then visit the server's port 8000

jpillora avatar Mar 20 '20 09:03 jpillora

Thank you.

SERVER

immagine

CLIENT

immagine

immagine

Now It's work

immagine

teopost avatar Mar 20 '20 10:03 teopost

👍

jpillora avatar Mar 20 '20 14:03 jpillora

This post helped me achieve what I was trying to do. Thanks.

marcosandresacevedo avatar Jun 04 '20 19:06 marcosandresacevedo