hi, i try to recreate my Knock action which was worked with the shell compiler for the perl compiler but it doesn''t seem to working. the generated firewall script always contains the $var instead of it''s value. what can be the problem? i try to use it in my rules file as: Knock:none:22,2000,60 net fw:$NET_IP tcp ssh,1999,2000,2001 and i attached the original and the new Knock actions too. thanks in advance. -- Levente "Si vis pacem para bellum!" ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
On Tue, Sep 04, 2007 at 10:20:54PM +0200, Farkas Levente wrote:> i try to recreate my Knock action which was worked with the shell > compiler for the perl compiler but it doesn''t seem to working. the > generated firewall script always contains the $var instead of it''s > value. what can be the problem?I''d say that the problem is you don''t know perl. You''re using single quotes. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
Andrew Suffield wrote:> On Tue, Sep 04, 2007 at 10:20:54PM +0200, Farkas Levente wrote: >> i try to recreate my Knock action which was worked with the shell >> compiler for the perl compiler but it doesn''t seem to working. the >> generated firewall script always contains the $var instead of it''s >> value. what can be the problem? > > I''d say that the problem is you don''t know perl. You''re using single quotes.Exactly. Farkas -- Perl''s treatment of variables in quoted strings is the same as the shell''s. If you want the variables expanded then you must use double quotes; otherwise, use single quotes. -Tom -- Tom Eastep \ Nothing is foolproof to a sufficiently talented fool Shoreline, \ http://shorewall.net Washington USA \ teastep@shorewall.net PGP Public Key \ https://lists.shorewall.net/teastep.pgp.key ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/