p2p-port-forward

command module
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2017 License: MIT Imports: 7 Imported by: 0

README

p2p-port-forward

Build Status Go Report Card

Command line utility to forward ports between two hosts across different networks/subnets, in a peer-to-peer fashion using zerotier, without sudo privileges

Installation

On both the hosts.

  1. Homebrew

    brew install https://raw.githubusercontent.com/selvakn/homebrew-core/master/Formula/p2p-port-forward.rb

    Or

  2. Using go get

    go get https://github.com/selvakn/p2p-port-forward

    Or

  3. Single binaries

    • Download the single binary for your platform from releases
    • mv p2p-port-forward-<platform/arch> p2p-port-forward
    • chmod +x p2p-port-forward
Usage
usage: p2p-port-forward [<flags>]

Flags:
      --help                   Show context-sensitive help (also try --help-long and --help-man).
  -n, --network="8056c2e21c000001"
                               zerotier network id
  -f, --forward-port="22"      port to forward (in listen mode)
  -a, --accept-port="2222"     port to accept (in connect mode)
  -u, --use-udp                UDP instead of TCP (TCP default)
  -c, --connect-to=CONNECT-TO  server (zerotier) ip to connect
      --version                Show application version.

On host1 (where the service or any port should be exposed)

p2p-port-forward [-n 8056c2e21c000001] [-f 22]

On host2 (where we want to access the port)

p2p-port-forward -c <server-ip-from-output-of-server> [-a 2222]

Then connect to port 2222 on host2, to reach host1:22. Ex:

ssh -p 2222 user@localhost

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL