Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose a local server behind NAT to internet #25

Open
snimavat opened this issue Feb 21, 2024 · 1 comment
Open

Expose a local server behind NAT to internet #25

snimavat opened this issue Feb 21, 2024 · 1 comment

Comments

@snimavat
Copy link

snimavat commented Feb 21, 2024

Looks like the reverse proxy mode can be used to expose a local server behind NAT to be exposed to internet

Eg. a server running on wsclient can be exposed to internet using reverse proxy.

Examples about how to run a reverse tunnel client:

//without security
./wstun.js -r6666:2.2.2.2:33 ws://server:8080

//with security 
./wstun.js -r6666:2.2.2.2:33 wss://server:8080

In the above examples, the client asks the server to open a TCP server on port 6666 and all connections on this port are tunneled to the client that is directely connected to 2.2.2.2:33.

In above example, i am not clear, what is tunneled to the client that is directely connected to 2.2.2.2:33

What is 2.2.2.2 ? I want to expose a server on 127.0.0.1:LOCALPORT

@flongo82
Copy link
Member

Hello, the server should be running on a frontier machine with a public IP address on one side and an interface on a LAN on the other. In the example, the server is reachable at the endpoint ws://server:8080 where server is the public IP address. You are asking the server to open port 6666 and tunnel all the traffic to a computer on the LAN reachable at IP address 2.2.2.2 on port 33.

You can expose a service running on the server. Just use localhost or 127.0.0.1:localport after the first :

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants