From: Alex O. <Ale...@ab...> - 2003-06-17 10:12:04
|
Hi, I'am using transforming our iptables FW script towards IPTables::IPv4. All went well until I tried to convert my DNAT rules. Below a small test file that fails. (I'am using IPTables::IPv4 CVS version dated 21 may 2003) -- #!/usr/bin/perl -w # I need the equivalent of # iptables -t nat -A PREROUTING -s 1.2.3.4 -j DNAT --to 5.6.7.8 # use strict; use IPTables::IPv4; my $nat = IPTables::IPv4::init('nat'); if (! $nat->append_entry('PREROUTING',{ 'source' => '1.2.3.4', 'jump' => 'DNAT', 'to-destination' => '5.6.7.8' } )) { die "Append error: $!\n"; } if (! $nat->commit() ) { die "Commit error: $!\n"; } and I get: # Commit error: Invalid argument # running iptables -t nat -A PREROUTING -s 1.2.3.4 -j DNAT --to 5.6.7.8 on the command line is OK. Any clue ? Thanks alex -- Security check on this e-mail has been done by aXs GUARD (http://www.axsguard.com) |