Awesome Open Source
Awesome Open Source

Table of Contents

fwd - The little forwarder that could



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 |         |   |         |
Internet +------------------> |   fwd   | +------------------------> |   ssh   |             |         |               |         |
                              +---------+                            +---------+
# get a public endpoint, ex:
ngrok tcp 9000

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

# get a shell on via a public endpoint
ssh -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
go install


usage: fwd [<flags>]


  fwd - 🚂 The little forwarder that could


  Joel Bastos @kintoandar


  fwd --from localhost:8000 --to

  -h, --help                   Show context-sensitive help (also try --help-long and --help-man).
  -f, --from=""  Local address to bind port (host:port)
  -t, --to=""    Remote address to forward traffic (host:port)
  -v, --version                Version details
  -l, --list                   List local network addresses available
      --log.level=info         Logging level (error, warn, info, debug)
      --log.format=logfmt      Logging format (logfmt, json)
      --config=CONFIG          Configuration file path (overrides all flags)

Configuration file

For multiport forwarding support, please check the example configuration file.


Made with ♥️ by kintoandar

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
go (14,435
golang (3,676
security (1,801
cli (1,689
network (451
utility (205
ngrok (30

Find Open Source By Browsing 7,000 Topics Across 59 Categories