ngLocalhost allows you to easily expose your local environment to the world, making it accessible from anywhere, for free! No need for signup or complicated setups.
Try it using the below command:
$ ssh -R 80:localhost:8080 nglocalhost.com
Copied!
After running the above command, you can access your localhost:8080 on https://abc.nglocalhost.com, no matter where you are!
If you find this service useful, please consider making a donation to help cover the expenses and improve the server’s performance. Every contribution, no matter how small, makes a big difference!
Your donations help us keep the service running, improve its performance, and cover the associated costs. If you find this service valuable, consider buying us a coffee to show your support!
Thank you for your generosity and support!
Let's understand the basic functionality provided on the ngLocalhost.
$ ssh -R 443:localhost:443 nglocalhost.com
The -R option in the ssh command is used to set up reverse port forwarding. When you use ssh -R, you're configuring the remote server to forward traffic back to your local machine.
$ ssh -R 8080:localhost:80 -R 2222:localhost:22 nglocalhost.com
This command sets up two reverse port forwards. It forwards port 8080 on the remote server to port 80 on your local machine, and it also forwards port 2222 on the remote server to port 22 on your local machine.
$ ssh -R 8080:192.168.1.20:80 nglocalhost.com
This command allows you to expose a web service (running on port 80) on the local machine 192.168.1.20 to the remote server's port 8080, making it accessible from the remote server.
$ ssh -R 0:localhost:443 nglocalhost.com
This command allocate a random TCP Port to your request.
If you are expercing automatic disconnection due to the network failure, you can use AutoSSH.
$ autossh -M 0 -R 80:localhost:8080 nglocalhost.com
By using autossh, you can keep your SSH tunnels alive even after the network or power failures.
Now, ngLocalhost supports the domain/subdomain forwarding. Either you can use your own domain/subdomain, or you can request one of the avaiable nglocalhost.com subdomain.
Required steps to use the ngLocalhost subDomain:To prevent spam, please validate your SSH key fingerprint using your Google account.
$ ssh -R mysubdomain:80:localhost:80 nglocalhost.com
Or
$ ssh -R mysubdomain.nglocalhost.com:80:localhost:80 nglocalhost.com
By using this command, nglocalhost will try to assign the requested subdomain mysubdomain.nglocalhost.com to your request. However, if the subdomain already taken, you will get the random subdomain automatically.
Required steps to use your custom domain/subDomain:First, to prevent spam, please validate your SSH key fingerprint using your Google account.
Now, you need to create two DNS entries:Create CNAME record for your domain:
Create a CNAME record to map you domain/subdomain to nglocalhost.com. In case, you can't create CNAME DNS record, you need to create DNS A records towards the nglocalhost.com IP Address.
To verify the domain ownership, create or use the existing SSH Key Fingerprint, and add DNS TXT record against your domain/subdomain in below format:
_nglocalhost-challenge.[Domain/SubDomain]=[SSH Fingerprint]
Example:_nglocalhost-challenge.subdomain.example.com=hGec+sadfqkjRVhwsqadfi1K98KyD0tRaa7fDj0rOsak
You can verify the DNS Propagation at whatsmydns.net
Now, you need to request for the remote forwarding for your domain/subDomain using the same SSH Key that is configured in your DNS Server.
ssh -R subdomain.example.com:80:localhost:80 nglocalhost.com
We will verifiy your SSH Key with the Public DNS and only allow the remote forwarding for your domain/subdomain if the key fingerprint match with DNS TXT record.
Note: By default, ngLocalhost.com will use it's certificate for the SSL/TLS traffic. Either you can use HTTP or you can forwards your SSL Certificate and Key to us to encrypt the traffic with your certificate and keys.
If you need help, please email us at help@nglocalhost.com.
Please sent an email to help@nglocalhost.com.
Start a discussion on Google Group
You can also follow us on below Social Platforms: