Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

github.com/sneakybeagle/quantum_tunnel

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/sneakybeagle/quantum_tunnel


Version published
Created
Source

Quantum Tunnel

A simple Go tool to create a reverse forward SSH tunnel (and teach me Go in the process). Allows users to get around firewall/NAT restrictions, by creating an outgoing connection, instead of an incoming one. Supports multiple connections.

  • Idea
  • Usage

Idea

The tunnel is very similar to the regular SSH reverse forward tunnel which can be created with the following command:

ssh -R 5555:localhost:22 root@example.com -p 22

The setup will consist of at least two machines, a server and a host in the target network. The servers ssh port should be reachable for the host in the target network and should accept the public key of that host. The host in the target network should be able to make an outgoing request to the server and should be able to perform TCP forwarding.

It is also possible to allow the host to act as a proxy and create a tunnel between the server and another machine that would otherwise not be reachable for the server.

Example:

The host will run Quantum Tunnel and forward its own port 22 (localhost:22) to the server, where the server will create an opening to the tunnel at port 5555 (localhost:5555). Logging into the server and connecting to localhost:5555 will forward the traffic to the host in the network.

Usage

You run these commands from the machine that is not reachable from outside the network, but has outgoing access.

  • Get a help message for the tunnel
./quantum_tunnel tunnel --help
  • Use the default settings:
./quantum_tunnel tunnel --server-ip example.com

The ssh equivalent of this is:

ssh -R 5555:localhost:22 root@example.com -p 22
  • Create a tunnel between example.com:443 to 192.168.100.100:80 using the local machine as the "proxy" (and using a different private key). This requires example.com to listen for ssh connections on port 443
./quantum_tunnel tunnel --server-ip example.com --server-port 443 --server-user admin --remote-ip 192.168.100.100 --remote-port 80 --identity-file ./id_rsa

Or the short version:

./quantum_tunnel tunnel -s example.com -p 443 -u admin -r 192.168.100.100 -a 80 -i ./id_rsa

The ssh equivalent of this is:

ssh -R 5555:192.168.100.100:80 admin@example.com -p 443

FAQs

Package last updated on 08 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc