in reply to IPTables::IPv4 and parameters from CGI.pm

I can't see anything obviously wrong with your code, but one suggestion I would make is to grab a hold of Data::Dumper::Simple and add
print Dumper(%addrule_nat);

..just before you call the append_entry() method. This should help to confirm whether or not all values are present in the hash.

One other comment - you must really trust your users if you're allowing them to modify the firewall via a web-interface ;)

Cheers,
Darren :)

Replies are listed 'Best First'.
Re^2: IPTables::IPv4 and parameters from CGI.pm
by nermd (Initiate) on Jun 14, 2006 at 20:53 UTC
    Thanks for the tipp, i tried it and hell ... just as i assumed ... everything looks perfect.
    So, here is the output of Dumper(%addrule_nat);
    %addrule_nat = ( 'protocol' => 'tcp', 'to-destination' => '10.0.1.2', 'destination-port' => '6990', 'jump' => 'DNAT' );
    But still, IPTables::IPv4 reports the error msg:

    "protocol: Must be passed as integer or string at..."

    Hmm maby i will drop the Author of IPTables::IPv4 a mail.
    But still, every tipp is welcome :)!

    And by the way, of course i trust my best friends.

    nermd