Ngrok alternative?

There’s a nice pice of software that allows to publish local ports on externally accessible IPs. I wonder if something like that could be served via FreedomBox.

Or at least an easy way to publish tls-enabled virtual hosts and reverse-proxy to other LAN hosts.

FreedomBox already comes with an ngrok alternative called PageKite, but it is configured to run as a back-end (client). The same script can also be configured to be run as a front-end relay by passing different parameters.

The Apache server on FreedomBox is currently using the two ports 80 and 443 required by PageKite front-end relay. The documentation says that it is unlikely that PageKite can run on alternate ports and still support HTTPS.

Another HTTP server on port 80

The other option, assuming your web-server supports proxying, is to configure it to proxy requests for your PageKite domains to pagekite.py, and run pagekite.py on an alternate port. How this is done depends on your HTTP server software, but Apache and lighttpd at least are both capable of forwarding requests to alternate ports.

This is likely to work in many cases for standard HTTP traffic, but very unlikely to work for HTTPS.

The Apache server on FreedomBox will be able to serve as reverse proxy to other LAN hosts with some custom configuration. Self-signed certificates can be used for the LAN hosts for encryption of local traffic.

This is all theoretical. I haven’t tried it myself yet.

1 Like