ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 1711

DedTunnel - Port Forwarding Solution Using Serveo

by DedSpace - 07-08-2020 - 08:20 PM
#1
For those who have tried to access your locally hosted service or listener over WAN, you may have considered opening up a port(s) in your router's firewall, getting a VPS, or in my case tried a port forwarding solution such as Ngrok or Serveo.

Ngrok and Serveo use SSH connections to forward your local ports to their WAN facing ports.  However Ngrok is a paid service (well, it also has limited free accounts), and Serveo isn't exactly reliable - if left inactive, Serveo will close the connection.  That's where DedTunnel comes in.

DedTunnel establishes the port forwarding SSH connection, taking the port your service is running on locally and the port you'd like to access it on (serveousercontent.com:PORT) as arguments, then periodically sends an empty request to the server to keep the connection alive.

Example:
Code:
DedTunnel -l 1026 -r 3489
or
Code:
DedTunnel --local 1026 --remote 3489

Both of the above examples will forward your local port 1026 to Serveo, making it accessible on serveousercontent.com:3489.  If you'd like to host a website, ports 80 or 8080  should be supplied as the remote port, and Serveo will supply you with a subdomain such as yoursubdomain.serveousercontent.com.

Link to my github repo:

https://github.com/DedSp4ce/DedTunnel

Finally:
The make tunnel and keep alive processes run on different threads, and I'm having a hard time closing the software without having to press Ctrl+C twice (I'd like it to be just the once).  If anyone knows more about Python threading who knows how to sort that out, I would be very grateful.  Also, please share any technical difficulties you are having!  I wrote this script last night and haven't seen anything out of the ordinary as of yet.

Thank you for reading!
Reply

Users browsing: 1 Guest(s)