Starting a local tunnel is as simple as pasting the following command into your Terminal / Command Prompt:
ssh -p 443 -R0:localhost:8000 qr@a.pinggy.io
Change 8000 to your required port. Visit https://pinggy.io for more details.
Local tunnels are simple using Pinggy
Local Tunnel Overview
Benefits & Use Cases
Security Considerations
Setting Up with Pinggy
ssh -p 443 -R0:localhost:<your-port> qr@a.pinggy.io
ssh -p 443 -R0:localhost:<your-port> tcp@a.pinggy.io
Local tunnels are tunnels to localhost which helps in hosting websites, web applications, share files, remote access etc. It essential where port forwarding is not possible such as behind CGNAT and firewalls. Using just one Pinggy command get a secure local tunnel to your localhost server directly through the terminal. No need for platform-specific downloads and installations – Pinggy HTTP / TCP / TLS tunnels make server exposure effortless and efficient for developers worldwide.
Paste one command to start tunnel:
A local tunnel is created and you get an HTTP link to your localhost.
A local tunnel is a secure tunnel to reach a device connected to a private locan network from the internet. A local tunnel can be for different protocols such as HTTP, TCP, UDP, etc., which allows tunneling of traffic of that protocol. For example, a HTTP local tunnel will allow you to host a website on your localhost, that is your local computer, and make it accessible from the internet through a public URL.
Usually localhost ports are not reachable from the interenet because of NAT, CGNATS, and firewalls. Local tunnels are solve this problem by tunneling in traffic in a secure manner. This is similar to port forwarding, but with the added advantage of a public address and the ability to circumvent CGNAT.
Using Pinggy is fastest way to setup a local tunnel. With just one command, a local server can be made accessible over the internet. This is particularly useful during development and testing phases.
Open command prompt / terminal. Paste the following command and press enter to start a local tunnel. Replace 8000
with your port.
ssh -p 443 -R0:localhost:8000 qr@a.pinggy.io
The local tunnel can be accessed using the public URL given by Pinggy.
Customize the command for required features and better reliability:
Pinggy will give you a random URL for your local tunnel by default. To avoid this, you can sign in to https://dashboard.pinggy.io to get an access token. When you start a tunnel using your access token, you can find ongoing tunnel URLs from the dashboard. You can upgrade to Pro to get a persistent subdomain.
You can link a custom domain to your Pinggy tunnel to have a permanent URL to localhost.
You can create TCP local tunnel by running the following command in command prompt / terminal (replace 22
with your port):
ssh -p 443 -R0:localhost:22 tcp@a.pinggy.io
You can customize the command with more options:
After running the tunneling command, you will receive a public URL in the following format: tcp://tljocjkijs.a.pinggy.link:40527
You can use this address and port to connect to your local port from outside the local network.
Local tunnels offer several key advantages:
Local tunnels are incredibly versatile and can be applied to various scenarios, including:
While local tunnels simplify connectivity, they also introduce some security challenges:
Exposure of Sensitive Services: By making your local services public, you risk exposing development tools or sensitive endpoints.
Mitigation: Use authentication, restrict access with IP whitelisting, and ensure that no production data is exposed.
Data Leakage: Unsecured tunnels can inadvertently expose confidential or internal data.
Mitigation: Always use encrypted tunnels (TLS/HTTPS) and avoid using real production data in your development environment.
Unauthorized Access: A publicly accessible tunnel may attract unwanted attention, including brute-force or exploitation attempts.
Mitigation: Employ robust access tokens, use persistent subdomains through trusted dashboards (like Pinggy’s), and monitor traffic for any suspicious activity.
Man-in-the-Middle (MitM) Attacks: Data traveling through an unencrypted tunnel is vulnerable to interception.
Mitigation: Ensure that your tunnel encrypts data in transit using TLS or similar protocols.
By being aware of these risks and implementing the recommended practices, you can enjoy the benefits of local tunnels while maintaining a secure environment.
Local tunnels empower developers and IT professionals to expose local environments quickly and securely, whether for development, testing, demos, or remote administration. They offer a practical solution to bypass common networking hurdles and support multiple protocols to fit a variety of use cases. However, it is essential to implement security best practices to mitigate potential risks associated with exposing internal services to the public internet.