A network engineer is configuring a new Juniper device. They intend to apply a firewall filter to an interface to only allow SSH traffic from a specific management subnet. Which configuration approach best follows Juniper best practices?
Trap 1: Define the filter under 'firewall family inet' and apply it under…
This is correct because the filter is defined under the inet family, which corresponds to IPv4 traffic, and then applied to the input direction of the ge-0/0/0 interface's IPv4 protocol family. Junos requires that firewall filters be defined in a family-specific context, and applying it under the interface unit's family inet ensures it evaluates all IPv4 packets received on that interface. Specifying 'filter input' is the proper syntax to attach the filter, and it will be processed before any forwarding decisions are made.
Trap 2: Define the filter under 'firewall family inet' and apply it under…
This option fails because the Junos CLI syntax for attaching a firewall filter requires the keyword 'filter' after the family, as in 'family inet filter input filter-name'. The configuration 'family inet input' is missing that keyword, making it an invalid statement that Junos will reject during commit. Even if accepted, there is no 'input' stanza directly under family inet for this purpose; the only valid way to bind a filter is through the 'filter input' hierarchy.
Trap 3: Define the filter under 'firewall family any' and apply it under…
Using 'family any' is not supported for firewall filters in Junos; filter definitions must be tied to a specific protocol family like inet, inet6, or mpls. Applying a filter under 'family any' on the interface is also non-standard and would not correctly match IPv4 packets, because the filter is not associated with the IPv4 protocol layer. Junos expects the family to match the traffic type being filtered, so 'family inet' is the appropriate context for an IPv4 ACL.
- A
Define the filter under 'firewall family inet' and apply it under 'interfaces ge-0/0/0 unit 0 family inet filter input filter-name'
Why wrong: This is correct because the filter is defined under the inet family, which corresponds to IPv4 traffic, and then applied to the input direction of the ge-0/0/0 interface's IPv4 protocol family. Junos requires that firewall filters be defined in a family-specific context, and applying it under the interface unit's family inet ensures it evaluates all IPv4 packets received on that interface. Specifying 'filter input' is the proper syntax to attach the filter, and it will be processed before any forwarding decisions are made.
- B
Define the filter under 'firewall family inet' and apply it under 'interfaces lo0 unit 0 family inet filter input filter-name'
Although the filter is correctly defined, applying it to the loopback interface (lo0) means it only affects traffic destined to or sourced from the device itself, such as management or routing protocol packets. Traffic transiting through the physical interface ge-0/0/0 is completely bypassed by this filter, so the intended filtering of user data does not occur. To filter packets entering the network via that interface, the filter must be applied directly to ge-0/0/0's unit, not to lo0.
- C
Define the filter under 'firewall family inet' and apply it under 'interfaces ge-0/0/0 unit 0 family inet input'
Why wrong: This option fails because the Junos CLI syntax for attaching a firewall filter requires the keyword 'filter' after the family, as in 'family inet filter input filter-name'. The configuration 'family inet input' is missing that keyword, making it an invalid statement that Junos will reject during commit. Even if accepted, there is no 'input' stanza directly under family inet for this purpose; the only valid way to bind a filter is through the 'filter input' hierarchy.
- D
Define the filter under 'firewall family any' and apply it under 'interfaces ge-0/0/0 unit 0 family any filter input'
Why wrong: Using 'family any' is not supported for firewall filters in Junos; filter definitions must be tied to a specific protocol family like inet, inet6, or mpls. Applying a filter under 'family any' on the interface is also non-standard and would not correctly match IPv4 packets, because the filter is not associated with the IPv4 protocol layer. Junos expects the family to match the traffic type being filtered, so 'family inet' is the appropriate context for an IPv4 ACL.