tgcd: extend the accessibility of TCP/IP based network services beyond firewalls
tgcd is a simple Unix network utility to extend the accessibility of TCP/IP based network services beyond firewalls. This can also be used by network analysts and security experts for penetration testing and analyze the security of their network. It has three different modes:
- ConnectConnect (or CC, specified by option -C)
- ListenListen (or LL, specified by option -L)
- Port Forwarder (or PF, specified by option -F)
The ConnectConnect and ListenListen instances of tgcd are used jointly together, while the Port Forwarder mode acts standalone. The ConnectConnect instance resides somewhere on the network (inside the LAN) where it can access the desired server, while the ListenListen will be where the external client can access it (outside the LAN). The ConnectConnect instance, when started, tries to establish a control connection to ListenListen instance (if failed it will retry every n seconds specified by -i ). The ListenListen instance upon receiving a connection from the client will send a request to ConnectConnect (over the already established control connection) to establish a connection to the server as well as another connection to ListenListen for data transferring. In the Port Forwarder mode, tgcd will pump data from one port to another providing a basic port forwarding functionality.
For all three modes, one can choose (using -m option) between two different ways of handling multiple connections. By choosing the Select method, the program will use less system memory in the expense of slower handling of multiple connections, and on the other side by choosing Fork method tgcd will handle the multiple connections faster in the expense of system memory.
tgcd links with libwrap (if available at build time) to provide a simple access control mechanism that’s provided by hosts_access(5).
Features
- command line interface
- compatible with most Unix family operating systems
- High performance
- low memory footprint
Usage
Let’s say you’d like to access a locally running WEB server on your work PC from home, this is how to do it:
To run tgcd in CC mode and provide access to the local WEB server :
tgcd -C -s localhost:80 -c my_home_computer:1234
To run tgcd in LL mode on my_home_computer host to provide access to the above service:
tgcd -L -p 8000 -q 1234
This will make the WEB server running on the work PC accessible on port 8000 of my_home_computer.
Copyright (C) 2016 Faraz.V (faraz@fzv.ca)