Giter VIP home page Giter VIP logo

fwd's Introduction

Table of Contents

fwd - The little forwarder that could

Travis

About

fwd is a network port forwarder written in golang.

It's cross platform, supports multiple architectures and it's dead simple to use.

Read all about it in this article.

Use Cases

fwd โ™ฅ๏ธ ngrok

I must admit ngrok was an huge inspiration for fwd. If you don't know the tool you should definitely check out this talk from @inconshreveable.

This tool combo (fwd + ngrok) allows some wicked mischief, like taking firewall hole punching to another level! And the setup is trivial.

ngrok allows to expose a local port on a public endpoint and fwd allows to connect a local port to a remote endpoint. You see where I'm heading with this... With both tools you can connect a public endpoint to a remote port as long as you have access to it.

Here's how it works:

                              +---------+                            +---------+
                        :9000 |         |            172.28.128.3:22 |         |
Internet +------------------> |   fwd   | +------------------------> |   ssh   |
tcp.ngrok.io:1234             |         | 172.28.128.1               |         |
                              +---------+                            +---------+
# get a public endpoint, ex: tcp.ngrok.io:1234
ngrok tcp 9000

# forward connections on :9000 to 172.28.128.3:22
fwd --from :9000 --to 172.28.128.3:22

# get a shell on 172.28.128.3 via a public endpoint
ssh tcp.ngrok.io -p 1234

With great power comes great responsibility. - Ben Parker

Simple Use Case

Forwarding a local port to a remote port on a different network:

                             +---------+                             +---------+
           192.168.1.99:8000 |         |             172.28.128.3:80 |         |
curl +---------------------> |   fwd   | +-------------------------> |   web   |
                             |         | 172.28.128.1                |         |
                             +---------+                             +---------+

demo

Install

Get the binaries or build it yourself.

Binary Releases

Download prebuilt binaries for several platforms and architectures:

bintray Bintray

Go Tool

go get github.com/kintoandar/fwd
go install github.com/kintoandar/fwd

Usage

NAME:
   fwd - The little forwarder that could

USAGE:
   fwd --from localhost:2222 --to 192.168.1.254:22

VERSION:
   0.1.0

AUTHOR(S):
   Joel Bastos <[email protected]>

COMMANDS:
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --from value, -f value  source HOST:PORT (default: "127.0.0.1:8000") [$FWD_FROM]
   --to value, -t value    destination HOST:PORT [$FWD_TO]
   --list, -l              list local addresses
   --udp, -u               enable udp forwarding (tcp by default)
   --help, -h              show help
   --version, -v           print the version

COPYRIGHT:
   MIT License

Credits

Made with โ™ฅ๏ธ by kintoandar

fwd's People

Contributors

kintoandar avatar

Watchers

James Cloos avatar Barry R avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.