Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

IPChains::PortFW
Perl module to manipulate portfw masquerading table.

IPChains::PortFW - Perl module to manipulate portfw masquerading table.



NAME

IPChains::PortFW - Perl module to manipulate portfw masquerading table.


SYNOPSIS


  my $masq = new IPChains::PortFW( option => value, ... );

  $masq->append();


DESCRIPTION

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().

ATTRIBUTES

Here are the attributes valids for IPChains::PortFW.

LocalAddr
This is the local address from which packets will be redirected.

LocalPort
This is the port from which packets will be redirected.

RemAddr
This is the address to which the packets will be forwarded to.

RemPort
This is the port to which the packets will be forwarded to.

Pref
This is a preferences value used for load balancing in the case when there are many possible remote destinations.

METHODS

new( [options], ... )
Create a new IPChains::PortFW object and sets its attributes.

attribute( attribute [, value] )
Get or sets an attribute. Use undef to delete a value.

clopts()
Unset all attributes.

append()
Append a rule to the port forwarding masquerade table as specified by the attributes of the current objects.

delete()
Deletes entries in the port forwarding masquerade table. The entries matching the attributes will be deleted.

flush()
Removes all entries from the port forwarding masquerade table.

list()
Returns an array of IPChains::PortFW objects. One for each entries in the port forwarding table.


EXAMPLE

Redirecting http protocol to internal web server.

my $portfw = new IPChains::PortFW( Proto => 'udp',
LocalAddr => '199.168.1.10',
LocalPort => 80,
RemAddr => '10.0.0.1',
RemPort => 80 );

$portfw->append;


AUTHOR

Francis J. Lacoste <francis.lacoste@insu.com>


COPYRIGHT

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.


SEE ALSO

IPChains(3)

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy