http://www.perlmonks.org?node_id=834349


in reply to Socket Traffic Cop

Assuming you're on linux, I'd recommend skipping perl and using iptables to take care of this.

iptables -A PREROUTING -i <interface> -s <sourceip> -p tcp -m tcp --dp +ort <port> -j REDIRECT --to-ports <newport>

There's also an option to specify a source network instead of a single IP.

Replies are listed 'Best First'.
Re^2: Socket Traffic Cop
by sans-clue (Beadle) on Apr 12, 2010 at 20:29 UTC
    Turns out to be solaris... they won't let me install POE. Could you give me any tips on how to install a localized (to my home dir) perl dist for solaris ? I see that many modules POE requires are not in the prod perl dist that I can't touch.
    I might be able to use a linux box to do this and route the solaris ports, thanks for the tip.

      Did you read the INSTALL file, and the platform specific readme file?

        YES. There is an update to IO that is required that I am not allowed to make. You can move on to other threads, click the hide tab on this one.