Skip to Content
JUNOS High Availability
book

JUNOS High Availability

by James Sonderegger, Orin Blomberg, Kieran Milne, Senad Palislamovic
August 2009
Intermediate to advanced
690 pages
20h 14m
English
O'Reilly Media, Inc.
Content preview from JUNOS High Availability

Firewall Filters

A firewall is a fundamental component in securing any network. Devices running JUNOS Software can filter packets at line rate based on their contents, and perform an action on packets that match the filter.

Firewall Filter Syntax

JUNOS devices filter traffic based on straightforward if-then logic. That is, if an incoming packet matches a given filter parameter, then the device takes some action on that packet.

Here is a basic example of the syntax and structure of firewall filter configuration:

[edit]
lab@r1# show firewall
family inet {
    filter samplefilter {
        term A {
            from {
                source-address {
                    192.168.1.0/24;
                }
            }
            then accept;
        }
    }
}

Note

A firewall filter doesn’t actually filter traffic until it is applied to an interface. We cover this later in this chapter.

Firewall filters are defined at the firewall family hierarchy level. You can define filters for IPv4, IPv6, or Multiprotocol Label Switching (MPLS), or they can be protocol-independent. Each filter must have its own name, and each filter has one or more terms. A filter can also refer to another filter. In the previous example, a filter called samplefilter has one term, called A.

The following sections explain the remaining components of firewall filters.

Match conditions

The from statement in a firewall filter specifies the conditions the packet must match for the related action to be taken. Match conditions can include any combination of source and destination addresses, protocol numbers, and ports, as well as specific ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Juniper Networks® Field Guide and Reference

Juniper Networks® Field Guide and Reference

Aviva Garrett, Gary Drenan, Cris Morris, Juniper Networks®
Juniper QFX10000 Series

Juniper QFX10000 Series

Douglas Richard Hanks

Publisher Resources

ISBN: 9780596805449Errata Page