by kintoandar

kintoandar / fwd

🚂 The little forwarder that could

200 Stars 17 Forks Last release: Not found MIT License 23 Commits 5 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Table of Contents

fwd - The little forwarder that could



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

was an huge inspiration for
. 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.

allows to expose a local port on a public endpoint and
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 |         |   |         |
Internet +------------------> |   fwd   | +------------------------> |   ssh   |
tcp.ngrok.io:1234             |         |               |         |
                              +---------+                            +---------+
# get a public endpoint, ex: tcp.ngrok.io:1234
ngrok tcp 9000

forward connections on :9000 to

fwd --from :9000 --to

get a shell on 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:

                             +---------+                             +---------+
  |         |    |         |
curl +---------------------> |   fwd   | +-------------------------> |   web   |
                             |         |                |         |
                             +---------+                             +---------+



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


   fwd - The little forwarder that could

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

VERSION: 0.1.0

AUTHOR(S): Joel Bastos

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

GLOBAL OPTIONS: --from value, -f value source HOST:PORT (default: "") [$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



Made with ♥️ by kintoandar

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.