Aug 14, 2012

Port Forwarding - perl script

Came across this interesting perl script for port forwarding.

Usage:

  1. Download the tar.gz file here.
  2. The above tar.gz file contains the following 3 files
port-proxy.pl - the actual perl script
port-proxy.conf - configuration file
index.html - documentation
  3. Edit port-proxy.conf.
      Eg: to setup a proxy to forward local port 1110 to port 1110 on 192.168.0.1 add the following line.

forward=1110,192.168.0.1:1110

  4. Run the perl script

$perl port-proxy.pl -d -c port-proxy.conf 
Accordata GmbH - Port-Proxy V 0.95
----------------------------------
Conf>
Conf>
Conf>
Conf>forward=1110,192.168.0.0.1:1110  
Listen on 1110; forward to 192.168.0.0.1:1110


Options:
-d enables debug output
-c specifies the config file