Sadegh Ahmadzadegan(صادق احمدزادگان)

NAME

Net::Forward - Forwarding(Redirecting) TCP|UDP packets to another host:port

SYNOPSIS

  use Net::Forward;
  my $nf = new Net::Forward({'LocalHost'=>'127.0.0.1','LocalPort'=>'3000','RemoteHost'=>'www.cpan.org','RemotePort'=>'80','Proto' =>'tcp'});
  $nf->activate();      #blocking

DESCRIPTION

The module simulates IPTABLES packet forwarding ( iptables -t nat -A PREROUTING -s LocalPort -p Proto --dport LocalPort -j DNAT --to-destination RemoteHost:Remoteport) functionality without the need of root access (when localport is greater than 1000) .

EXPORT

None by default.

SEE ALSO

http://en.wikipedia.org/wiki/IP_forwarding,http://www.debuntu.org/how-to-redirecting-network-traffic-to-a-new-ip-using-iptables/

AUTHOR

Sadegh Ahmadzadegan (sadegh <at> cpan.org)

COPYRIGHT AND LICENSE

Copyright (C) 2014 by Sadegh Ahmadzadegan

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.