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 secure connections to your localhost that help in exposing websites, web applications, files, and enabling remote access. They’re essential when port forwarding isn’t possible, such as when behind CGNAT and firewalls. Using just one Pinggy command, you can establish 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 in seconds.
A local tunnel is a secure connection that allows external access to a device connected to a private local network from the internet. Local tunnels can handle different protocols such as HTTP, TCP, UDP, etc., which enables tunneling traffic of that specific protocol. For example, an HTTP local tunnel allows you to host a website on your localhost (your local computer) and make it accessible from the internet through a public URL.
Usually, localhost ports aren’t reachable from the internet because of NAT, CGNAT, and firewalls. Local tunnels solve this problem by tunneling traffic in a secure manner. This is similar to port forwarding but with the added advantages of a public address and the ability to circumvent CGNAT restrictions.
Using Pinggy is the fastest way to set up a local tunnel. With just one command, any local server can be made accessible over the internet. This is particularly useful during development, testing, demonstrations, and remote collaboration.
Open your command prompt / terminal. Paste the following command and press enter to start a local tunnel. Replace 8000
with your desired port:
ssh -p 443 -R0:localhost:8000 qr@a.pinggy.io
The local tunnel can be accessed using the public URL provided by Pinggy after running the command.
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.
If you want to set up a local tunnel from scratch, you can also rent a VPS and use SSH port forwarding to expose your local services. This involves setting up an SSH connection to the VPS and forwarding ports manually. While this method provides more control, it is more complex to configure and requires managing the VPS, firewall rules, and SSH keys. For most users, tools like Pinggy offer a simpler and faster solution.
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. Use basic authentication or bearer token authentication for more security.
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. With Pinggy’s simple one-command approach, you can get started without any installation or complex setup. Just remember to implement security best practices to mitigate potential risks associated with exposing internal services to the public internet.