kpreisser / TcpTunnel

TcpTunnel allows to tunnel TCP connections through a server (gateway) to a remote machine.
MIT License
25 stars 1 forks source link
tcp tunnel tunneling

TcpTunnel

TcpTunnel is a program implemented in C# (.NET 8.0) that allows to tunnel TCP connections through a server (gateway) to a remote machine, for example to access services that are running behind a firewall or NAT (like a reverse-connect mechanism).

A working configuration consists of three instances:

For example, imagine you have some TCP services (like a VNC and a SSH server) running on a machine within a LAN that has internet access (maybe only through NAT so it's not possible to use port forwarding or a VPN), and you want to securely connect to this service from a machine on another network.
Additionally, you have a server (e.g. virtual private server, VPS) with a public domain and you have a SSL (TLS) certificate for it.

In this case, you could use the TcpTunnel with a configuration as shown in the following image:

That is:

Configuration

TcpTunnel is configured via an XML file with the name settings.xml in the application's directory. When building the application, sample setting files will get copied to the output directory which you can use as a template. You can also find them here for Gateway, Proxy-Server and Proxy-Client.

You can define multiple instances (e.g. a Gateway and a Proxy-Server instance) in the settings file, which will then be run by a single application process.

Features

Security Considerations

Building

Possible Development TODOs