package jservices-sfw
at the [edit chassis fpc slot-number pic slot-number adaptive-services service-package extension-provider]
hierarchy level. Here is an example:
[edit] user@host# show chassis fpc 0 { pic 0 { adaptive-services { service-package { extension-provider { control-cores 1; data-cores 4; object-cache-size 128; package jservices-sfw; # Loads stateful firewall plugin. policy-db-size 64; } } } } }
You cannot load both a native JUNOS service package and a JUNOS SDK application package on the same PIC. However, you can load both the jservices-sfw package and a JUNOS SDK application package on the same PIC.
The following example demonstrates the stateful firewall plugin coexisting with a provider's plugin.
[edit services] service-set sset { interface-service { service-interface ms-0/0/0.0; } stateful-firewall-rules rule1; extension-service customer-plugin; service-order [stateful-firewall customer-plugin]; } stateful-firewall { rule rule1 { match-direction input-output; term term1 { from { applications junos-ftp; } then { accept; } } } rule rule2 { match-direction input; term term1 { from { source-address { 192.1.1.2/32; } then { reject; syslog; } } } } }
policy-db-size
, object-cache-size
, and forwarding-db-size
statements when the application will use a large number of rules, causing the total memory required to approach the size of the object cache configured. The following limits, which are specific to the stateful firewall configuration, await additional review:
apllications junos-ident
statement at the [edit services stateful-firewall rule rule-name term term-name from]
hierarchy level.
[edit] services { stateful-firewall { rule rule1 { term term1 { from { (source-address | destination-address); applications junos-ident; } then { accept; } } } } }
To allow Kerberos-enabled rsh, rlogin, rexec through the stateful firewall, configure the following additional applications and include them in the stateful firewall terms:
[edit] applications { application test-kerberos-kshell { Protocol tcp; destination-port kshell; } application test kerberos-klogin { protocol tcp; destination-port klongin; } } services { stateful-firewall { rule rule1 { term term1 { from { applications [kerberos-klogin kerberos-kshell]; } then { accept; } } } } }
ms-
interface:
show services stateful-firewall flows
—Display stateful firewall flow table entries.show services stateful-firewall statistics
—Display stateful firewall statistics. For this command, only rule and ALG statistics are given. In the extensive
option, other statistics appear but do not populate correctly—those values are all zeroes.clear services stateful-firewall flows
—Remove established flows from flow table.