On 07/05/2012 07:16 AM, Bill Shirley wrote:> I''m writing an action extension. I have in /etc/shorewall/rules:
> TempBan(Ban1Day):info inet fw tcp 3389
>
> I can access the parameters within the parentheses like this:
>
> use Shorewall::Chains;
>
> my $list_name = $params[0];
> $list_name = ''TempBan'' unless defined $list_name;
> my $seconds = $params[1];
> $seconds = 86400 unless defined $seconds;
The preferred way is
my ($list_name, $seconds) = get_action_params(2);>
> Is there anyway to access the source, destination, proto, and port?
No. The same action can be invoked from many rules, each with different
source, dest, etc. Connections matching those specifications are then
passed to the action''s chain.
-Tom
--
Tom Eastep \ When I die, I want to go like my Grandfather who
Shoreline, \ died peacefully in his sleep. Not screaming like
Washington, USA \ all of the passengers in his car
http://shorewall.net \________________________________________________
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today''s security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/