IPChains::PortFW - Perl module to manipulate portfw masquerading table.
my $masq = new IPChains::PortFW( option => value, ... ); $masq->append();
IPChains::PortFW is an perl interface to the linux kernel port forwarding facility. You must have ipmasqadm and the portfw module installed for this module to work. A kernel compiled with CONFIG_IP_MASQUERADE_IPPORTFW would also helps.
It has a similar interface than the IPChains(3) module. You create an IPChains::PortFW object with new(), you can query or set attributes with the attribute() method and you add or deletes the port forwarding rules using append() or delete().
Here are the attributes valids for IPChains::PortFW.
This is the local address from which packets will be redirected.
This is the port from which packets will be redirected.
This is the address to which the packets will be forwarded to.
This is the port to which the packets will be forwarded to.
This is a preferences value used for load balancing in the case when there are many possible remote destinations.
Create a new IPChains::PortFW object and sets its attributes.
Get or sets an attribute. Use undef to delete a value.
Unset all attributes.
Append a rule to the port forwarding masquerade table as specified by the attributes of the current objects.
Deletes entries in the port forwarding masquerade table. The entries matching the attributes will be deleted.
Removes all entries from the port forwarding masquerade table.
Returns an array of IPChains::PortFW objects. One for each entries in the port forwarding table.
Redirecting http protocol to internal web server.
my $portfw = new IPChains::PortFW( Proto => 'udp', LocalAddr => '220.127.116.11', LocalPort => 80, RemAddr => '10.0.0.1', RemPort => 80 );
Francis J. Lacoste <email@example.com>
Copyright (C) iNsu Innovations Inc. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.