beppler / tcpfwd

Simple TCP port forwarder

Repository from Github https://github.combeppler/tcpfwdRepository from Github https://github.combeppler/tcpfwd

tcpfwd

Simple TCP port forwarder

build/install

To build just run go build on after clone the repository.

To install from GitHub run go install github.com/beppler/tcpfwd.

execute

To execute tcpfwd 2 arguments are required:

  • Local Address
    • It can be specified with the TCPFWD_LOCAL_ADDR environment variable or as the first argument to the program
    • It uses the default Go address format (ADDR:PORT), where ADDR is optional
  • Remote Address
    • It can be specified with the TCPFWD_REMOTE_ADDR environment variable or as the second argument to the program
    • It uses the default Go address format (ADDR:PORT)

For example to forward port 1234 on all local interfaces to port 3456 on example.org execute:

  • tcpfwd ":1234" "example.org:3456
  • or
  • TCPFWD_LOCAL_ADDR=:1234 TCPFWD_REMOTE_ADDR=example.org:3456 tcpfwd

About

Simple TCP port forwarder

License:MIT License


Languages

Language:Go 100.0%