Juniper Command Line Guide PDF
Juniper Command Line Guide PDF
Volume 1:
Overview
Juniper Networks, the Juniper Networks logo, JUNOS, NetScreen, ScreenOS, and Steel-Belted Radius are registered trademarks of Juniper Networks, Inc.
in the United States and other countries. JUNOSe is a trademark of Juniper Networks, Inc. All other trademarks, service marks, registered trademarks, or
registered service marks are the property of their respective owners.
All specifications are subject to change without notice. Juniper Networks assumes no responsibility for any inaccuracies in this document or for any
obligation to update information in this document. Juniper Networks reserves the right to change, modify, transfer, or otherwise revise this publication
without notice.
FCC Statement
The following information is for FCC compliance of Class A devices: This equipment has been tested and found to comply with the limits for a Class A
digital device, pursuant to part 15 of the FCC rules. These limits are designed to provide reasonable protection against harmful interference when the
equipment is operated in a commercial environment. The equipment generates, uses, and can radiate radio-frequency energy and, if not installed and
used in accordance with the instruction manual, may cause harmful interference to radio communications. Operation of this equipment in a residential
area is likely to cause harmful interference, in which case users will be required to correct the interference at their own expense.
The following information is for FCC compliance of Class B devices: The equipment described in this manual generates and may radiate radio-frequency
energy. If it is not installed in accordance with Juniper Networks’ installation instructions, it may cause interference with radio and television reception.
This equipment has been tested and found to comply with the limits for a Class B digital device in accordance with the specifications in part 15 of the FCC
rules. These specifications are designed to provide reasonable protection against such interference in a residential installation. However, there is no
guarantee that interference will not occur in a particular installation.
If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user
is encouraged to try to correct the interference by one or more of the following measures:
Connect the equipment to an outlet on a circuit different from that to which the receiver is connected.
Caution: Changes or modifications to this product could void the user's warranty and authority to operate this device.
Disclaimer
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED
WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED
WARRANTY, CONTACT YOUR JUNIPER NETWORKS REPRESENTATIVE FOR A COPY.
ii
Table of Contents
Volume 1:
Overview
About the Concepts & Examples ScreenOS Reference Guide xlvii
Volume Organization ................................................................................... xlix
Document Conventions................................................................................... lv
Web User Interface Conventions ............................................................. lv
Command Line Interface Conventions .................................................... lvi
Naming Conventions and Character Types ............................................. lvi
Illustration Conventions ......................................................................... lvii
Requesting Technical Support ...................................................................... lviii
Self-Help Online Tools and Resources.................................................... lviii
Opening a Case with JTAC ....................................................................... lix
Document Feedback ...................................................................................... lix
Master Index...........................................................................................................IX-I
Volume 2:
Fundamentals
About This Volume ix
Document Conventions.................................................................................... x
Web User Interface Conventions .............................................................. x
Command Line Interface Conventions ...................................................... x
Naming Conventions and Character Types .............................................. xi
Illustration Conventions .......................................................................... xii
Requesting Technical Support ........................................................................ xii
Self-Help Online Tools and Resources..................................................... xiii
Opening a Case with JTAC ...................................................................... xiii
Document Feedback ..................................................................................... xiii
Chapter 2 Zones 25
Viewing Preconfigured Zones......................................................................... 26
Security Zones ............................................................................................... 28
Global Zone ............................................................................................. 28
SCREEN Options...................................................................................... 28
Binding a Tunnel Interface to a Tunnel Zone.................................................. 29
Configuring Security Zones and Tunnel Zones ............................................... 30
Creating a Zone ....................................................................................... 30
Modifying a Zone..................................................................................... 31
Deleting a Zone ....................................................................................... 32
Function Zones ..............................................................................................33
Chapter 3 Interfaces 35
Interface Types ..............................................................................................36
Logical Interfaces..................................................................................... 36
Physical Interfaces ............................................................................ 36
Wireless Interfaces............................................................................ 36
Bridge Group Interfaces..................................................................... 37
Subinterfaces .................................................................................... 37
Aggregate Interfaces ......................................................................... 37
Redundant Interfaces ........................................................................ 37
Virtual Security Interfaces .................................................................38
Function Zone Interfaces ......................................................................... 38
Management Interfaces..................................................................... 38
High Availability Interfaces................................................................ 38
Tunnel Interfaces..................................................................................... 39
Deleting Tunnel Interfaces ................................................................ 42
Viewing Interfaces ......................................................................................... 43
Configuring Security Zone Interfaces ............................................................. 44
Binding an Interface to a Security Zone ................................................... 44
Unbinding an Interface from a Security Zone .......................................... 46
Addressing an L3 Security Zone Interface................................................ 47
Public IP Addresses ........................................................................... 47
Private IP Addresses.......................................................................... 48
Addressing an Interface .................................................................... 48
Modifying Interface Settings .................................................................... 49
Creating a Subinterface in the Root System ............................................. 50
Deleting a Subinterface............................................................................ 50
Creating a Secondary IP Address ................................................................... 51
Backup System Interfaces .............................................................................. 52
Configuring a Backup Interface................................................................ 52
Configuring an IP Tracking Backup Interface..................................... 52
Configuring a Tunnel-if Backup Interface .......................................... 53
Configuring a Route Monitoring Backup Interface ............................. 57
Loopback Interfaces ....................................................................................... 58
Creating a Loopback Interface .................................................................59
Setting the Loopback Interface for Management...................................... 59
iv Table of Contents
Table of Contents
Table of Contents v
Concepts & Examples ScreenOS Reference Guide
IP-Related Services..........................................................................118
Instant Messaging Services..............................................................118
Management Services .....................................................................118
Mail Services ...................................................................................119
UNIX Services .................................................................................119
Miscellaneous Services ....................................................................120
Custom Services ....................................................................................120
Adding a Custom Service ................................................................121
Modifying a Custom Service............................................................122
Removing a Custom Service............................................................122
Setting a Service Timeout ......................................................................122
Service Timeout Configuration and Lookup.....................................122
Contingencies .................................................................................123
Example..........................................................................................124
Defining a Custom Internet Control Message Protocol Service...............125
Remote Shell Application Layer Gateway...............................................126
Sun Remote Procedure Call Application Layer Gateway.........................126
Typical RPC Call Scenario................................................................126
Customizing Sun RPC Services ........................................................127
Customizing Microsoft Remote Procedure Call Application Layer Gateway..
127
Real-Time Streaming Protocol Application Layer Gateway.....................129
Dual-Stack Environment .................................................................130
RTSP Request Methods ...................................................................130
RTSP Status Codes ..........................................................................132
Configuring a Media Server in a Private Domain .............................133
Configuring a Media Server in a Public Domain ..............................135
Stream Control Transmission Protocol Application Layer Gateway ........137
Point-to-Point Tunneling Protocol Application Layer Gateway ...............137
Configuring the PPTP ALG...............................................................139
Service Groups.......................................................................................139
Modifying a Service Group ..............................................................140
Removing a Service Group ..............................................................141
Dynamic IP Pools.........................................................................................141
Port Address Translation .......................................................................142
Creating a DIP Pool with PAT ................................................................143
Modifying a DIP Pool .............................................................................144
Sticky DIP Addresses .............................................................................144
Using DIP in a Different Subnet .............................................................145
Using a DIP on a Loopback Interface .....................................................150
Creating a DIP Group.............................................................................154
Setting a Recurring Schedule........................................................................157
vi Table of Contents
Table of Contents
Zones ..............................................................................................166
Addresses .......................................................................................166
Wildcard Addresses.........................................................................166
Services...........................................................................................167
Action .............................................................................................167
Application......................................................................................168
Name ..............................................................................................168
VPN Tunneling ................................................................................168
L2TP Tunneling ...............................................................................169
Deep Inspection ..............................................................................169
Placement at the Top of the Policy List ...........................................169
Session Limiting..............................................................................169
Source Address Translation.............................................................170
Destination Address Translation......................................................170
No Hardware Session ......................................................................170
User Authentication ........................................................................170
HA Session Backup .........................................................................172
Web Filtering ..................................................................................172
Logging ...........................................................................................172
Counting .........................................................................................173
Traffic Alarm Threshold ..................................................................173
Schedules........................................................................................173
Antivirus Scanning ..........................................................................173
Traffic Shaping................................................................................173
Policies Applied............................................................................................175
Viewing Policies.....................................................................................175
Creating Policies ....................................................................................175
Creating Interzone Policies Mail Service ..........................................175
Creating an Interzone Policy Set .....................................................179
Creating Intrazone Policies..............................................................183
Creating a Global Policy ..................................................................185
Entering a Policy Context ......................................................................186
Multiple Items per Policy Component....................................................186
Setting Address Negation.......................................................................187
Modifying and Disabling Policies ...........................................................190
Policy Verification..................................................................................190
Reordering Policies................................................................................191
Removing a Policy .................................................................................192
Index..........................................................................................................................IX-I
Volume 3:
Administration
About This Volume vii
Document Conventions.................................................................................. vii
Web User Interface Conventions ............................................................ vii
Command Line Interface Conventions ................................................... viii
Naming Conventions and Character Types ............................................ viii
Illustration Conventions ............................................................................ x
Requesting Technical Support .......................................................................... x
Self-Help Online Tools and Resources....................................................... xi
Opening a Case with JTAC ........................................................................ xi
Document Feedback ....................................................................................... xi
Chapter 1 Administration 1
Management via the Web User Interface ......................................................... 2
WebUI Help ............................................................................................... 2
Copying the Help Files to a Local Drive ............................................... 3
Pointing the WebUI to the New Help Location .................................... 3
HyperText Transfer Protocol...................................................................... 4
Session ID.................................................................................................. 4
Secure Sockets Layer ................................................................................. 5
SSL Configuration................................................................................ 7
Redirecting HTTP to SSL ..................................................................... 8
Management via the Command Line Interface................................................. 9
Telnet ........................................................................................................ 9
Securing Telnet Connections ................................................................... 10
Secure Shell ............................................................................................. 11
Client Requirements.......................................................................... 12
Basic SSH Configuration on the Device ............................................. 13
Authentication .................................................................................. 14
SSH and Vsys .................................................................................... 16
Host Key ........................................................................................... 16
Example: SSHv1 with PKA for Automated Logins ............................. 17
Secure Copy ............................................................................................ 18
Serial Console.......................................................................................... 19
Remote Console ...................................................................................... 20
Remote Console Using V.92 Modem Port.......................................... 20
Remote Console Using an AUX Port.................................................. 21
Modem Port ............................................................................................ 22
Management via NetScreen-Security Manager ............................................... 22
Initiating Connectivity Between NSM Agent and the MGT System ........... 23
Enabling, Disabling, and Unsetting NSM Agent........................................ 24
Setting the Primary Server IP Address of the Management System ......... 25
Setting Alarm and Statistics Reporting..................................................... 25
Configuration Synchronization ................................................................ 26
Example: Viewing the Configuration State ........................................ 27
Example: Retrieving the Configuration Hash..................................... 27
Retrieving the Configuration Timestamp ................................................. 27
Controlling Administrative Traffic .................................................................. 28
MGT and VLAN1 Interfaces...................................................................... 29
Table of Contents ix
Concepts & Examples ScreenOS Reference Guide
x Table of Contents
Table of Contents
Index..........................................................................................................................IX-I
Volume 4:
Attack Detection and Defense Mechanisms
About This Volume ix
Document Conventions.................................................................................... x
Web User Interface Conventions .............................................................. x
Command Line Interface Conventions ...................................................... x
Naming Conventions and Character Types .............................................. xi
Illustration Conventions .......................................................................... xii
Requesting Technical Support ........................................................................ xii
Self-Help Online Tools and Resources..................................................... xiii
Opening a Case with JTAC ...................................................................... xiii
Document Feedback ..................................................................................... xiii
Table of Contents xi
Concepts & Examples ScreenOS Reference Guide
Protocol Anomalies................................................................................135
Attack Object Groups.............................................................................136
Changing Severity Levels.................................................................136
Example: Deep Inspection for P2P..................................................137
Disabling Attack Objects........................................................................139
Attack Actions..............................................................................................140
Example: Attack Actions—Close Server, Close, Close Client ............141
Brute Force Attack Actions ....................................................................148
Brute Force Attack Objects..............................................................149
Brute Force Attack Target................................................................149
Brute Force Attack Timeout.............................................................149
Example 1.......................................................................................150
Example 2.......................................................................................150
Example 3.......................................................................................151
Attack Logging .............................................................................................151
Example: Disabling Logging per Attack Group.................................151
Mapping Custom Services to Applications ....................................................153
Example: Mapping an Application to a Custom Service...................154
Example: Application-to-Service Mapping for HTTP Attacks ............156
Customized Attack Objects and Groups........................................................157
User-Defined Stateful Signature Attack Objects......................................157
Regular Expressions........................................................................158
Example: User-Defined Stateful Signature Attack Objects ...............159
TCP Stream Signature Attack Objects ....................................................161
Example: User-Defined Stream Signature Attack Object..................162
Configurable Protocol Anomaly Parameters ..........................................163
Example: Modifying Parameters .....................................................163
Negation ......................................................................................................164
Example: Attack Object Negation....................................................164
Granular Blocking of HTTP Components ......................................................168
ActiveX Controls....................................................................................169
Java Applets...........................................................................................169
EXE Files ...............................................................................................169
ZIP Files.................................................................................................169
Example: Blocking Java Applets and .exe Files................................170
Table of Contents xv
Concepts & Examples ScreenOS Reference Guide
Index..........................................................................................................................IX-I
Volume 5:
Virtual Private Networks
About This Volume vii
Document Conventions................................................................................. viii
Web User Interface Conventions ........................................................... viii
Command Line Interface Conventions ................................................... viii
Naming Conventions and Character Types .............................................. ix
Illustration Conventions ............................................................................ x
Requesting Technical Support .......................................................................... x
Self-Help Online Tools and Resources....................................................... xi
Opening a Case with JTAC ........................................................................ xi
Document Feedback ....................................................................................... xi
Index..........................................................................................................................IX-I
Volume 6:
Voice-over-Internet Protocol
About This Volume vii
Document Conventions................................................................................. viii
Web User Interface Conventions ........................................................... viii
Command Line Interface Conventions ................................................... viii
Naming Conventions and Character Types .............................................. ix
Illustration Conventions ............................................................................ x
Requesting Technical Support .......................................................................... x
Self-Help Online Tools and Resources....................................................... xi
Opening a Case with JTAC ........................................................................ xi
Document Feedback ....................................................................................... xi
xx Table of Contents
Table of Contents
SCCP Transactions................................................................................... 84
Client Initialization ............................................................................ 84
Client Registration............................................................................. 84
Call Setup.......................................................................................... 85
Media Setup ...................................................................................... 85
SCCP Control Messages and RTP Flow..................................................... 86
SCCP Messages........................................................................................ 87
Examples ....................................................................................................... 87
Example: Call Manager/TFTP Server in the Trust Zone...................... 88
Example: Call Manager/TFTP Server in the Untrust Zone .................. 90
Example: Three-Zone, Call Manager/TFTP Server in the DMZ ........... 92
Example: Intrazone, Call Manager/TFTP Server in Trust Zone ........... 95
Example: Intrazone, Call Manager/TFTP Server in Untrust Zone ....... 99
Example: Full-Mesh VPN for SCCP ..................................................101
Index..........................................................................................................................IX-I
Volume 7:
Routing
About This Volume ix
Document Conventions.................................................................................... x
Web User Interface Conventions .............................................................. x
Command Line Interface Conventions ...................................................... x
Naming Conventions and Character Types .............................................. xi
Illustration Conventions .......................................................................... xii
Requesting Technical Support ........................................................................ xii
Self-Help Online Tools and Resources..................................................... xiii
Opening a Case with JTAC ...................................................................... xiii
Document Feedback ..................................................................................... xiii
Chapter 2 Routing 13
Overview ....................................................................................................... 14
Virtual Router Routing Tables......................................................................... 15
Destination-Based Routing Table ............................................................. 16
Source-Based Routing Table .................................................................... 17
Source Interface-Based Routing Table...................................................... 19
Creating and Modifying Virtual Routers.......................................................... 21
Modifying Virtual Routers ........................................................................ 21
Assigning a Virtual Router ID ................................................................... 22
Forwarding Traffic Between Virtual Routers ............................................ 23
Configuring Two Virtual Routers .............................................................. 23
Creating and Deleting Virtual Routers...................................................... 25
Creating a Custom Virtual Router ...................................................... 26
Deleting a Custom Virtual Router ...................................................... 26
Virtual Routers and Virtual Systems......................................................... 26
Creating a Virtual Router in a Vsys ....................................................27
Sharing Routes Between Virtual Routers ........................................... 28
Limiting the Number of Routing Table Entries ......................................... 29
Routing Features and Examples ..................................................................... 30
Route Selection........................................................................................ 30
Setting a Route Preference ................................................................ 30
Route Metrics .................................................................................... 31
Changing the Default Route Lookup Sequence .................................. 32
Route Lookup in Multiple Virtual Routers .......................................... 34
Configuring Equal Cost Multipath Routing ............................................... 35
Route Redistribution................................................................................ 37
Configuring a Route Map................................................................... 38
Route Filtering .................................................................................. 39
Configuring an Access List ................................................................ 40
Redistributing Routes into OSPF ....................................................... 40
Exporting and Importing Routes Between Virtual Routers .......................42
Configuring an Export Rule ............................................................... 42
Configuring Automatic Export........................................................... 43
Extended Access-Lists............................................................................128
Match Groups ........................................................................................128
Action Groups........................................................................................129
Route Lookup with PBR ...............................................................................130
Configuring PBR...........................................................................................130
Configuring an Extended Access List .....................................................131
Configuring a Match Group ....................................................................132
Configuring an Action Group .................................................................133
Configuring a PBR Policy .......................................................................134
Binding a PBR Policy .............................................................................134
Binding a PBR Policy to an Interface ...............................................134
Binding a PBR Policy to a Zone .......................................................134
Binding a PBR Policy to a Virtual Router .........................................135
Viewing PBR Output.....................................................................................135
Viewing an Extended Access List...........................................................135
Viewing a Match Group..........................................................................136
Viewing an Action Group .......................................................................136
Viewing a PBR Policy Configuration.......................................................137
Viewing a Complete PBR Configuration .................................................137
Advanced PBR Example...............................................................................138
Routing..................................................................................................139
PBR Elements........................................................................................140
Extended Access Lists .....................................................................140
Match Groups..................................................................................141
Action Group...................................................................................141
PBR Policies ....................................................................................142
Interface Binding ...................................................................................142
Advanced PBR with High Availability and Scalability....................................142
Resilient PBR Solution ...........................................................................142
Scalable PBR Solution ............................................................................143
Index..........................................................................................................................IX-I
Volume 8:
Address Translation
About This Volume v
Document Conventions................................................................................... vi
Web User Interface Conventions ............................................................. vi
Command Line Interface Conventions ..................................................... vi
Naming Conventions and Character Types ............................................. vii
Illustration Conventions ......................................................................... viii
Requesting Technical Support ....................................................................... viii
Self-Help Online Tools and Resources....................................................... ix
Opening a Case with JTAC ........................................................................ ix
Document Feedback ....................................................................................... ix
Index..........................................................................................................................IX-I
Volume 9:
User Authentication
About This Volume vii
Document Conventions................................................................................. viii
Web User Interface Conventions ........................................................... viii
Command Line Interface Conventions ................................................... viii
Naming Conventions and Character Types .............................................. ix
Illustration Conventions ............................................................................ x
Requesting Technical Support .......................................................................... x
Chapter 1 Authentication 1
User Authentication Types ............................................................................... 1
Admin Users .................................................................................................... 2
Multiple-Type Users.......................................................................................... 4
Group Expressions ........................................................................................... 5
Example: Group Expressions (AND)........................................................... 6
Example: Group Expressions (OR) ............................................................. 8
Example: Group Expressions (NOT)........................................................... 9
Banner Customization.................................................................................... 10
Example: Customizing a WebAuth Banner .............................................. 10
Login Banner.................................................................................................. 10
Example: Creating a Login Banner........................................................... 11
Index..........................................................................................................................IX-I
Volume 10:
Virtual Systems
About This Volume v
Document Conventions................................................................................... vi
Web User Interface Conventions ............................................................. vi
Command Line Interface Conventions ..................................................... vi
Naming Conventions and Character Types ............................................. vii
Illustration Conventions ......................................................................... viii
Requesting Technical Support ....................................................................... viii
Self-Help Online Tools and Resources....................................................... ix
Opening a Case with JTAC ........................................................................ ix
Document Feedback ....................................................................................... ix
Index..........................................................................................................................IX-I
Volume 11:
High Availability
About This Volume v
Document Conventions................................................................................... vi
Web User Interface Conventions ............................................................. vi
Command Line Interface Conventions ..................................................... vi
Naming Conventions and Character Types ............................................. vii
Illustration Conventions ......................................................................... viii
Requesting Technical Support ....................................................................... viii
Self-Help Online Tools and Resources....................................................... ix
Opening a Case with JTAC ........................................................................ ix
Document Feedback ....................................................................................... ix
Index..........................................................................................................................IX-I
Volume 12:
WAN, DSL, Dial, and Wireless
About This Volume ix
Document Conventions.................................................................................... x
BRI Mode................................................................................................. 26
Leased-Line Mode ............................................................................. 26
Dialer Enable .................................................................................... 26
Dialer Options ......................................................................................... 27
Disabling a WAN Interface....................................................................... 28
WAN Interface Encapsulation......................................................................... 29
Point-to-Point Protocol............................................................................. 29
Frame Relay ............................................................................................ 29
Cisco-High-Level Data Link Control (Cisco-HDLC) .................................... 30
Basic Encapsulation Options.................................................................... 31
Unnumbered Interfaces .................................................................... 31
Protocol Maximum Transmission Unit Configuration ........................ 31
Static IP Address Configuration ......................................................... 32
Keepalives......................................................................................... 32
PPP Encapsulation Options...................................................................... 33
PPP Access Profile............................................................................. 33
PPP Authentication Method............................................................... 34
Password .......................................................................................... 35
Network Control Protocol.................................................................. 35
PPP Authentication Protocols .................................................................. 36
Challenge Handshake Authentication Protocol .................................. 36
Password Authentication Protocol..................................................... 36
Local Database User.......................................................................... 37
Frame Relay Encapsulation Options ........................................................ 37
Keepalive Messages .......................................................................... 37
Frame Relay LMI Type ...................................................................... 38
Creating and Configuring PVCs ......................................................... 39
Inverse Address Resolution Protocol ................................................. 40
Inverse Neighbor Discovery Protocol ................................................ 40
Multilink Encapsulation .................................................................................. 41
Overview ................................................................................................. 41
Basic Multilink Bundle Configuration ....................................................... 42
Bundle Identifier ............................................................................... 42
Drop Timeout.................................................................................... 42
Fragment Threshold.......................................................................... 43
Minimum Links ................................................................................. 44
Basic Configuration Steps.................................................................. 44
Maximum Received Reconstructed Unit............................................ 45
Sequence-Header Format.................................................................. 45
Multilink Frame Relay Configuration Options .......................................... 46
Basic Configuration Steps.................................................................. 46
Link Assignment for MLFR ................................................................ 47
Acknowledge Retries......................................................................... 47
Acknowledge Timer .......................................................................... 47
Hello Timer ....................................................................................... 48
WAN Interface Configuration Examples ......................................................... 48
Configuring a Serial Interface .................................................................. 48
Configuring a T1 Interface ....................................................................... 49
Configuring an E1 Interface ..................................................................... 50
Configuring a T3 Interface ....................................................................... 50
Configuring an E3 Interface ..................................................................... 51
Configuring a Device for ISDN Connectivity ............................................ 52
Step 1: Selecting the ISDN Switch Type ................................................... 52
Step 2: Configuring a PPP Profile............................................................. 52
Index..........................................................................................................................IX-I
Volume 13:
General Packet Radio Service
About This Volume v
Document Conventions................................................................................... vi
Web User Interface Conventions ............................................................. vi
Command Line Interface Conventions ..................................................... vi
Naming Conventions and Character Types ............................................. vii
Illustration Conventions ......................................................................... viii
Requesting Technical Support ....................................................................... viii
Self-Help Online Tools and Resources....................................................... ix
Opening a Case with JTAC ........................................................................ ix
Document Feedback ....................................................................................... ix
Chapter 1 GPRS 1
The Security Device as a GPRS Tunneling Protocol Firewall ............................. 2
Gp and Gn Interfaces ................................................................................. 2
Gi Interface................................................................................................3
Operational Modes .................................................................................... 3
Virtual System Support .............................................................................. 4
Policy-Based GPRS Tunneling Protocol............................................................. 4
Example: Configuring Policies to Enable GTP Inspection ........................... 5
GPRS Tunneling Protocol Inspection Object ..................................................... 6
Example: Creating a GTP Inspection Object............................................... 7
GTP Message Filtering ...................................................................................... 7
Packet Sanity Check .................................................................................. 7
Message-Length Filtering ........................................................................... 8
Example: Setting GTP Message Lengths .............................................. 8
Message-Type Filtering .............................................................................. 9
Example: Permitting and Denying Message Types .............................. 9
Supported Message Types ...................................................................9
Message-Rate Limiting............................................................................. 11
Example: Setting a Rate Limit ........................................................... 11
Sequence Number Validation .................................................................. 12
Example: Enabling Sequence Number Validation.............................. 12
IP Fragmentation..................................................................................... 13
GTP-in-GTP Packet Filtering ..................................................................... 13
Example: Enabling GTP-in-GTP Packet Filtering ................................ 13
Deep Inspection ...................................................................................... 13
Example: Enabling Deep Inspection on the TEID .............................. 13
xl Table of Contents
Table of Contents
Index..........................................................................................................................IX-I
Volume 14:
Dual-Stack Architecture with IPv6
About This Volume vii
Document Audience...................................................................................... viii
Document Conventions................................................................................. viii
Web User Interface Conventions ........................................................... viii
Command Line Interface Conventions ................................................... viii
Naming Conventions and Character Types .............................................. ix
Illustration Conventions ............................................................................ x
Requesting Technical Support .......................................................................... x
Index..........................................................................................................................IX-I
Juniper Networks security devices integrate the following firewall, virtual private
network (VPN), and traffic-shaping features to provide flexible protection for
security zones when connecting to the Internet:
Firewall: A firewall screens traffic crossing the boundary between a private LAN
and the public network, such as the Internet.
Content Security: Protects users from malicious URLs and provides embedded
antivirus scanning and Web filtering. In addition, works with third-party
products to provide external antivirus scanning, anti-spam, and Web filtering.
xlvii
Concepts & Examples ScreenOS Reference Guide
Untrust Zone
LAN LAN
Internet
Backup Device
Firewall: Screening traffic
between the protected LAN and
the Internet
The ScreenOS system provides all the features needed to set up and manage any
security appliance or system. This document is a reference guide for configuring
and managing a Juniper Networks security device through ScreenOS.
xlviii
About the Concepts & Examples ScreenOS Reference Guide
Volume Organization
The Concepts & Examples ScreenOS Reference Guide is a multi-volume manual. The
following information outlines and summarizes the material in each volume:
Volume 1: Overview
“Table of Contents” contains a master table of contents for all volumes in the
manual.
Volume 2: Fundamentals
Chapter 2, “Zones,” explains security zones, tunnel zones, and function zones.
Chapter 5, “Building Blocks for Policies,” discusses the elements used for
creating policies and virtual private networks (VPNs): addresses (including VIP
addresses), services, and DIP pools. It also presents several example
configurations that support the H.323 protocol.
Chapter 7, “Traffic Shaping,” explains how you can prioritize services and
manage bandwidth at the interface and policy levels.
Volume 3: Administration
l Volume Organization
About the Concepts & Examples ScreenOS Reference Guide
Volume Organization li
Concepts & Examples ScreenOS Reference Guide
Volume 7: Routing
Chapter 1, “Static Routing,” describes the ScreenOS routing table, the basic
routing process on the security device, and how to configure static routes on
security devices.
Chapter 3, “Open Shortest Path First,” describes how to configure the OSPF
dynamic routing protocol on security devices.
the packet flow when doing NAT-src, routing considerations, and address
shifting.
Chapter 5, “IKE, XAuth, and L2TP Users,” explains how to define IKE, XAuth,
and L2TP users. Although the XAuth section focuses primarily on using the
security device as an XAuth server, it also includes a subsection on configuring
select security devices to act as an XAuth client.
Chapter 3, “ISP Failover and Dial Recovery,” describes how to set priority and
define conditions for ISP failover and how to configure a dialup recovery
solution.
Chapter 4, “Static and Dynamic Routing,” explains how to set up static and
dynamic routing. This chapter explains ScreenOS support for Routing
Information Protocol-Next Generation (RIPng).
Appendix A, “Switching,” lists options for using the security device as a switch
to pass IPv6 traffic.
Document Conventions
This document uses the conventions described in the following sections:
The following example shows the WebUI path and parameters for defining an
address:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
To open Online Help for configuration settings, click the question mark (?) in the
upper left of the screen.
The navigation tree also provides a Help > Config Guide configuration page to help
you configure security policies and Internet Protocol Security (IPSec). Select an
option from the list, and follow the instructions on the page. Click the ? character in
the upper left for Online Help on the Config Guide.
Document Conventions lv
Concepts & Examples ScreenOS Reference Guide
In text, commands are in boldface type and variables are in italic type.
In examples:
If there is more than one choice, each choice is separated by a pipe ( | ). For
example, the following command means “set the management options for the
ethernet1, the ethernet2, or the ethernet3 interface”:
NOTE: When entering a keyword, you only have to type enough letters to identify the
word uniquely. Typing set adm u whee j12fmt54 will enter the command set
admin user wheezer j12fmt54. However, all the commands documented in this
guide are presented in their entirety.
If a name string includes one or more spaces, the entire string must be
enclosed within double quotes; for example:
Any leading spaces or trailing text within a set of double quotes are trimmed;
for example, “ local LAN ” becomes “local LAN”.
NOTE: A console connection only supports SBCS. The WebUI supports both SBCS and
MBCS, depending on the character sets that your browser supports.
Illustration Conventions
Figure 2 shows the basic set of images used in illustrations throughout this manual.
Policy Engine
Security Zone Interfaces:
White = Protected Zone Interface
(example = Trust Zone)
Black = Outside Zone Interface
(example = Untrust Zone)
Generic Network Device
Tunnel Interface
Server
VPN Tunnel
Router
Juniper Networks
Switch Security Devices
Hub
Download the latest versions of software and review your release notes—
http://www.juniper.net/customers/csc/software/
To verify service entitlement by product serial number, use our Serial Number
Entitlement (SNE) Tool—
https://tools.juniper.net/SerialNumberEntitlementSearch/
Document Feedback
If you find any errors or omissions in this document, contact Juniper Networks at
[email protected].
lx Document Feedback
Master Index
Numerics removing ....................................................... 2-108
3DES ............................................................................. 5-6 entries ................................................................. 2-104
3DES encryption .................................................... 14-119 group entries, editing ........................................ 2-108
4in6 tunneling groups ................................................................. 2-105
basic setup ....................................................... 14-113 See also addresses
definition .......................................................... 14-113 address groups ............................................. 2-105, 2-166
6in4 tunneling ........................................................ 14-109 creating ............................................................... 2-107
basic setup ....................................................... 14-118 editing ................................................................. 2-108
over IPv4 WAN ................................................ 14-118 entries, removing .............................................. 2-108
6over4 tunneling options ................................................................ 2-106
addresses, handling .......................................... 14-96 address sweep .............................................................. 4-8
definition ............................................................ 14-95 address translation
manual tunneling .............................................. 14-96 See NAT, NAT-dst, and NAT-src
types ................................................................... 14-95 addresses
when to use ....................................................... 14-95 address book entries .......................... 2-104 to 2-108
6to4 autoconfiguration .............................................. 14-10
addresses .................................... 14-8, 14-99, 14-104 defined ................................................................ 2-166
hosts ................................................................. 14-104 in policies ........................................................... 2-166
relay routers ..........................................14-99, 14-100 IP, host and network IDs .................................... 2-47
routers ...................................................14-99, 14-100 IP, lifetime for XAuth users ................................ 9-72
tunneling .................................................14-95, 14-99 L2TP assignments ............................................... 9-86
tunneling, description ....................................... 14-99 link-local ............................................................. 14-11
MAC .............................................14-12, 14-20, 14-28
A negation .............................................................. 2-187
AAL5 netmasks ............................................................ 2-103
encapsulations ................................................... 12-76 private ................................................................... 2-48
multiplexing ....................................................... 12-84 public .................................................................... 2-47
Access Concentrator (AC)........................................ 14-44 splitting ............................................................... 14-42
access control list wildcards ................................................ 2-103, 2-166
See ACL addresses, handling
access lists 4in6 tunneling ................................................. 14-114
for routes .............................................................. 7-40 6to4 tunneling ................................................. 14-101
IGMP ................................................................... 7-156 destination address translation ....................... 14-82
multicast routing ............................................... 7-149 DIP, from IPv4 to IPv6...................................... 14-82
PIM-SM ............................................................... 7-198 DIP, from IPv6 to IPv4...................................... 14-81
Access Point Name IPv4 hosts to a single IPv6 host ..................... 14-111
See APN IPv6 hosts to multiple IPv4 hosts .................... 14-85
access policies manual tunneling .............................................. 14-96
See policies addresses, overlapping ranges ................... 10-65, 10-76
ACL .......................................................................... 12-143 addresses, XAuth
ActiveX controls, blocking ...................................... 4-169 assignments ......................................................... 9-70
address books authentication, and ............................................. 9-81
addresses timeout ................................................................. 9-72
adding............................................................ 2-104 admin users .................................................................. 9-2
modifying ...................................................... 2-105 authentication, prioritizing ................................. 9-32
privileges from RADIUS ....................................... 9-2 asset recovery log ...................................................... 3-68
server support ..................................................... 9-14 Asynchronous Transfer Mode
timeout ................................................................. 9-18 See ATM
administration ATM ........................................................................... 12-77
CLI ........................................................................... 3-9 ATM Adaptation Layer 5 .......................................... 12-84
restricting ............................................................. 3-42 attack actions .............................................4-140 to 4-148
WebUI .................................................................... 3-2 close .................................................................... 4-140
administration, vsys .................................................. 10-7 close client ......................................................... 4-140
administrative traffic ................................................. 3-29 close server ........................................................ 4-140
admins ........................................................................ 10-2 drop .................................................................... 4-140
changing passwords ..................................10-4, 10-7 drop packet ........................................................ 4-140
types ..................................................................... 10-4 ignore.................................................................. 4-140
ADSL none .................................................................... 4-141
configuring interface ........................................ 12-84 attack database updates
overview ............................................................. 12-83 downloading ...................................................... 4-232
VPN tunnel ....................................................... 12-107 overview ............................................................. 4-232
Advanced Encryption Standard (AES) ....................... 5-6 attack object database ..............................4-122 to 4-129
AES128 encryption ............................................... 14-119 auto notification and manual update.............. 4-126
agents, zombie ..................................................4-27, 4-29 automatic update .............................................. 4-125
aggregate interfaces .......................................2-37, 11-51 changing the default URL ................................. 4-128
aggressive aging ............................................4-31 to 4-36 immediate update ............................................. 4-124
Aggressive mode ....................................................... 5-10 manual update........................................4-127, 4-128
AH ..........................................................................5-3, 5-5 attack object groups ................................................ 4-136
AIM ............................................................................ 4-133 applied in policies ............................................. 4-130
alarms changing severity .............................................. 4-136
email alert ............................................................ 3-68 Help URLs .......................................................... 4-134
NetScreen-Security Manager, reporting to ....... 3-25 logging ................................................................ 4-151
thresholds .................................................2-173, 3-69 severity levels .................................................... 4-136
traffic ........................................................3-68 to 3-71 attack objects ................................. 4-119, 4-130 to 4-135
ALGs ...................................................................4-59, 6-19 brute force...............................................4-148, 4-149
Apple iChat ........................................................ 6-111 custom ................................................................ 4-214
for custom services ........................................... 2-168 disabling ............................................................. 4-139
MS RPC ............................................................... 2-127 IDP ...................................................................... 4-185
RTSP ................................................................... 2-129 negation ............................................................. 4-164
SIP ......................................................................... 6-15 overview ............................................................. 4-211
SIP NAT ................................................................ 6-25 protocol anomalies ................................4-135, 4-163
alternate gatekeepers .................................................. 6-2 protocol anomaly .............................................. 4-212
America Online Instant Messaging re-enabling ......................................................... 4-139
See AIM signature............................................................. 4-212
anti-replay checking .........................................5-62, 5-69 stateful signatures ............................................. 4-134
APN stream signatures .............................................. 4-135
filtering .................................................13-14 to 13-15 TCP stream signatures ...................................... 4-161
selection mode .................................................. 13-15 attack protection
Apple iChat ALG....................................................... 6-111 policy level ............................................................. 4-4
call-answer-time ................................................ 6-112 security zone level ................................................ 4-4
reassembly ......................................................... 6-113 attacks
Application Layer Gateways common objectives ............................................... 4-1
See ALGs detection and defense options ..................4-2 to 4-4
application options, in policies .............................. 2-168 DOS ...........................................................4-27 to 4-56
ARP ..................................................................2-82, 11-60 ICMP
broadcasts .......................................................... 11-30 floods ............................................................... 4-50
gratuitous ............................................................. 2-45 fragments ...................................................... 4-240
lookup ................................................................. 11-39 IP packet fragments .......................................... 4-244
ARP, ingress IP address............................................. 2-84 land ....................................................................... 4-52
H IDP
HA attack objects ..................................................... 4-185
See high availability basic configuration............................................ 4-175
See also NSRP configuring device for standalone IDP ........... 4-229
hanging GTP tunnel ................................................. 13-25 configuring inline or inline tap mode ............. 4-187
hardware sessions ................................................... 2-137 enabling in firewall rule .................................... 4-186
hash-based message authentication code ................ 5-6 rulebase, overview ............................................ 4-188
hashing, Secure Hashing Algorithm (SHA) ......... 14-119 IDP engine
heartbeats updating ............................................................. 4-233
HA physical link .................................................. 11-7 IDP modes ................................................................ 4-187
RTO ....................................................................... 11-7 IDP rulebases
Help files ....................................................................... 3-2 adding to security policies ............................... 4-189
high availability ...............................................13-4, 13-25 role-based administration ................................ 4-185
Active/Active ...................................................... 11-13 types ................................................................... 4-184
Active/Passive .................................................... 11-13 IDP rules ................................................................... 4-188
cabling ..................................................11-27 to 11-29 IDP rules, configuring.............................................. 4-190
data link ............................................................... 11-8 actions ................................................................ 4-196
DHCP .................................................................. 2-232 address objects .................................................. 4-185
interfaces, virtual HA .......................................... 2-39 attack severity ................................................... 4-201
IP tracking .......................................................... 11-60 attacks ................................................................ 4-198
link probes ........................................................... 11-9 IDP attack objects ............................................. 4-185
messages .............................................................. 11-7 IP actions ............................................................ 4-199
virtual interfaces ............................................... 11-28 Match columns .................................................. 4-190
high availability interfaces notifications ....................................................... 4-201
aggregate............................................................ 11-51 service objects ................................................... 4-185
cabling network as HA links ............................ 11-28 services ............................................................... 4-192
redundant .......................................................... 11-49 source and destination ..................................... 4-191
high-watermark threshold ........................................ 4-31 targets ................................................................. 4-202
historical graphs ...................................................... 2-173 terminal rules .................................................... 4-195
HMAC ............................................................................ 5-6 IDP rules, entering comments ........ 4-202, 4-206, 4-211
Host mode ...................................................14-44, 14-114 IDP-capable system ................................................. 4-172
HTTP IEEE 802.1Q VLAN standard .................................. 10-43
blocking components .........................4-168 to 4-170 IGMP
keep-alive ............................................................. 4-85 access lists, using .............................................. 7-156
session ID ............................................................... 3-4 configuration, basic .......................................... 7-157
session timeout ................................................... 4-32 configuration, verifying .................................... 7-159
trickling ................................................................ 4-86 host messages ................................................... 7-154
HyperText Transfer Protocol interfaces, enabling on ..................................... 7-155
See HTTP parameters ..............................................7-159, 7-160
policies, multicast.............................................. 7-165
I querier ................................................................ 7-155
iChat ALG .................................................................. 6-111 IGMP proxies ............................................................ 7-161
ICMP ......................................................................... 4-132 on interfaces ...................................................... 7-163
fragments ........................................................... 4-240 sender ................................................................. 7-172
large packets ...................................................... 4-241 IKE ................................................ 5-7, 5-96, 5-105, 5-170
ICMP floods ................................................................ 4-50 group IKE ID user ................................5-193 to 5-208
ICMP services ........................................................... 2-125 group IKE ID, container .................................... 5-196
message codes .................................................. 2-125 group IKE ID, wildcards ................................... 5-196
message types ................................................... 2-125 heartbeats .......................................................... 5-304
IDENT ....................................................................... 4-132 hello messages .................................................. 5-304
Identity Association Prefix Delegation Identification IKE ID ................................ 5-61 to 5-62, 5-67 to 5-68
(IAPD-ID).....................................................14-35, 14-37 IKE ID recommendations ................................... 5-80
Ident-Reset ................................................................. 3-28 IKE ID, Windows 2000 ..........................5-229, 5-237
idle session timeout .................................................. 9-18 local ID, ASN1-DN ............................................. 5-195
VLAN1 .................................................................. 3-29 IPv6 hosts to a single IPv4 host ....................... 14-86
WebUI .................................................................. 3-28 IPv6 hosts to multiple IPv4 hosts .................... 14-84
manual 6over4 tunneling ....................................... 14-95 IPv6-to-IPv4 network mapping........................ 14-84
Manual Key MIP from IPv6 to IPv4 ...................................... 14-82
management ......................................................... 5-7 reachable from other zones ............................... 8-67
manual keys ........................................ 5-128, 5-134, 9-14 same-as-untrust interface .......................8-70 to 8-73
manual keys, VPNs ...........................................3-43, 3-79 MIP, creating
manual tunneling .................................................... 14-96 addresses ............................................................. 8-65
mapped IP on tunnel interface .............................................. 8-70
See MIP on zone interface ................................................ 8-65
mapping MIP, default
host, IPv4 to IPv6 .............................................. 14-89 netmasks .............................................................. 8-66
host, IPv6 to IPv4 .............................................. 14-86 virtual routers ...................................................... 8-66
network, IPv4 to IPv6 ....................................... 14-88 MIP, to zone with interface-based NAT.................... 2-94
Maximum Transmission Unit (MTU) ..................... 14-11 MIP, virtual systems................................................. 10-33
MD5 .............................................................................. 5-6 MIP, VPNs ................................................................. 5-150
Message Digest version 5 (MD5) ............................... 5-6 Mobile Station (MS) mode ...................................... 13-15
message drop ............................................................. 4-85 mode config ............................................................... 9-71
messages mode, Transparent .................................................. 10-44
alert ....................................................................... 3-57 modem ports ....................................................3-20, 3-22
control ................................................................ 11-14 modes
critical ................................................................... 3-57 Aggressive ............................................................ 5-10
data ....................................................................... 11-8 Host........................................................14-44, 14-114
debug .................................................................... 3-57 L2TP operational ............................................... 5-218
deny .................................................................... 4-103 Main ........................................................................ 5-9
deny, creating and editing ............................... 4-103 NAT and Route .................................................... 11-3
EAP ....................................................................... 5-25 NAT, traffic to Untrust zone ............................... 2-79
emergency ........................................................... 3-57 Phase 1 cryptographic ...............................5-59, 5-66
error ...................................................................... 3-57 preempt .............................................................. 11-23
GCF ......................................................................... 6-2 Router ................................................................. 14-50
HA ......................................................................... 11-7 Stale .................................................................... 14-29
IKEv2 .................................................................... 5-25 Transparent.......................................................... 2-80
info ........................................................................ 3-57 Transport ....................5-4, 5-70, 5-218, 5-223, 5-228
notification ........................................................... 3-57 Tunnel............................................................5-4, 5-70
RCF ......................................................................... 6-2 modes, operational
warning ................................................................ 3-57 NAT ....................................................................... 13-4
WebTrends .......................................................... 3-73 Route .................................................................... 13-3
MGT interface ............................................................. 2-38 Transparent.......................................................... 13-3
MGT interface, management options ...................... 3-29 modes, selection
MIB files, importing ................................................. 5-263 APN ..................................................................... 13-15
MIB II .................................................................3-28, 3-74 Mobile Station (MS) ........................................... 13-15
Microsoft Network Instant Messenger Network .............................................................. 13-15
See MSN Instant Messenger Verified ............................................................... 13-15
Microsoft-Remote Procedure Call modulus ...................................................................... 5-10
See MS-RPC MS RPC ALG, defined .............................................. 2-127
MIME, AV scanning ................................................... 4-75 MSN Messenger ....................................................... 4-133
MIP ..............................................2-11, 8-63, 14-80, 14-82 MS-RPC ..................................................................... 4-133
address ranges .................................................... 8-66 multicast
bidirectional translation ....................................... 8-6 addresses ........................................................... 7-146
definition ................................................................ 8-6 distribution trees ............................................... 7-182
global zone ........................................................... 8-64 policies................................................................ 7-151
grouping, multi-cell policies ............................... 8-79 policies for IGMP ............................................... 7-165
IPv4 hosts to a single IPv6 host ...................... 14-89 reverse path forwarding ................................... 7-146
IPv4 hosts to multiple IPv6 hosts .................... 14-88 routing tables ..................................................... 7-147
O Overbilling attacks
objects description ......................................................... 13-26
attack objects ..................................................... 4-211 prevention ........................................... 13-26 to 13-31
attack objects, creating custom ....................... 4-214 prevention, configuring .................................... 13-29
attack objects, protocol anomaly .................... 4-212 solutions ............................................................. 13-28
attack objects, signature ................................... 4-212
objects, monitoring ................................................. 11-57 P
OCSP (Online Certificate Status Protocol)............... 5-44 P2P ............................................................................ 4-133
client ..................................................................... 5-44 BitTorrent ........................................................... 4-133
responder ............................................................. 5-44 DC ....................................................................... 4-133
Open Shortest Path First eDonkey ............................................................. 4-133
See OSPF FastTrack ............................................................ 4-133
operating systems, probing hosts for ..........4-12 to 4-14 Gnutella............................................................... 4-133
operational modes KaZaa .................................................................. 4-133
NAT ....................................................................... 13-4 MLdonkey........................................................... 4-133
Route .................................................................... 13-3 Skype .................................................................. 4-133
Transparent.......................................................... 13-3 SMB ..................................................................... 4-133
OSPF WinMX ................................................................ 4-133
broadcast networks............................................. 7-48 packet flow .................................................... 2-10 to 2-12
configuration steps.............................................. 7-49 inbound VPN ........................................... 5-76 to 5-78
ECMP support ...................................................... 7-58 outbound VPN ..................................................... 5-76
flooding, protecting against ............................... 7-66 policy-based VPN.................................... 5-78 to 5-79
flooding, reduced LSA......................................... 7-67 route-based VPN ..................................... 5-73 to 5-78
global parameters ............................................... 7-58 packet flow, NAT-dst...................................... 8-29 to 8-31
hello protocol ....................................................... 7-47 packets ........................................................................ 3-96
interface parameters........................................... 7-62 address spoofing attack ...................................... 3-94
interfaces, assigning to areas............................. 7-53 collision....................................................... 3-93, 3-94
interfaces, tunnel ................................................ 7-68 denied ................................................................... 3-96
link-state advertisements ................................... 7-46 dropped ...................................................... 3-95, 3-96
link-type, setting .................................................. 7-68 fragmented ........................................................... 3-96
load-balancing ..................................................... 7-36 incoming .............................................................. 3-93
LSA suppression .................................................. 7-67 Internet Control Message Protocol (ICMP) ...... 3-92,
neighbors, authenticating................................... 7-64 3-95
neighbors, filtering .............................................. 7-65 IPSec ..................................................................... 3-95
not so stubby area............................................... 7-47 land attack ............................................................ 3-95
point-to-multipoint .............................................. 7-68 Network Address Translation (NAT) ................. 3-95
point-to-point network........................................ 7-48 Point to Point Tunneling Protocol (PPTP)......... 3-94
security configuration ......................................... 7-64 received ................................... 3-93, 3-94, 3-95, 3-96
stub area............................................................... 7-47 transmitted underrun ......................................... 3-94
virtual links .......................................................... 7-59 unreceivable ......................................................... 3-94
OSPF areas ................................................................. 7-46 unroutable ............................................................ 3-95
defining ................................................................ 7-51 PAP .....................................................5-218, 5-221, 12-36
interfaces, assigning to ....................................... 7-53 parent connection...................................................... 3-95
OSPF routers Password Authentication Protocol ......................... 12-36
adjacency ............................................................. 7-47 See PAP
backup designated .............................................. 7-47 passwords
creating OSPF instance in VR ............................ 7-50 forgetting .............................................................. 3-39
designated ............................................................ 7-47 root admin ........................................................... 3-41
types ..................................................................... 7-47 passwords, changing admin’s ........................ 10-4, 10-7
OSPF routes PAT ........................................................2-137, 2-142, 8-14
default, rejecting.................................................. 7-66 pattern files .............................................................. 4-120
redistributed, summarizing................................ 7-57 updating from a proxy server .......................... 4-129
redistributing ....................................................... 7-56 using in AV scanning .......................................... 4-85
route-deny restriction, disabling ....................... 7-69 PCMCIA ....................................................................... 3-56
SYN and FIN flags set ......................................... 4-12 rejecting default ................................................... 7-87
TCP packet without flags.................................... 4-14 summary, configuring ........................................ 7-91
record route IP option ............................................... 4-11 RIP, configuring
redundancy, interface ............................................. 11-49 demand circuits ................................................... 7-94
redundant gateways ..................................5-301 to 5-314 security ................................................................. 7-85
recovery procedure ........................................... 5-305 steps ...................................................................... 7-75
TCP SYN flag checking ..................................... 5-307 RIP, viewing
Registration Confirm (RCF) messages....................... 6-2 database ....................................................7-79, 14-63
regular expressions ...................................4-158 to 4-159 interface details ................................................... 7-81
rekey option, VPN monitoring ............................... 5-253 neighbor information ..............................7-80, 14-65
Remote Authentication Dial-in User Service protocol details .........................................7-79, 14-63
See RADIUS RIPng..............................................................14-47, 14-49
remote termination point ........................14-101, 14-104 interface cost metric ..............................14-58, 14-59
replay protection ....................................................... 5-12 metric calculation .............................................. 14-59
request packets, outgoing from IPv6 to IPv4 ....... 14-82 offset metric............................................14-58, 14-59
request/response pairs .............................................. 5-18 route metric ............................................14-58, 14-59
requirements, basic functional ................................ 10-4 route redistribution ........................................... 14-49
Retransmission Time .............................................. 14-30 rlogin ......................................................................... 4-132
rexec ......................................................................... 4-132 role-based administration
RFC 1777, Lightweight Directory Access Protocol .. 9-29 configuring IDP-only administrator ................ 4-230
RFCs IDP rulebases ..................................................... 4-185
0792, Internet Control Message Protocol ....... 2-125 root admin, logging in............................................... 3-42
1038, Revised IP Security Option .................... 4-10 route lookup
1349, Type of Service in the Internet Protocol Suite .. multiple VRs......................................................... 7-34
2-174 sequence .............................................................. 7-32
1918, Address Allocation for Private Internets . 2-48 Route mode .............................. 2-98 to 2-101, 11-3, 13-3
2132, DHCP Options and BOOTP Vendor Extensions interface settings ................................................. 2-99
2-230 NAT-src ................................................................. 2-98
2326, Real Time Streaming Protocol (RTSP)... 2-133 route tracking ......................................................... 12-121
2474, Definition of the Differentiated Services Field route-based VPNs ..........................................5-72 to 5-73
(DS Field) in the IPv4 and IPv6 Headers ....... 2-174 Router Advertisement (RA) ..................................... 14-11
791, Internet Protocol..................................... 4-10 Router mode ............................................................ 14-50
793, Transmission Control Protocol................. 4-13 Router Solicitation (RS) ........................................... 14-11
RIP routers
authenticating neighbors ................................... 7-85 upstream ............................................................ 14-36
configuration ..................................................... 14-51 virtual .......................................................14-48, 14-99
database ............................................................... 7-92 routers, CPE .............................................................. 2-220
demand circuit configuration ............................ 7-93 routes
filtering neighbors ............................................... 7-86 exporting .............................................................. 7-42
flooding, protecting against ....................7-87, 14-57 filtering ................................................................. 7-39
global parameters ....................................7-82, 14-54 importing ............................................................. 7-42
instances, creating in VR.........................7-75, 14-52 maps ..................................................................... 7-38
interface parameters ...............................7-84, 14-58 metrics.................................................................. 7-31
interfaces, enabling on ............................7-76, 14-53 null ........................................................................ 5-95
load-balancing ..................................................... 7-36 preference ............................................................ 7-30
neighbors, filtering ............................................ 14-55 redistributing ....................................................... 7-37
point-to-multipoint .............................................. 7-95 selection ............................................................... 7-30
prefix summary................................................... 7-91 Routing Information Protocol
versions ................................................................ 7-89 See RIP
versions, protocol................................................ 7-89 routing tables ............................................................. 7-15
RIP routes lookup ................................................................... 7-32
alternate ............................................................... 7-92 lookup in multiple VRs ....................................... 7-34
default, rejecting ............................................... 14-55 multicast ............................................................. 7-147
redistributing ............................................7-77, 14-56 route selection ..................................................... 7-30
types ..................................................................... 7-15 TCP packet without flags, detect ....................... 4-14
routing, multicast..................................................... 7-145 teardrop ................................................................ 4-54
routing, policy based ............................................... 7-127 UDP floods ........................................................... 4-51
RSA authentication ................................................ 14-119 unknown protocols, drop ................................. 4-243
rsh.............................................................................. 4-132 VLAN and MGT zones ........................................... 4-2
RTOs ............................................................11-16 to 11-17 WinNuke attacks ................................................. 4-55
operational states .............................................. 11-18 SCREEN, MGT zone ................................................... 2-28
peers ................................................................... 11-24 ScreenOS
synchronization ................................................. 11-21 function zones ..................................................... 2-33
RTSP .......................................................................... 4-132 global zone ........................................................... 2-28
RTSP ALG overview ................................................................. 2-1
defined ............................................................... 2-129 packet flow .............................................. 2-10 to 2-12
dual-stack environment .................................... 2-130 policies .................................................................... 2-3
request methods ............................................... 2-130 RADIUS vendor IDs ............................................. 9-22
servers in private domain ................................ 2-133 security zones .............................................. 2-2, 2-28
servers in public domain .................................. 2-135 security zones, global ........................................... 2-2
status codes ....................................................... 2-132 security zones, predefined ................................... 2-2
rules, derived from policies .................................... 2-164 tunnel zones ......................................................... 2-29
run-time authentication .................................2-171, 9-48 virtual systems ....................................................... 2-9
Run-Time Objects zones ........................................................ 2-25 to 2-33
See RTOs ScreenOS interfaces
security zones ........................................................ 2-3
S subinterfaces .......................................................... 2-3
SA policy ..................................................................... 3-96 ScreenOS zones ......................................................... 10-6
SAs ........................................................................5-8, 5-11 SDP ................................................................. 6-19 to 6-20
check in packet flow ........................................... 5-75 secondary IP addresses ............................................. 2-51
SCEP (Simple Certificate Enrollment Protocol) ...... 5-40 secondary path ........................................................ 11-30
schedules .......................................................2-157, 2-173 Secure Copy
SCP See SCP
enabling ................................................................ 3-18 Secure Hash Algorithm-1
example client command .................................. 3-18 See SHA-1
SCREEN Secure Shell
address sweep ....................................................... 4-8 See SSH
bad IP options, drop ......................................... 4-242 Secure Sockets Layer
drop unknown MAC addresses.......................... 4-43 See SSL
FIN with no ACK.................................................. 4-15 SecurID ....................................................................... 9-27
FIN without ACK flag, drop ................................ 4-13 ACE servers .......................................................... 9-28
ICMP auth server object ................................................ 9-35
fragments, block .......................................... 4-240 authentication port .............................................. 9-28
ICMP floods .......................................................... 4-50 authenticator ........................................................ 9-27
IP options ............................................................. 4-10 encryption types .................................................. 9-28
IP packet fragments, block .............................. 4-244 L2TP .................................................................... 5-221
IP spoofing ...............................................4-18 to 4-23 token codes .......................................................... 9-27
land attacks .......................................................... 4-52 Use Duress option ............................................... 9-28
large ICMP packets, block ................................ 4-241 user type support ................................................ 9-28
loose source route IP option, detect ................. 4-25 SecurID clients
Ping of Death ....................................................... 4-53 retries .................................................................... 9-28
port scan ................................................................ 4-9 timeout ................................................................. 9-28
source route IP option, deny ............................. 4-25 security associations
strict source route IP option, detect .................. 4-25 IKEv2 .................................................................... 5-17
SYN and FIN flags set ......................................... 4-12 See SAs
SYN floods ................................................4-38 to 4-43 Security Associations (SA) ......................................... 3-95
SYN fragments, detect ...................................... 4-245 security IP option ............................................. 4-10, 4-11
SYN-ACK-ACK proxy floods ............................... 4-36 Security Policies ....................................................... 4-183
with SSL (user groups, external) ........................ 9-63 WLAN WAP operation modes
WebAuth, pre-policy auth process ......................... 2-172 802.11b clients, configuring ............ 12-129, 12-130
WebTrends .........................................................3-56, 3-72 802.11g clients, configuring .......................... 12-129
encryption ...................................................3-73, 3-78 WLAN, wireless interfaces
messages .............................................................. 3-73 binding.............................................................. 12-156
WebUI ................................................................3-2, 14-30 WMM
Help files ................................................................ 3-2 access categories ............................................. 12-146
management options .......................................... 3-28 configuring quality of service ......................... 12-146
WebUI, on sample client, downstream router ..... 14-38 default settings ................................................ 12-147
WEP......................................................................... 12-133 enabling ............................................................ 12-146
Whois ........................................................................ 4-132
wildcard addresses .................................................. 2-166 X
wildcards .......................................................5-196, 13-14 XAuth
WinNuke attacks ........................................................ 4-55 authentication .................................................. 14-136
WINS bypass-auth .......................................................... 9-71
L2TP settings ..................................................... 5-221 client authentication ........................................... 9-85
WINS server ........................................................... 14-130 defined .................................................................. 9-70
Wired Equivalent Privacy query remote settings ......................................... 9-71
See WEP ScreenOS as client............................................... 9-85
wireless bridge groups .......................................... 12-157 TCP/IP assignments ............................................ 9-72
wireless interface virtual adapters .................................................... 9-70
logical interface ................................................... 2-36 VPN idletime ........................................................ 9-73
wireless interfaces VPN monitoring ................................................. 5-254
binding SSID to ................................................ 12-156 when to use ...................................................... 14-130
binding to radio ............................................... 12-157 XAuth addresses
configuring ....................................................... 12-156 assignments ......................................................... 9-70
disabling ........................................................... 12-158 authentication, and ............................................. 9-81
Wireless Local Area Network IP address lifetime.................................. 9-72 to 9-73
See WLAN timeout ................................................................. 9-72
WLAN XAuth users ................................................... 9-70 to 9-84
access control list ............................................ 12-143 authentication ...................................................... 9-70
advanced parameters ..................................... 12-150 local authentication ............................................. 9-73
aging interval ................................................... 12-151 local group authentication .................................. 9-75
authentication and encryption ...................... 12-132 server support ...................................................... 9-14
beacon interval ................................................ 12-151 with L2TP ............................................................... 9-4
bridge groups ................................................... 12-157 XAuth, external
burst threshold ................................................ 12-152 auth server queries.............................................. 9-71
Clear to Send mode ........................................ 12-154 user authentication ............................................. 9-76
Clear to Send rate............................................ 12-154 user group authentication .................................. 9-78
Clear to Send type ........................................... 12-154 XR, configuring ...................................................... 12-145
configurations, reactivating ........................... 12-144
configuring Super G ........................................ 12-144 Y
country codes and channels .......................... 12-141 Yahoo! Messenger .................................................... 4-133
DTIM ................................................................. 12-152
extended channels .......................................... 12-141 Z
finding available channels .............................. 12-143 zip files, blocking ..................................................... 4-169
fragment threshold ......................................... 12-153 zombie agents .................................................. 4-27, 4-29
preamble length .............................................. 12-155 zones .....................................................2-25 to 2-33, 10-6
Request to Send threshold ............................. 12-153 defining................................................................. 2-30
site survey ........................................................ 12-142 editing ................................................................... 2-31
slot time ........................................................... 12-155 function ................................................................ 2-33
viewing wireless configuration information 12-158 function, MGT interface ...................................... 2-38
WMM ................................................................ 12-146 global .................................................................... 2-28
XR ..................................................................... 12-145 global security ........................................................ 2-2
Volume 2:
Fundamentals
Juniper Networks, the Juniper Networks logo, JUNOS, NetScreen, ScreenOS, and Steel-Belted Radius are registered trademarks of Juniper Networks, Inc.
in the United States and other countries. JUNOSe is a trademark of Juniper Networks, Inc. All other trademarks, service marks, registered trademarks, or
registered service marks are the property of their respective owners.
All specifications are subject to change without notice. Juniper Networks assumes no responsibility for any inaccuracies in this document or for any
obligation to update information in this document. Juniper Networks reserves the right to change, modify, transfer, or otherwise revise this publication
without notice.
FCC Statement
The following information is for FCC compliance of Class A devices: This equipment has been tested and found to comply with the limits for a Class A
digital device, pursuant to part 15 of the FCC rules. These limits are designed to provide reasonable protection against harmful interference when the
equipment is operated in a commercial environment. The equipment generates, uses, and can radiate radio-frequency energy and, if not installed and
used in accordance with the instruction manual, may cause harmful interference to radio communications. Operation of this equipment in a residential
area is likely to cause harmful interference, in which case users will be required to correct the interference at their own expense.
The following information is for FCC compliance of Class B devices: The equipment described in this manual generates and may radiate radio-frequency
energy. If it is not installed in accordance with Juniper Networks’ installation instructions, it may cause interference with radio and television reception.
This equipment has been tested and found to comply with the limits for a Class B digital device in accordance with the specifications in part 15 of the FCC
rules. These specifications are designed to provide reasonable protection against such interference in a residential installation. However, there is no
guarantee that interference will not occur in a particular installation.
If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user
is encouraged to try to correct the interference by one or more of the following measures:
Connect the equipment to an outlet on a circuit different from that to which the receiver is connected.
Caution: Changes or modifications to this product could void the user's warranty and authority to operate this device.
Disclaimer
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED
WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED
WARRANTY, CONTACT YOUR JUNIPER NETWORKS REPRESENTATIVE FOR A COPY.
ii
Table of Contents
About This Volume ix
Document Conventions.................................................................................... x
Web User Interface Conventions .............................................................. x
Command Line Interface Conventions ...................................................... x
Naming Conventions and Character Types .............................................. xi
Illustration Conventions .......................................................................... xii
Requesting Technical Support ........................................................................ xii
Self-Help Online Tools and Resources..................................................... xiii
Opening a Case with JTAC ...................................................................... xiii
Document Feedback ..................................................................................... xiii
Chapter 2 Zones 25
Viewing Preconfigured Zones......................................................................... 26
Security Zones ............................................................................................... 28
Global Zone ............................................................................................. 28
SCREEN Options...................................................................................... 28
Binding a Tunnel Interface to a Tunnel Zone.................................................. 29
Configuring Security Zones and Tunnel Zones ............................................... 30
Creating a Zone ....................................................................................... 30
Modifying a Zone..................................................................................... 31
Deleting a Zone ....................................................................................... 32
Function Zones ..............................................................................................33
Chapter 3 Interfaces 35
Interface Types ..............................................................................................36
Logical Interfaces..................................................................................... 36
Physical Interfaces ............................................................................ 36
Wireless Interfaces............................................................................ 36
Bridge Group Interfaces..................................................................... 37
Subinterfaces .................................................................................... 37
Aggregate Interfaces ......................................................................... 37
Redundant Interfaces ........................................................................ 37
Virtual Security Interfaces .................................................................38
Function Zone Interfaces ......................................................................... 38
Management Interfaces..................................................................... 38
High Availability Interfaces................................................................ 38
Tunnel Interfaces..................................................................................... 39
Deleting Tunnel Interfaces ................................................................ 42
Viewing Interfaces ......................................................................................... 43
Configuring Security Zone Interfaces ............................................................. 44
Binding an Interface to a Security Zone ................................................... 44
Unbinding an Interface from a Security Zone .......................................... 46
Addressing an L3 Security Zone Interface................................................ 47
Public IP Addresses ........................................................................... 47
Private IP Addresses.......................................................................... 48
Addressing an Interface .................................................................... 48
Modifying Interface Settings .................................................................... 49
Creating a Subinterface in the Root System ............................................. 50
Deleting a Subinterface............................................................................ 50
Creating a Secondary IP Address ................................................................... 51
Backup System Interfaces .............................................................................. 52
Configuring a Backup Interface................................................................ 52
Configuring an IP Tracking Backup Interface..................................... 52
Configuring a Tunnel-if Backup Interface .......................................... 53
Configuring a Route Monitoring Backup Interface ............................. 57
Loopback Interfaces ....................................................................................... 58
Creating a Loopback Interface .................................................................59
Setting the Loopback Interface for Management...................................... 59
Setting BGP on a Loopback Interface ....................................................... 59
Setting VSIs on a Loopback Interface....................................................... 60
Setting the Loopback Interface as a Source Interface ............................... 60
Interface State Changes.................................................................................. 61
Physical Connection Monitoring .............................................................. 63
Tracking IP Addresses ............................................................................. 63
Interface Monitoring ................................................................................ 68
Monitoring Two Interfaces ................................................................ 69
Monitoring an Interface Loop ............................................................ 70
Security Zone Monitoring ........................................................................ 73
Down Interfaces and Traffic Flow ............................................................ 74
Failure on the Egress Interface .......................................................... 75
Failure on the Ingress Interface ......................................................... 76
iv Table of Contents
Table of Contents
Flood Method.................................................................................... 83
ARP/Trace-Route Method .................................................................. 84
Configuring VLAN1 Interface for Management .................................. 87
Configuring Transparent Mode.......................................................... 89
NAT Mode...................................................................................................... 92
Inbound and Outbound NAT Traffic ........................................................ 94
Interface Settings..................................................................................... 95
Configuring NAT Mode ............................................................................ 95
Route Mode.................................................................................................... 98
Interface Settings..................................................................................... 99
Configuring Route Mode .......................................................................... 99
Table of Contents v
Concepts & Examples ScreenOS Reference Guide
vi Table of Contents
Table of Contents
Index..........................................................................................................................IX-I
Chapter 5, “Building Blocks for Policies,” discusses the elements used for
creating policies and virtual private networks (VPNs): addresses (including VIP
addresses), services, and DIP pools. It also presents several example
configurations that support the H.323 protocol.
Chapter 7, “Traffic Shaping,” explains how you can prioritize services and
manage bandwidth at the interface and policy levels.
ix
Concepts & Examples ScreenOS Reference Guide
Document Conventions
This document uses the conventions described in the following sections:
The following example shows the WebUI path and parameters for defining an
address:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
To open Online Help for configuration settings, click the question mark (?) in the
upper left of the screen.
The navigation tree also provides a Help > Config Guide configuration page to help
you configure security policies and Internet Protocol Security (IPSec). Select an
option from the list, and follow the instructions on the page. Click the ? character in
the upper left for Online Help on the Config Guide.
In text, commands are in boldface type and variables are in italic type.
In examples:
x Document Conventions
About This Volume
If there is more than one choice, each choice is separated by a pipe ( | ). For
example, the following command means “set the management options for the
ethernet1, the ethernet2, or the ethernet3 interface”:
NOTE: When entering a keyword, you only have to type enough letters to identify the
word uniquely. Typing set adm u whee j12fmt54 will enter the command set
admin user wheezer j12fmt54. However, all the commands documented in this
guide are presented in their entirety.
If a name string includes one or more spaces, the entire string must be
enclosed within double quotes; for example:
Any leading spaces or trailing text within a set of double quotes are trimmed;
for example, “ local LAN ” becomes “local LAN”.
NOTE: A console connection only supports SBCS. The WebUI supports both SBCS and
MBCS, depending on the character sets that your browser supports.
Document Conventions xi
Concepts & Examples ScreenOS Reference Guide
Illustration Conventions
Figure 1 shows the basic set of images used in illustrations throughout this volume.
Policy Engine
Security Zone Interfaces:
White = Protected Zone Interface
(example = Trust Zone)
Black = Outside Zone Interface
(example = Untrust Zone)
Generic Network Device
Tunnel Interface
Server
VPN Tunnel
Router
Juniper Networks
Switch Security Devices
Hub
Download the latest versions of software and review your release notes—
http://www.juniper.net/customers/csc/software/
To verify service entitlement by product serial number, use our Serial Number
Entitlement (SNE) Tool—
https://tools.juniper.net/SerialNumberEntitlementSearch/
Document Feedback
If you find any errors or omissions in this document, contact Juniper Networks at
[email protected].
Juniper Networks ScreenOS architecture offers you flexibility in designing the layout
of your network security. On Juniper Networks security devices with more than two
interfaces, you can create numerous security zones and configure policies to
regulate traffic between and within zones. You can bind one or more interfaces to
each zone and enable different management and firewall options for each zone.
ScreenOS allows you to create the number of zones required by your network
environment, assign the number of interfaces required by each zone, and design
each interface according to your needs.
“Policies” on page 5
The chapter concludes with a four-part example that illustrates a basic configuration
for a security device using ScreenOS:
1
Concepts & Examples ScreenOS Reference Guide
Security Zones
A security zone is a collection of one or more network segments requiring the
regulation of inbound and outbound traffic via policies (see “Policies” on page 5).
Security zones are logical entities to which one or more interfaces are bound. With
many types of Juniper Networks security devices, you can define multiple security
zones, the exact number of which you determine based on your network needs. In
addition to user-defined zones, you can also use the predefined zones: Trust,
Untrust, and DMZ (for Layer 3 operation), or V1-Trust, V1-Untrust, and V1-DMZ (for
Layer 2 operation). If you want, you can continue using just the predefined zones.
You can also ignore the predefined zones and use user-defined zones exclusively.
Optionally, you can use both kinds of zones—predefined and user-defined—side by
side. This flexibility for zone configuration allows you to create a network design
that best suits your specific needs. See Figure 2.
NOTE: The one security zone that requires no network segment is the global zone. (For
more information, see “Global Zone” on page 28.) Additionally, any zone without
an interface bound to it nor any address book entries can also be said not to
contain any network segments.
If you upgrade from an earlier version of ScreenOS, all your configurations for
these zones remain intact.
You cannot delete a predefined security zone. You can, however, delete a
user-defined zone. When you delete a security zone, you also automatically delete
all addresses configured for that zone.
Figure 2 shows a network configured with five security zones—three default zones
(Trust, Untrust, DMZ) and two user-defined zones (Finance, Eng). Traffic passes
from one security zone to another only if a policy permits it.
Finance
Untrust
Trust
Policy Security Device
Engine
Eng DMZ
2 Security Zones
Chapter 1: ScreenOS Architecture
Through the policies you define, you can permit traffic between zones to flow in one
direction or in both. With the routes that you define, you specify the interfaces that
traffic from one zone to another must use. Because you can bind multiple interfaces
to a zone, the routes you chart are important for directing traffic to the interfaces of
your choice.
NOTE: For traffic to flow between interfaces bound to the same zone, no policy is
required because both interfaces have security equivalency. ScreenOS requires
policies for traffic between zones, not within a zone.
To permit traffic to flow from zone to zone, you bind an interface to the zone
and—for an interface in Route or NAT mode (see “Interface Modes” on
page 79)—assign an IP address to the interface. Two common interface types are
physical interfaces and—for those devices with virtual-system support—
subinterfaces (that is, a Layer 2 substantiation of a physical interface). For more
information, see “Interfaces” on page 35.
Physical Interfaces
A physical interface relates to components that are physically present on the
security device. The interface-naming convention differs from device to device.
NOTE: To see the naming conventions for a specific security device, refer to the
installation and configuration guide for that device.
Subinterfaces
On devices that support virtual LANs (VLANs), you can logically divide a physical
interface into several virtual subinterfaces, each of which borrows the bandwidth it
needs from the physical interface from which it stems. A subinterface is an
abstraction that functions identically to a physical interface and is distinguished by
802.1Q VLAN tagging. The security device directs traffic to and from a zone with a
subinterface via its IP address and VLAN tag. For convenience, administrators
usually use the same number for a VLAN tag as the subinterface number. For
example, the interface ethernet1/2 using VLAN tag 3 is named ethernet1/2.3. This
refers to the interface module in the first bay, the second port on that module, and
subinterface number 3 (ethernet1/2.3).
NOTE: 802.1Q is an IEEE standard that defines the mechanisms for the implementation
of virtual bridged LANs and the ethernet frame formats used to indicate VLAN
membership via VLAN tagging.
Note that although a subinterface shares part of its identity with a physical
interface, the zone to which you bind it is not dependent on the zone to which you
bind the physical interface. You can bind the subinterface ethernet1/2.3 to a
different zone than that to which you bind the physical interface ethernet1/2, or to
which you bind ethernet1/2.2. Similarly, there are no restrictions in terms of
IP-address assignments. The term subinterface does not imply that its address be in
a subnet of the address space of the physical interface.
Virtual Routers
A virtual router (VR) functions as a router. It has its own interfaces and its own
unicast and multicast routing tables. In ScreenOS, a security device supports two
predefined virtual routers. This allows the security device to maintain two separate
unicast and multicast routing tables and to conceal the routing information in one
virtual router from the other. For example, the untrust-vr is typically used for
communication with untrusted parties and does not contain any routing
information for the protected zones. Routing information for the protected zones is
maintained by the trust-vr. Thus, no internal network information can be gathered
by the covert extraction of routes from the untrust-vr, see Figure 3.
Finance
Untrust
Trust
Route Forwarding
When there are two virtual routers on a security device, traffic is not automatically
forwarded between zones that reside in different VRs, even if there are policies that
permit the traffic. If you want traffic to pass between virtual routers, you need to
either export routes between the VRs or configure a static route in one VR that
defines the other VR as the next hop. For more information about using two virtual
routers, see Volume 7: Routing.
4 Virtual Routers
Chapter 1: ScreenOS Architecture
Policies
Juniper Networks security devices secure a network by inspecting, and then
allowing or denying, all connection attempts that require passage from one security
zone to another.
By default, a security device denies all traffic in all directions. Through the creation
of policies, you can control the traffic flow from zone to zone by defining the kinds
of traffic permitted to pass from specified sources to specified destinations at
scheduled times. At the broadest level, you can allow all kinds of traffic from any
source in one zone to any destination in all other zones without any scheduling
restrictions. At the narrowest level, you can create a policy that allows only one kind
of traffic between a specified host in one zone and another specified host in
another zone during a scheduled period, see Figure 4.
NOTE: Some security devices ship with a default policy that allows all outbound traffic
from the Trust to the Untrust zone but denies all inbound traffic from the Untrust
zone to the Trust zone.
Untrust Untrust
Zone Zone
Trust Trust
Zone Zone
Every time a packet attempts to pass from one zone to another or between two
interfaces bound to the same zone, the security device checks its policy set lists for
a policy that permits such traffic (see “Policy Set Lists” on page 163). To allow traffic
to pass from one security zone to another—for example, from zone A to zone
B—you must configure a policy that permits zone A to send traffic to zone B. To
allow traffic to flow the other way, you must configure another policy permitting
traffic from zone B to zone A. For any traffic to pass from one zone to another, there
must be a policy that permits it. Also, if intrazone blocking is enabled, there must
be a policy to permit traffic to pass from one interface to another within that zone.
See Figure 5 on page 6.
Policies 5
Concepts & Examples ScreenOS Reference Guide
Finance
Untrust
Policy
Trust Engine
DMZ
Eng Note: The castle icon represents
an interface for a security zone.
Route Forwarding
If you configure multicast routing on a security device, you might have to configure
multicast policies. By default, a security device does not permit multicast control
traffic between zones. Multicast control traffic refers to the messages transmitted by
multicast protocols, such as Protocol Independent Multicast (PIM). Multicast policies
control the flow of multicast control traffic only. To allow data traffic (both unicast
and multicast) to pass between zones, you must configure firewall policies. (For
more information, see “Multicast Policies” on page 7-151.)
Route-based VPN—A route lookup determines which traffic the security device
encapsulates. Policies either permit or deny traffic to the destination specified
in the route. If the policy permits the traffic and the route references a tunnel
interface bound to a VPN tunnel, then the security device also encapsulates it.
This configuration separates the application of policies from the application of
VPN tunnels. Once configured, such tunnels exist as available resources for
securing traffic en route between one security zone and another.
A route-based VPN is good choice for site-to-site VPN configurations because you
can be apply multiple policies to traffic passing through a single VPN tunnel. A
policy-based VPN is a good choice for dialup VPN configurations because the dialup
client might not have an internal IP address to which you can set a route. See
Figure 6.
The following steps provide a sense of the main elements involved in a route-based
VPN configuration:
1. While configuring the VPN tunnel (for example, vpn-to-SF, where SF is the
destination or end entity), specify a physical interface or subinterface on the
local device as the outgoing interface. (The IP address for this interface is what
the remote peer must use when configuring its remote gateway.)
2. Create a tunnel interface (for example, tunnel.1), and bind it to a security zone.
NOTE: You do not have to bind the tunnel interface to the same zone for which VPN
traffic is destined. Traffic to any zone can access a tunnel interface if a route points
to that interface.
4. To direct traffic through this tunnel, set up a route stating that traffic to SF must
use tunnel.1.
tunnel.1 vpn-to-SF
Packet sent Packet arrives
At this point, the tunnel is ready for traffic bound for SF. You can now create
address-book entries, such as “Trust LAN” (10.1.1.0/24) and “SF LAN” (10.2.2.0/24)
and set up policies to permit or block different types of traffic from a specified
source, such as Trust LAN, to a specified destination, such as SF LAN. See Figure 7
on page 8.
Interface
tunnel.1
NOTE: For detailed information about VPNs, see Volume 5: Virtual Private Networks.
Virtual Systems
Some Juniper Networks security devices support virtual systems (vsys). A virtual
system is a subdivision of the main system that appears to the user to be a
standalone entity. Virtual systems reside separately from each other and from the
root system within the same security device. The application of ScreenOS to virtual
systems involves the coordination of three main components: zones, interfaces,
and virtual routers. Figure 8 presents a conceptual overview of how ScreenOS
integrates these components at both the root and vsys levels.
untrust-vr Finance
DMZ
NOTE: For further information about virtual systems and the application of zones,
interfaces, and virtual routers within the context of virtual systems, see Volume 10:
Virtual Systems.
Virtual Systems 9
Concepts & Examples ScreenOS Reference Guide
Packet-Flow Sequence
In ScreenOS, the flow sequence of an incoming packet progresses as presented in
Figure 9.
Incoming
Packet
SCREEN Session MIP/VIP Route Policy NAT-Dst and/or Create Perform
Filter Lookup Host IP Lookup Lookup NAT-Src Session Operation
1. The interface module identifies the incoming interface and, consequently, the
source zone to which the interface is bound.
The interface module uses the following criteria to determine the source zone:
If the packet is not encapsulated, the source zone is the security zone to
which the incoming interface or subinterface is bound.
2. If you have enabled SCREEN options for the source zone, the security device
activates the SCREEN module at this point. SCREEN checking can produce one
of the following three results:
10 Packet-Flow Sequence
Chapter 1: ScreenOS Architecture
3. The session module performs a session lookup, attempting to match the packet
with an existing session.
If the packet does not match an existing session, the security device
performs First Packet Processing, a procedure involving steps 4 through 9.
If the packet matches an existing session, the security device performs Fast
Processing, using the information available from the existing session entry
to process the packet. Fast Processing bypasses steps 4 through 8 because
the information generated by those steps has already been obtained during
the processing of the first packet in the session.
5. Prior to route lookup, ScreenOS checks the packet for policy based routing
(PBR). If PBR is enabled on that in-interface, the following actions apply to the
packet:
If no PBR policy exists at the interface level, the PBR policy bound to the
zone associated with the in-interface is applied to the packet.
If no PBR policy exists at the zone level, the PBR policy bound to the VR
associated with the in-interface is applied to the packet.
NOTE: For more information about policy based routing, see Volume 7: Routing.
If PBR is not enabled, the route table lookup finds the interface that leads to the
destination address. In so doing, the interface module identifies the destination
zone to which that interface is bound.
Packet-Flow Sequence 11
Concepts & Examples ScreenOS Reference Guide
The interface module uses the following criteria to determine the destination zone:
If the destination zone is a security zone, that zone is used for the policy
lookup.
If the destination zone is the same as the source zone and intrazone
blocking is disabled for that zone, the security device bypasses steps 6 and
7 and creates a session (step 8). If intrazone blocking is enabled, then the
security device drops the packet.
6. The policy engine searches the policy set lists for a policy between the
addresses in the identified source and destination zones.
The action configured in the policy determines how the security device handles
the packet:
If the action is permit, the security device will forward the packet to its
destination.
If the action is deny, the security device will drop the packet.
If the action is reject, the security device will drop the packet and—if the
protocol is TCP—send a reset (RST) to the source IP address.
If the action is tunnel, the security device will forward the packet to the
VPN module, which encapsulates the packet and transmits it using the
specified VPN tunnel settings.
(If both NAT-dst and NAT-src are specified in the same policy, the security device
first performs NAT-dst and then NAT-src.)
8. The session module creates a new entry in the session table containing the
results of steps 1 through 7.
The security device then uses the information maintained in the session entry
when processing subsequent packets of the same session.
Some typical operations are source address translation, VPN tunnel selection
and encryption, decryption, and packet forwarding.
12 Packet-Flow Sequence
Chapter 1: ScreenOS Architecture
Jumbo Frames
On some devices you can increase throughput by increasing the maximum packet
size, or message transmission unit (MTU), the device can process. Refer to the
installation and configuration guide for your device to find out if it supports jumbo
frames.
Frame size ranges from 1514 through 9830 bytes. To put the device in jumbo frame
mode, set the maximum frame size to a value from1515 through 9830 inclusive, for
example: set envar max-frame-size=9830. Use the unset envar max-frame-size
command to return the device to normal maximum frame size, which is 1514 bytes
(alternatively, you can use the command: set envar max-frame-size=1514). The
maximum frame size does not include the 4-byte frame check sequence at the end
of the frame. You must restart the system for changes to environmental variables to
take effect.
Jumbo Frames 13
Concepts & Examples ScreenOS Reference Guide
Finance
Trust
Eng
Untrust
DMZ
The Trust, Untrust, and DMZ zones are pre-configured. You must define the
Finance, Eng, and Mail zones. By default, a user-defined zone is placed in the
trust-vr routing domain. Thus, you do not have to specify a virtual router for the
Finance and Eng zones. However, in addition to configuring the Mail zone, you must
also specify that it be in the untrust-vr routing domain. You must also shift virtual
router bindings for the Untrust and DMZ zones from the trust-vr to the untrust-vr,
see Figure 10 on page 15.
NOTE: For more information about virtual routers and their routing domains, see
Volume 7: Routing.
Finance Mail
Trust Untrust
Eng DMZ
WebUI
Network > Zones > New: Enter the following, then click OK:
Network > Zones > New: Enter the following, then click OK:
Network > Zones > New: Enter the following, then click OK:
Network > Zones > Edit (for Untrust): Select untrust-vr in the Virtual Router
Name drop-down list, then click OK.
Network > Zones > Edit (for DMZ): Select untrust-vr in the Virtual Router
Name drop-down list, then click OK.
CLI
set zone name finance
set zone name eng
set zone name mail
set zone mail vrouter untrust-vr
set zone untrust vrouter untrust-vr
set zone dmz vrouter untrust-vr
save
Trust Untrust
10.1.1.1/24 1.1.1.1/24
eth3/2 eth1/2
Eng
10.1.3.1/24 DMZ
eth3/1 1.2.2.1/24
eth2/2
WebUI
1. Interface ethernet3/2
Network > Interfaces > Edit (for ethernet3/2): Enter the following, then click
OK:
3. Interface ethernet3/1
Network > Interfaces > Edit (for ethernet3/1): Enter the following, then click
OK:
CLI
1. Interface ethernet3/2
set interface ethernet3/2 zone trust
set interface ethernet3/2 ip 10.1.1.1/24
set interface ethernet3/2 manage ping
set interface ethernet3/2 manage webui
set interface ethernet3/2 manage telnet
set interface ethernet3/2 manage snmp
set interface ethernet3/2 manage ssh
2. Interface ethernet3/2.1
set interface ethernet3/2.1 tag 1 zone finance
set interface ethernet3/2.1 ip 10.1.2.1/24
set interface ethernet3/2.1 manage ping
3. Interface ethernet3/1
set interface ethernet3/1 zone eng
set interface ethernet3/1 ip 10.1.3.1/24
set interface ethernet3/1 manage ping
4. Interface ethernet1/1
set interface ethernet1/1 zone mail
set interface ethernet1/1 ip 1.3.3.1/24
5. Interface ethernet1/1.2
set interface ethernet1/1.2 tag 2 zone mail
set interface ethernet1/1.2 ip 1.4.4.1/24
6. Interface ethernet1/2
set interface ethernet1/2 zone untrust
set interface ethernet1/2 ip 1.1.1.1/24
set interface ethernet1/2 manage snmp
7. Interface ethernet2/2
set interface ethernet2/2 zone dmz
set interface ethernet2/2 ip 1.2.2.1/24
save
trust-vr untrust-vr
Finance
10.1.2.1/24 1.3.3.1/24
VLAN tag 1 eth1/1, Route Mail
eth3/2.1, NAT
1.4.4.1/24
VLAN tag 2
eth1/1.2, Route
Trust Untrust
10.1.1.1/24 1.1.1.1/24
eth3/2, NAT eth1/2, Route
Eng DMZ
10.1.3.1/24 1.2.2.1/24
eth3/1, NAT eth2/2, Route
Route Forwarding
WebUI
Network > Routing > Destination > (select trust-vr) New: Enter the following,
then click OK:
Network > Routing > Destination > (select untrust-vr) New: Enter the
following, then click OK:
CLI
set vrouter trust-vr route 0.0.0.0/0 vrouter untrust-vr
set vrouter untrust-vr route 0.0.0.0/0 interface eth1/2 gateway 1.1.1.254
save
The security device automatically creates the routes shown in Table 1 and Table 2
(except as indicated).
trust-vr trust-vr
routing domain routing domain
Finance
Mail
Policy
Trust Engine Untrust
Eng
DMZ
Route Forwarding
For the purpose of this example, before you begin configuring new policies, you
need to create new service groups.
NOTE: When you create a zone, the security device automatically creates the address Any
for all hosts within that zone. This example makes use of the address Any for the
hosts.
WebUI
1. Service Groups
Policy > Policy Elements > Services > Groups > New: Enter the following,
then click OK:
Select Mail, then use the << button to move that service from the
Available Members column to the Group Members column.
Select Pop3, then use the << button to move that service from the
Available Members column to the Group Members column.
Policy > Policy Elements > Services > Groups > New: Enter the following,
then click OK:
Select HTTP, then use the << button to move that service from the
Available Members column to the Group Members column.
Select FTP-Get, then use the << button to move that service from the
Available Members column to the Group Members column.
2. Policies
Policy > Policies > (From: Finance, To: Mail) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: Mail-Pop3
Action: Permit
Policy > Policies > (From: Trust, To: Mail) New: Enter the following, then click
OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: Mail-Pop3
Action: Permit
Policy > Policies > (From: Eng, To: Mail) New: Enter the following, then click
OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: Mail-Pop3
Action: Permit
Policy > Policies > (From: Untrust, To: Mail) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: Mail
Action: Permit
Policy > Policies > (From: Finance, To: Untrust) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: HTTP-FTPGet
Action: Permit
Policy > Policies > (From: Finance, To: DMZ) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: HTTP-FTPGet
Action: Permit
Policy > Policies > (From: Trust, To: Untrust) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: HTTP-FTPGet
Action: Permit
Policy > Policies > (From: Trust, To: DMZ) New: Enter the following, then click
OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: HTTP-FTPGet
Action: Permit
Policy > Policies > (From: Eng, To: DMZ) New: Enter the following, then click
OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: HTTP-FTPGet
Action: Permit
Policy > Policies > (From: Eng, To: DMZ) New: Enter the following, then click
OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: FTP-Put
Action: Permit
Policy > Policies > (From: Untrust, To: DMZ) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: HTTP-FTPGet
Action: Permit
CLI
1. Service Groups
set group service mail-pop3 add mail
set group service mail-pop3 add pop3
set group service http-ftpget add http
set group service http-ftpget add ftp-get
2. Policies
set policy from finance to mail any any mail-pop3 permit
set policy from trust to mail any any mail-pop3 permit
set policy from eng to mail any any mail-pop3 permit
set policy from untrust to mail any any mail permit
set policy from finance to untrust any any http-ftpget permit
set policy from finance to dmz any any http-ftpget permit
set policy from trust to untrust any any http-ftpget permit
set policy from trust to dmz any any http-ftpget permit
set policy from eng to untrust any any http-ftpget permit
set policy from eng to dmz any any http-ftpget permit
set policy from eng to dmz any any ftp-put permit
set policy from untrust to dmz any any http-ftpget permit
save
A zone can be a segment of network space to which security measures are applied
(a security zone), a logical segment to which a VPN tunnel interface is bound (a
tunnel zone), or either a physical or a logical entity that performs a specific function
(a function zone).
This chapter examines each type of zone, with particular emphasis given to the
security zone. It contains the following sections:
25
Concepts & Examples ScreenOS Reference Guide
To view these zones using the CLI, use the get zone command. See Figure 15 on
page 27.
ID Name) Type) Attr) VR) Default-IF) VSYS) These zones (ID 0 and 10) do not and
cannot have an interface.
0) Null) Null) Shared) untrust-vr) null) Root)
1) Untrust) Sec(L3)) Shared) trust-vr) ethernet1/2) Root)
2) Trust) Sec(L3)) ) trust-vr) ethernet3/2) Root)
3) DMZ) Sec(L3)) ) trust-vr) ethernet2/2) Root) These zones (ID 1-3 and 11-14) provide backward
4) Self) Func) ) trust-vr) self) Root) compatibility when upgrading from a release prior to
5) MGT) Func) ) trust-vr) mgt) Root) ScreenOS 3.1.0—the upper 3 for devices in NAT or
6) HA) Func) ) trust-vr) ha) Root) Route mode, the lower 3 for devices in Transparent
mode.
10) Global) Sec(L3)) ) trust-vr) null) Root)
11) V1-Untrust) Sec(L2)) ) trust-vr) v1-untrust)
12) V1-Trust) Sec(L2)) ) trust-vr) v1-trust) Root)
13) V1-DMZ) Sec(L2)) ) trust-vr) v1-dmz) Root)
14) VLAN) Func) ) trust-vr vlan) Root)
16) Untrust-Tun) Tun) ) trust-vr) null)
-----------------------------------------------------------------------
By default, VPN tunnel interfaces are bound to the Untrust-Tun zone, whose carrier zone
is the Untrust zone. (When upgrading, existing tunnels are bound to the Untrust-Tun zone.)
Zone numbers 7-9 and 15 are reserved for future use.
The preconfigured zones shown in Figure 14 and Figure 15 can be grouped into
four different zone types:
Tunnel: Untrust-Tun
Null: Null
Security Zones
On a single security device, you can configure multiple security zones, dividing the
network into segments to which you can apply various security options to satisfy
the needs of each segment. At a minimum, you must define two security zones,
basically to protect one area of the network from the other. On some security
platforms, you can define many security zones, bringing finer granularity to your
network security design—and without deploying multiple security appliances to do
so.
Global Zone
You can identify a security zone because it has an address book and can be
referenced in policies. The Global zone satisfies these criteria. However, it does not
have one element that all other security zones have—an interface. The Global zone
serves as a storage area for mapped IP (MIP) and virtual IP (VIP) addresses. The
predefined Global zone address “Any” applies to all MIPs, VIPs, and other
user-defined addresses set in the Global zone. Because traffic going to these
addresses is mapped to other addresses, the Global zone does not require an
interface for traffic to flow through it.
The Global zone also contains addresses for use in global policies. For information
about global policies, see “Global Policies” on page 162.
NOTE: Any policy that uses the Global zone as its destination cannot support NAT or
traffic shaping.
SCREEN Options
A Juniper Networks firewall secures a network by inspecting, and then allowing or
denying, all connection attempts that require passage from one security zone to
another. For every security zone, and the MGT zone, you can enable a set of
predefined SCREEN options that detect and block various kinds of traffic that the
security device determines as potentially harmful.
28 Security Zones
Chapter 2: Zones
The security device uses the routing information for the carrier zone to direct traffic
to the tunnel endpoint. The default tunnel zone is Untrust-Tun, and it is associated
with the Untrust zone. You can create other tunnel zones and bind them to other
security zones, with a maximum of one tunnel zone per carrier zone per virtual
system.
NOTE: The root system and all virtual systems can share the Untrust zone. However, each
system has its own separate Untrust-Tun zone.
By default, a tunnel zone is in the trust-vr routing domain, but you can also move a
tunnel zone into another routing domain. See Figure 16.
Outbound traffic enters the tunnel zone via the tunnel interface, is encapsulated, and exits via the security zone interface.
Inbound traffic enters via the security zone interface, is decapsulated in the tunnel zone, and exits via the tunnel interface.
When upgrading from a version of ScreenOS earlier than 3.1.0, existing tunnel
interfaces are bound by default to the preconfigured Untrust-Tun tunnel zone, which
is a “child” of the preconfigured Untrust security zone. You can bind multiple tunnel
zones to the same security zone; however, you cannot bind a tunnel zone to another
tunnel zone.
In this example, you create a tunnel interface and name it tunnel.3. You bind it to
the Untrust-Tun zone, and assign it IP address 3.3.3.3/24. You then define a
mapped IP (MIP) address on tunnel.3, translating 3.3.3.5 to 10.1.1.5, which is the
address of a server in the Trust zone. Both the Untrust zone, which is the carrier
zone for the Untrust-Tun zone, and the Trust zone are in the trust-vr routing domain.
WebUI
1. Tunnel Interface
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
CLI
1. Tunnel Interface
set interface tunnel.3 zone Untrust-Tun
set interface tunnel.3 ip 3.3.3.3/24
2. MIP
set interface tunnel.3 mip 3.3.3.5 host 10.1.1.5
save
NOTE: You cannot delete predefined security zones or the predefined tunnel zone,
although you can edit them.
Creating a Zone
To create a Layer 3 or Layer 2 security zone, or to create a tunnel zone, use either
the WebUI or CLI.
WebUI
Network > Zones > New: Enter the following, then click OK:
Virtual Router Name: Select the virtual router in whose routing domain
you want to place the zone.
Zone Type:
Select Layer 3 to create a zone to which you can bind interfaces in NAT
or Route mode.
Select Tunnel Out Zone when creating a tunnel zone and binding it to
a carrier zone, then select a specific carrier zone from the drop-down
list.
Block Intra-Zone Traffic: Select this option to block traffic between hosts
within the same security zone. By default, intra-zone blocking is disabled.
NOTE: The name of a Layer 2 security zone must begin with “L2-”; for example,
“L2-Corp” or “L2-XNet.”
CLI
set zone name zone [ l2 vlan_id_num | tunnel sec_zone ]
set zone zone block
set zone zone vrouter name_str
save
NOTE: When creating a Layer 2 security zone, the VLAN ID number must be 1 (for
VLAN1).
Modifying a Zone
To modify the name of a security zone or tunnel zone, or to change the carrier zone
for a tunnel zone, you must first delete the zone and then create it again with the
changes. You can change the intra-zone blocking option and the virtual router on an
existing zone.
NOTE: Before you can remove a zone, you must first unbind all interfaces bound to it.
Before you can change the virtual router for a zone, you must first remove any
interfaces bound to it.
WebUI
1. Modifying the Zone Name
Network > Zones: Click Remove (for the security zone or tunnel zone whose
name you want to change or for the tunnel zone whose carrier zone you want
to change).
When the prompt appears, asking for confirmation of the removal, click
Yes.
Network > Zones > New: Enter the zone settings with your changes, then click
OK.
Virtual Router Name: From the drop-down list, select the virtual router into
whose routing domain you want to move the zone.
Block Intra-Zone Traffic: To enable, select the check box. To disable, clear it.
CLI
1. Modifying the Zone Name
unset zone zone
set zone name zone [ l2 vlan_id_num | tunnel sec_zone ]
2. Changing the Intra-Zone Blocking Option or Virtual Router
{ set | unset } zone zone block
set zone zone vrouter name_str
save
Deleting a Zone
For best performance, always save your changes and reboot after deleting a zone.
To delete a security zone or tunnel zone, do either of the following:
WebUI
Network > Zones: Click Remove (for the zone you want to delete).
When the prompt appears, asking for confirmation of the removal, click Yes.
CLI
unset zone zone
save
NOTE: Before you can remove a zone, you must first unbind all interfaces bound to it. To
unbind an interface from a zone, see “Binding an Interface to a Security Zone” on
page 44.
Function Zones
The five function zones are Null, MGT, HA, Self, and VLAN. Each zone exists for a
single purpose, as explained in Table 3.
Zone Description
Null Zone This zone serves as temporary storage for any interfaces that are not bound to
any other zone.
MGT Zone This zone hosts the out-of-band management interface, MGT. You can set firewall
options on this zone to protect the management interface from different types of
attacks. For more information about firewall options, see Volume 4:
Attack Detection and Defense Mechanisms.
HA Zone This zone hosts the high availability interfaces, HA1 and HA2. Although you can
set interfaces for the HA zone, the zone itself cannot be configured.
Self Zone This zone hosts the interface for remote management connections. When you
connect to the security device via HTTP, SCS, or Telnet, you connect to the Self
zone.
VLAN Zone This zone hosts the VLAN1 interface, which you use to manage the device and
terminate VPN traffic when the device is in Transparent mode. You can also set
firewall options on this zone to protect the VLAN1 interface from various attacks.
Function Zones 33
Concepts & Examples ScreenOS Reference Guide
34 Function Zones
Chapter 3
Interfaces
Physical interfaces and subinterfaces allow traffic to enter and exit a security zone.
To allow network traffic to flow in and out of a security zone, you must bind an
interface to that zone and, if it is a Layer 3 zone, assign it an IP address. Then, you
must configure policies to allow traffic to pass from interface to interface between
zones. You can assign multiple interfaces to a zone, but you cannot assign a single
interface to multiple zones.
35
Concepts & Examples ScreenOS Reference Guide
Interface Types
This section describes logical interfaces, function zone interfaces, and tunnel
interfaces. For information about viewing a table of all these interfaces, see
“Viewing Interfaces” on page 43.
Logical Interfaces
The purpose of logical interfaces is to provide an opening through which network
traffic can pass between zones. ScreenOS supports the following types of logical
Interfaces:
Physical Interfaces
Wireless Interfaces
Subinterfaces
Aggregate Interfaces
Redundant Interfaces
Physical Interfaces
The name of a physical interface is composed of the media type, slot number (for
some devices), and index number, for example, ethernet3/2, ethernet0/2, wireless2,
wireless0/2, bgroup2, serial0/0, serial0/2, bri0/0, or adsl0/2. You can bind a physical
interface to any security zone where it acts as a doorway through which traffic
enters and exits the zone. Without an interface, no traffic can enter or leave the
zone.
Wireless Interfaces
A wireless interface, like a physical interface, acts as a doorway through which
traffic enters and exits a security zone. Each wireless security device allows up to
four wireless interfaces (wireless0/0 — wireless0/3) to be active simultaneously.
A wireless interface cannot be bound to the Untrust security zone. (For more
information, see “Wireless Local Area Network” on page 12-125.)
36 Interface Types
Chapter 3: Interfaces
For devices that are preconfigured with bridge groups, there are two different bridge
group numbering systems. On some devices, the preconfigured bgroup interfaces
are identified as bgroup0 through bgroup3. On other devices the preconfigured
bgroup interfaces are identified as bgroup0/0 through bgroup0/2.
You can bind a bridge group interface to any zone. (For more information, see
“Binding an Interface to a Security Zone” on page 44.)
Subinterfaces
A subinterface, like a physical interface, acts as a doorway through which traffic
enters and exits a security zone. You can logically divide a physical interface into
several virtual subinterfaces. Each virtual subinterface borrows the bandwidth it
needs from the physical interface from which it stems, thus its name is an
extension of the physical interface name, for example, ethernet3/2.1 or ethernet0/2.1
You can bind a subinterface to any Layer 3 zone. You can bind a subinterface to the
same zone as its physical interface, or you can bind it to a different zone. (For more
information, see “Binding an Interface to a Security Zone” on page 44.)
Aggregate Interfaces
Some security devices support aggregate interfaces. An aggregate interface is the
accumulation of two or more physical interfaces that share the traffic load directed
to the IP address of the aggregate interface equally among themselves. By using an
aggregate interface, you can increase the amount of bandwidth available to a single
IP address. Also, if one member of an aggregate interface fails, the other member
or members can continue processing traffic—although with less bandwidth than
previously available.
NOTE: For more information about aggregate interfaces, see “Interface Redundancy and
Failover” on page 11-49.
Redundant Interfaces
You can bind two physical interfaces together to create one redundant interface,
which you can then bind to a security zone. One of the two physical interfaces acts
as the primary interface and handles all the traffic directed to the redundant
interface. The other physical interface acts as the secondary interface and stands by
Interface Types 37
Concepts & Examples ScreenOS Reference Guide
in case the active interface experiences a failure. If that occurs, traffic to the
redundant interface fails over to the secondary interface, which becomes the new
primary interface. The use of redundant interfaces provides a first line of
redundancy before escalating a failover to the device level.
NOTE: For more information about redundant interfaces, see “Interface Redundancy and
Failover” on page 11-49.
NOTE: For more information about VSIs and how they function with VSDs in an HA
cluster, see Volume 11: High Availability.
Management Interfaces
On some security devices, you can manage the device through a separate physical
interface—the Management (MGT) interface—moving administrative traffic outside
the regular network user traffic. Separating administrative traffic from network user
traffic greatly increases security and ensures constant management bandwidth.
NOTE: For information about configuring the device for administration, see
“Administration” on page 3-1.
38 Interface Types
Chapter 3: Interfaces
Virtual HA Interfaces
On security devices without a dedicated HA interface, a virtual HA interface
provides the same functionality. Because there is no separate physical port used
exclusively for HA traffic, you must bind the virtual HA interface to one of the
physical ethernet ports. You use the same procedure for binding a network interface
to the HA zone as you do for binding a network interface to a security zone.
Tunnel Interfaces
A tunnel interface acts as a doorway to a VPN tunnel. Traffic enters and exits a VPN
tunnel via a tunnel interface.
When you bind a tunnel interface to a VPN tunnel, you can reference that tunnel
interface in a route to a specific destination and then reference that destination in
one or more policies. With this approach, you can finely control the flow of traffic
through the tunnel. It also provides dynamic routing support for VPN traffic. When
there is no tunnel interface bound to a VPN tunnel, you must specify the tunnel in
the policy itself and choose tunnel as the action. Because the action tunnel implies
permission, you cannot specifically deny traffic from a VPN tunnel.
You can perform policy-based NAT on outgoing or incoming traffic using a pool of
dynamic IP (DIP) addresses in the same subnet as the tunnel interface. A typical
reason for using policy-based NAT on a tunnel interface is to avoid IP address
conflicts between the two sites on either end of the VPN tunnel.
You must bind a route-based VPN tunnel to a tunnel interface so that the security
device can route traffic to and from it. You can bind a route-based VPN tunnel to a
tunnel interface that is either numbered (with IP address/netmask) or unnumbered
(without IP address/netmask). If the tunnel interface is unnumbered, you must
specify an interface from which the tunnel interface borrows an IP address. The
security device only uses the borrowed IP address as a source address when the
security device itself initiates traffic—such as OSPF messages—through the tunnel.
The tunnel interface can borrow the IP address from an interface in the same
security zone or from an interface in a different one as long as both zones are in the
same routing domain.
You can achieve very secure control of VPN traffic routing by binding all the
unnumbered tunnel interfaces to one zone, which is in its own virtual routing
domain, and borrowing the IP address from a loopback interface bound to the same
zone. For example, you can bind all the unnumbered tunnel interfaces to a
user-defined zone named “VPN” and configure them to borrow an IP address from
the loopback.1 interface, also bound to the VPN zone. The VPN zone is in a
user-defined routing domain named “vpn-vr.” You put all destination addresses to
which the tunnels lead in the VPN zone. Your routes to these addresses point to the
tunnel interfaces, and your policies control VPN traffic between other zones and the
VPN zone, see Figure 17.
Interface Types 39
Concepts & Examples ScreenOS Reference Guide
Putting all the tunnel interfaces in such a zone is very secure because there is no
chance for the failure of a VPN, which causes the route to the associated tunnel
interface to become inactive, to redirect traffic intended for tunneling to use a
non-tunneled route—such as the default route. (For several suggestions about how
to avoid such a problem, see “Route-Based Virtual Private Network Security
Considerations” on page 5-81.)
You can also bind a tunnel interface to a tunnel zone. When you do, it must have an
IP address. The purpose of binding a tunnel interface to a tunnel zone is to make
NAT services available for policy-based VPN tunnels. See Figure 18 on page 41.
NOTE: Network Address Translation (NAT) services include dynamic IP (DIP) pools and
mapped IP (MIP) addresses defined in the same subnet as an interface.
40 Interface Types
Chapter 3: Interfaces
When a tunnel interface is in a security zone, you must bind a VPN tunnel to the tunnel interface.
Numbered or Security Doing so allows you to create a route-based VPN configuration. The tunnel interface can be
VPN Tunnel numbered or unnumbered. If it is unnumbered, the tunnel interface borrows the IP address from
Unnumbered
the default interface of the security zone in which you created it.
Zone
Note: Only a tunnel interface with an IP address and netmask can support policy-based NAT.
Security When a numbered tunnel interface is in a security zone and is the only interface in that zone, you
VPN Tunnel
Numbered do not need to create a security zone interface. In this case, the security zone supports VPN
Zone traffic, but no other kind of traffic, via the tunnel interface.
Tunnel VPN Tunnel When a tunnel interface is bound to a tunnel zone, the tunnel interface must have an IP address
Numbered and netmask. This allows you to define DIP pools and MIP addresses on that interface. If you bind
a VPN tunnel to a tunnel zone, you cannot also bind it to a tunnel interface. In such cases, you
Zone must create a policy-based VPN configuration.
Conceptually, you can view VPN tunnels as pipes that you have laid. They extend
from the local device to remote gateways, and the tunnel interfaces are the
openings to these pipes. The pipes are always there, available for use whenever the
routing engine directs traffic to one of their interfaces.
If the tunnel interface does not need to support address translation, and your
configuration does not require the tunnel interface to be bound to a tunnel zone,
you can specify the interface as unnumbered. You must bind an unnumbered
tunnel interface to a security zone; you cannot bind it to a tunnel zone. You must
also specify an interface with an IP address that is in the same virtual routing
domain as the security zone to which the unnumbered interface is bound. The
unnumbered tunnel interface borrows the IP address from that interface.
NOTE: For examples showing how to bind a tunnel interface to a tunnel, see the
route-based VPN examples in “Site-to-Site VPN Configurations” on page 5-90 and
“Dialup Virtual Private Networks” on page 5-169.
If you are transmitting multicast packets through a VPN tunnel, you can enable
Generic Routing Encapsulation (GRE) on the tunnel interfaces to encapsulate
multicast packets in unicast packets. Juniper Networks security devices support
GREv1 for encapsulating IP packets in IPv4 unicast packets. For additional
information about GRE, see “Configuring Generic Routing Encapsulation on Tunnel
Interfaces” on page 7-149.
Interface Types 41
Concepts & Examples ScreenOS Reference Guide
In this example, tunnel interface tunnel.2 is linked to DIP pool 8. DIP pool 8 is
referenced in a policy (ID 10) for VPN traffic from the Trust zone to the Untrust zone
through a VPN tunnel named vpn1. To remove the tunnel interface, you must first
delete the policy (or remove the reference to DIP pool 8 from the policy), and then
the DIP pool. Then, you must unbind tunnel.2 from vpn1. After removing all the
configurations that depend on the tunnel interface, you can then delete it.
WebUI
1. Deleting Policy 10, Which References DIP Pool 8
Policy > Policies (From: Trust, To: Untrust): Click Remove for Policy ID 10.
4. Deleting tunnel.2
Network > Interfaces: Click Remove for tunnel.2.
CLI
1. Deleting Policy 10, Which References DIP Pool 8
unset policy 10
2. Deleting DIP Pool 8, Which Is Linked to tunnel.2
unset interface tunnel.2 dip 8
3. Unbinding tunnel.2 from vpn1
unset vpn vpn1 bind interface
4. Deleting tunnel.2
unset interface tunnel.2
save
42 Interface Types
Chapter 3: Interfaces
Viewing Interfaces
You can view a table that lists all interfaces on your security device. Because they
are predefined, physical interfaces are listed regardless of whether or not you
configure them. Subinterfaces and tunnel interfaces are only listed once you create
and configure them.
To view the interface table in the WebUI, click Network > Interfaces. You can
specify the types of interfaces to display from the List Interfaces drop-down list.
To view the interface table in the CLI, use the get interface command.
The interface table displays the following information about each interface:
IP/Netmask: This field identifies the IP address and netmask address of the
interface.
Zone: This field identifies the zone to which the interface is bound.
Type: This field indicates the interface type: Layer 2, Layer 3, tunnel,
redundant, aggregate, VSI.
Link: This field identifies whether the interface is active (up) or inactive (down).
Viewing Interfaces 43
Concepts & Examples ScreenOS Reference Guide
Creating subinterfaces
Deleting subinterfaces
NOTE: For information about setting traffic bandwidth for an interface, see “Traffic
Shaping” on page 193. For more information about the management and other
services options available per interface, see “Controlling Administrative Traffic” on
page 3-28.
Some security devices allow you to group multiple interfaces. Before adding an
interface to a group, the interface must be set to the Null security zone. After
interfaces are added to a group, the group interface must be assigned to a security
zone for connection to be established.
You can configure Layer 3 interfaces that are bound to security zones to accept or
reject gratuitous ARP (G-ARP) requests and replies. Such interfaces include physical
Ethernet interfaces, subinterfaces, redundant interfaces, aggregate interfaces,
bgroup interfaces, and management (MGT) interfaces. This setting is not supported
on loopback interface, tunnel interface, all serial interfaces (including serial
interface,dialer interface, multilink interface on wan interface), dsl interface, wan
interface (including t1 e1 isdn interface) and wlan interface.
You can, similarly, configure Layer 2 zones such as V1-Trust, V1-Untrust, V1-DMZ or
some user-defined L2-zone and VLANx interface to accept or reject G-ARP requests
and replies.
You can configure an interface to reject G-ARP requests and replies based on your
security concerns. Accepting gratuitous ARP requests and replies might make the
network vulnerable to ARP spoofing attacks. However, you should enable G-ARP in
HA environments where the next upstream or downstream device is also in an HA
configuration and does not use virtual MAC addresses.
If the connected HA device fails, the virtual IP (VIP) shifts to the backup device.
Because the backup device uses its own actual MAC instead of a shared virtual MAC,
to ensure proper forwarding of traffic you should accept G-ARP request from the
connected HA device to understand the change in the network.
WebUI
Network > Interfaces > Edit (for ethernet0/5): Select Trust from the Zone
Name drop-down list, then click Apply.
CLI
set interface ethernet0/5 zone trust
save
In this example, you set ethernet0/3 and ethernet0/4 to be in the Null security zone,
group the interfaces in bgroup1, then bind the group to the DMZ security zone:
WebUI
Network > Interfaces > Edit (for ethernet0/3): Select Null from the Zone Name
drop-down list, then click Apply.
Network > Interfaces > Edit (for ethernet0/4): Select Null from the Zone Name
drop-down list, then click Apply.
Network > Interfaces > Edit (for bgroup1): Select DMZ from the Zone Name
drop-down list, then click Apply.
Network > Interfaces > Edit (for bgroup1): Check ethernet0/3 and
ethernet0/4 in the Bind to Current Bgroup column, then click Apply.
CLI
set interface ethernet0/3 zone null
set interface ehternet0/4 zone null
set interface bgroup1 port ethernet0/3
set interface bgroup1 port ethernet0/4
set interface bgroup1 zone DMZ
save
In this example, ethernet0/3 has the IP address 210.1.1.1/24 and is bound to the
Untrust zone. You set its IP address and netmask to 0.0.0.0/0 and bind it to the Null
zone.
WebUI
Network > Interfaces > Edit (for ethernet0/3): Enter the following, then click
OK:
CLI
set interface ethernet0/3 ip 0.0.0.0/0
set interface ethernet0/3 zone null
save
To unbind an interface from a group and reassign it to a different security zone, the
interface must be released from the bgroup. Releasing the interface from the
bgroup puts the interface in the Null security zone. Once in the Null security zone,
the interface can be bound to any security zone then configured with an IP address.
WebUI
Network > Interfaces > Edit (for bgroup1) > Bind Port: Deselect ethernet0/3
in the Bind to Current Bgroup column, then click Apply.
Network > Interfaces > Edit (for ethernet0/3): Select Trust from the Zone
Name drop-down list, then click Apply.
CLI
unset interface bgroup1 port ethernet0/3
set interface ethernet0/3 zone trust
save
NOTE: For examples of NAT and Route mode configurations, see “Interface Modes” on
page 79.
Public addresses, which Internet service providers (ISPs) supply for use on a
public network like the Internet and which must be unique
NOTE: When you add an IP address to an interface, the security device checks via an ARP
request to make sure that the IP address does not already exist on the local
network. (The physical link must be up at the time.) If the IP address already
exists, a warning is displayed.
Public IP Addresses
If an interface connects to a public network, it must have a public IP address. Also,
if an L3 security zone in the untrust-vr connects to a public network and the
interfaces of zones in the trust-vr are in Route mode, then all the addresses in the
zones in the trust-vr—for interfaces and for hosts—must also be public addresses.
Public IP addresses fall into three classes, A, B, and C, as shown in Table 4.
NOTE: There are also D and E class addresses, which are reserved for special purposes.
An IP address is composed of four octets, each octet being 8 bits long. In a class A
address, the first 8 bits indicate the network ID, and the final 24 bits indicate the
host ID (nnn.hhh.hhh.hhh). In a class B address, the first 16 bits indicate the
network ID, and the final 16 bits indicate the host ID (nnn.nnn.hhh.hhh). In a class
C address, the first 24 bits indicate the network ID, and the final 8 bits indicate the
host ID (nnn.nnn.nnn.hhh).
Through the application of subnet masks (or netmasks), you can further divide
networks. A netmask essentially masks part of the host ID so that the masked part
becomes a subnet of the network ID. For example, the 24-bit mask in the address
10.2.3.4/24 indicates that the first 8 bits (that is, the first octet—010) identify the
network portion of this private class A address, the next 16 bits (that is, the second
and third octets—002.003) identify the subnetwork portion of the address, and the
last 8 bits (the last octet—004) identify the host portion of the address. Using
subnets to narrow large network address spaces into smaller subdivisions greatly
increases the efficient delivery of IP data grams.
Private IP Addresses
If an interface connects to a private network, a local network administrator can
assign it any address, although it is conventional to use an address from the range
of addresses reserved for private use—10.0.0.0/8, 172.16.0.0 – 172.31.255.255,
192.168.0.0/16— as defined in RFC 1918, Address Allocation for Private Internets.
Addressing an Interface
In this example, you assign ethernet0/5 the IP address 210.1.1.1/24 and give it the
Manage IP address 210.1.1.5. (Note that the Manage IP address must be in the
same subnet as the security zone interface IP address.) Finally, you set the interface
in NAT mode, which translates all internal IP addresses to the default interfaces
bound to the other security zones.
NOTE: The default interface in a security zone is the first interface bound to the zone. To
learn which interface is the default interface for a zone, see the Default IF column
on Network > Zones in the WebUI, or the Default-If column in the output from the
get zone command in the CLI.
WebUI
Network > Interfaces > Edit (for ethernet0/5): Enter the following, then click
OK:
IP Address/Netmask: 210.1.1.1/24
Manage IP: 210.1.1.5
CLI
set interface ethernet0/5 ip 210.1.1.1/24
set interface ethernet0/5 manage-ip 210.1.1.5
save
Manage IP address.
(L3 interfaces) Block traffic from coming in and going out the same interface,
including traffic between a primary and secondary subnet or between
secondary subnets (this is done using the CLI set interface command with the
route-deny option).
For physical interfaces on some security devices, you can force the physical state of
the link to be down or up. By forcing the physical state of the link to be down, you
can simulate a disconnect of the cable from the interface port. (This is done with
the CLI set interface command with the phy link-down option.)
WebUI
Network > Interfaces > Edit (for ethernet0/1): Make the following
modifications, then click OK:
CLI
set interface ethernet0/1 manage-ip 10.1.1.12
set interface ethernet0/1 manage ssh
set interface ethernet0/1 manage ssl
unset interface ethernet0/1 manage telnet
unset interface ethernet0/1 manage web
save
NOTE: You can also configure subinterfaces on redundant interfaces and VSIs. For an
example that includes the configuration of a subinterface on a redundant
interface, see “Virtual System Failover” on page 11-96.
In this example, you create a subinterface for the Trust zone in the root system. You
configure the subinterface on ethernet0/1, which is bound to the Trust zone. You
bind the subinterface to a user-defined zone named “accounting,” which is in the
trust-vr. You assign it subinterface ID 3, IP address 10.2.1.1/24, and VLAN tag ID 3.
The interface mode is NAT.
WebUI
Network > Interfaces > New Sub-IF: Enter the following, then click OK:
CLI
set interface ethernet0/1.3 zone accounting
set interface ethernet0/1.3 ip 10.2.1.1/24 tag 3
save
Deleting a Subinterface
You cannot immediately delete a subinterface that hosts mapped IP addresses
(MIPs), virtual IP addresses (VIPs), or dynamic IP (DIP) address pools. Before you
delete a subinterface hosting any of these features, you must first delete any
policies or IKE gateways that reference them. Then you must delete the MIPs, VIPs,
and DIP pools on the subinterface.
WebUI
Network > Interfaces: Click Remove for ethernet0/1.1.
CLI
unset interface ethernet0/1.1
save
NOTE: You cannot set multiple secondary IP addresses for interfaces in the Untrust zone.
Secondary addresses have certain properties that affect how you can implement
such addresses. These properties are as follows:
WebUI
Network > Interfaces > Edit (for ethernet0/1) > Secondary IP: Enter the
following, then click Add:
IP Address/Netmask: 192.168.2.1/24
CLI
set interface ethernet0/1 ip 192.168.2.1/24 secondary
save
You set a backup interface so that the security device can switch traffic over to it in
the event that the primary interface goes down (is unplugged, or fails), destinations
on the primary interface become unreachable, or the tunnel bound to the primary
interface becomes inactive. When the connection through the primary interface is
restored, ScreenOS automatically switches traffic from the backup interface to the
primary. The interface backup feature also provides a way for you manually to force
the primary interface to switch over to the backup, and to force the backup to
switch over to the primary. Each primary interface can have only one backup
interface, and each backup interface can have only one primary.
You can configure the security device to switch over to the backup interface when
any of the following conditions are met on the primary interface:
For the security device to switch traffic over to a backup interface for any of these
reasons, you must first configure the primary interface for that purpose, then
configure the backup interface accordingly. You must also configure two default
routes, one for the primary interface and one for the backup interface. You can
configure the backup interface feature through the WebUI or at the CLI.
IP Tracking
Tunnel-if tracking
Route monitoring
WebUI
1. Configure Interfaces
Network > Interfaces > (for ethernet0/0) Edit > Monitor > Add: Enter the
following, then click Apply:
Network > Interfaces > Backup: Enter the following, then click Apply:
IP Address/Netmask: 0.0.0.0/0
Interface (select): ethernet0/0
Network > Routing > Destination > trust-tr New: Enter the following, then
click Apply:
IP Address/Netmask: 0.0.0.0/0
Interface (select): dialer1
CLI
1. Configure Interfaces
set interface ethernet0/0 monitor track-ip
set interface ethernet0/0 monitor track-ip threshold 100
set interface ethernet0/0 monitor trackip ip 10.1.1.1 interval 2
set interface ethernet0/0 monitor trackip ip 10.1.1.1 threshold 5
set interface ethernet0/0 monitor trackip ip 10.1.1.1 weight 200
set interface ethernet0/0 backup interface dialer1 type track-ip
2. Configure Routes
set route 0.0.0.0/0 interface ether0/0
set route 0.0.0.0/0 interface dialer1
save
You configure both tunnels with the primary Untrust zone interface (ethernet0/0) as
the outgoing interface, and the backup VPN tunnel with the backup Untrust zone
interface (dialer1) as the outgoing interface. The security device monitors the
primary VPN tunnels to determine when to switch over to the backup. It does this
by comparing the backup weight with the VPN monitor threshold. You set the
threshold to 100 (set vpnmonitor threshold 100) and the backup weight to 200 (set
vpn vpn backup-weight 200). When the primary interface becomes inactive for
any reason, ScreenOS compares the VPN monitor threshold with the backup
weight, and if the backup weight is greater than the threshold, it switches the device
to the backup.
You also enable the VPN monitor rekey feature. In the event of a failover, this
feature enables the security device to revert traffic from the backup interface to the
primary if the accumulated weight of the VPN tunnels on the primary interface
becomes greater than the VPN monitor threshold.
The security device in the branch site receives its Untrust zone interfaces address,
default gateway, and DNS server addresses dynamically from two different ISPs.
Each ISP uses a different protocol. ISP-1 uses DHCP to assign an address to
ethernet0/0, and ISP-2 uses PPP to assign an address to dialer1. The security device
at the corporate site has a static IP address (2.2.2.2). The IP address of its default
gateway is 2.2.2.250.
The destination address for VPN monitoring is not the default—the remote gateway
IP address (2.2.2.2)—but the addresses of the server (10.2.2.10). If you use the
remote gateway IP address and it becomes unreachable, the primary tunnel always
switches over to the backup.
NOTE: Because this example is extensive, only the CLI configuration is included in its
entirety. The WebUI section lists the navigational paths to the pages where you can
set the various elements of the configuration. You can see what you need to set by
referring to the CLI commands.
2. Configure VPN
VPNs > AutoKey IKE> New
5. Configure Routes
Network > Routing > Destination > trust-vr
2. Configure Addresses
Policy > Policy Elements > Addresses > List > New
3. Configure VPN
VPNs > AutoKey IKE> New
5. Configure Route
Network > Routing > Destination > trust-vr
6. Configure Policy
Policy > Policies (From Untrust to trust) > New
WebUI
1. Configure Interfaces
Network > Routing > Destination > trust-vr > New: Enter the following, then
click Apply:
IP Address/Netmask: 5.5.5.0/24
Gateway: (select)
Interface: (select) ethernet0/0
Gateway IP Address: 10.10.10.1
Network > Interfaces > Backup: Enter the following, then click Apply:
Gateway: 10.10.10.1
Network > Routing > Destination (for trust-vr) > New: Enter the following,
then click OK:
CLI
set vrouter trust-vr route 5.5.5.0/24 interface ethernet0/0 gateway 10.10.10.1
set interface ethernet0/0 backup interface dialer1 type route vrouter trust-vr
5.5.5.0/24
set route 0.0.0.0/0 interface ethernet0/0 gateway 10.10.10.1
set route 0.0.0.0/0 interface dialer1
save
Loopback Interfaces
A loopback interface is a logical interface that emulates a physical interface on the
security device. However, unlike a physical interface, a loopback interface is always
in the up state as long as the device on which it resides is up. Loopback interfaces
are named loopback.id_num, where id_num is a number greater than or equal to 1
and denotes a unique loopback interface on the device. Like a physical interface,
you must assign an IP address to a loopback interface and bind it to a security zone.
After defining a loopback interface, you can then define other interfaces as
members of its group. Traffic can reach a loopback interface if it arrives through one
of the interfaces in its group. Any interface type can be a member of a loopback
interface group—physical interface, subinterface, tunnel interface, redundant
interface, or VSI.
After creating a loopback interface, you can use it in many of the same ways as a
physical interface:
NOTE: You cannot bind a loopback interface to an HA zone, nor can you configure a
loopback interface for Layer 2 operation or as a redundant/aggregate interface.
You cannot configure the following features on loopback interfaces: NTP, DNS, VIP,
secondary IP, track IP, or WebAuth.
You can define a MIP on a loopback interface. This allows the MIP to be accessed by
a group of interfaces; this capability is unique to loopback interfaces. For
information about using the loopback interface with MIPs, see “MIP and the
Loopback Interface” on page 8-73.
You can manage the security device using either the IP address of a loopback
interface or the manage IP address that you assign to a loopback interface.
58 Loopback Interfaces
Chapter 3: Interfaces
WebUI
Network > Interfaces > New Loopback IF: Enter the following, then click OK:
CLI
set interface loopback.1 zone untrust
set interface loopback.1 ip 1.1.1.27
save
NOTE: The loopback interface is not directly accessible from networks or hosts that
reside in other zones. You must define a policy to permit traffic to and from the
interface.
WebUI
Network > Interfaces > loopback.1 > Edit: Select all the management
options, then click OK:
CLI
set interface loopback.1 manage
save
NOTE: To enable BGP on the loopback interface, you must first create a BGP instance for
the virtual router in which you plan to bind the interface. For information about
configuring BGP on Juniper Networks security devices, See Volume 7: Routing.
WebUI
Network > Interfaces > loopback.1 > Edit: Select Protocol BGP, then click
OK:
CLI
set interface loopback.1 protocol bgp
save
Loopback Interfaces 59
Concepts & Examples ScreenOS Reference Guide
WebUI
Network > Interfaces > New VSI IF: Enter the following, then click OK:
CLI
set interface loopback.1:1 ip 1.1.1.1/24
save
WebUI
Configuration > Report Settings > Syslog: Enter the following, then click
Apply:
CLI
set syslog config 10.1.1.1 log all
set syslog src-interface loopback.1
set syslog enable
save
60 Loopback Interfaces
Chapter 3: Interfaces
State Description
Physically Up For physical ethernet interfaces operating at either Layer 2 (Transparent
mode) or Layer 3 (Route Mode) in the Open Systems Interconnection (OSI)
model. An interface is physically up when it is cabled to another network
device and can establish a link to that device.
Logically Up For both physical interfaces and logical interfaces (subinterfaces, redundant
interfaces, and aggregate interfaces). An interface is logically up when traffic
passing through that interface is able to reach specified devices (at tracked
IP addresses) on a network.
Physically Down An interface is physically down when it is not cabled to another network
device or when it is cabled but cannot establish a link. You can also force an
interface to be physically down with the following CLI command: set
interface interface phy link-down.
Logically Down An interface is logically down when traffic passing through that interface
cannot reach specified devices (at tracked IP addresses) on a network.
The physical state of an interface takes precedence over its logical state. An
interface can be physically up and—at the same time—be either logically up or
logically down. If an interface is physically down, its logical state becomes
irrelevant.
When the state of an interface is up, all routes that make use of that interface
remain active and usable. When the state of an interface is down, the security
device deactivates all routes using that interface—although, depending on whether
the interface is physically or logically down, traffic might still flow through an
interface whose state is down (see “Down Interfaces and Traffic Flow” on page 74).
To compensate for the loss of routes caused by the loss of an interface, you can
configure alternate routes using an alternate interface.
Depending on how you set up the action that an observed interface state change
can cause, a state change from up to down in a monitored interface can cause the
monitoring interface to change its state from down to up. To configure this behavior,
you can use the following CLI command:
When you enter the above command, the security device automatically forces the
monitoring interface into a down state. If the monitored object (tracked IP address,
interface, zone) fails, then the state of the monitoring interface becomes up—either
logically or physically, per your configuration.
An interface can monitor objects for one or more of the following events. See
Figure 21 on page 62. Each of these events by itself or in combination can cause
the state of the monitoring interface to change from up to down and from down to
up:
Physical disconnection/reconnection
IP tracking failure/success
Physical
Disconnection
IP Tracking
Failure
...then the monitoring
interface goes down.
Monitored
Interface Failure
Monitoring
Interface
IP Tracking failures exceed threshold.
Security Zone
Monitored Zone
Failure
You can see the state of an interface in the State column in the output of the get
interface command and in the Link column on Network > Interfaces in the WebUI.
It can be up or down.
You can see the state of a route in the status field of the get route id number
command and on Network > Routing > Destination in the WebUI. If there is an
asterisk, the route is active. If there is no asterisk, it is inactive.
Tracking IP Addresses
The security device can track specified IP addresses through an interface so that
when one or more of them become unreachable, the security device can deactivate
all routes associated with that interface, even if the physical link is still active. A
deactivated route becomes active again after the security device regains contact
with those IP addresses.
NOTE: For some ScreenOS appliances, this action also causes a failover to the backup
interface that is bound to the same zone as the interface on which IP tracking is
configured (see “Interface Failover with IP Tracking” on page 11-56).
ScreenOS uses Layer 3 path monitoring, or IP tracking, similar to that used for
NSRP, to monitor the reachability of specified IP addresses through an interface. For
example, if an interface connects directly to a router, you can track the next-hop
address on the interface to determine if the router is still reachable. When you
configure IP tracking on an interface, the security device sends ping requests on the
interface to up to four target IP addresses at user-defined intervals. The security
device monitors these targets to determine if it receives a response. If there is no
response from a target for a specified number of times, that IP address is deemed to
be unreachable. Failure to elicit a response from one or more targets can cause the
security device to deactivate routes associated with that interface. If another route
to the same destination is available, the security device then redirects traffic to use
the new route.
You can define IP tracking on the following interfaces for which you have
configured a manage IP address:
Physical interface bound to a security zone (not the HA or MGT function zones)
NOTE: The interface can operate at Layer 2 (Transparent mode) or Layer 3 (Route mode).
Subinterface
Redundant interface
Aggregate interface
On devices that support virtual systems, the interface on which you set IP tracking
can belong to the root system or to a virtual system (vsys). However, to set IP
tracking on a shared interface, you can only set it at the root level.
NOTE: From a vsys, you can set interface monitoring to monitor a shared interface from
an interface that belongs to the vsys. However, from within a vsys, you cannot set
interface monitoring from a shared interface. For more information, see “Interface
Monitoring” on page 68.
For each interface, you can configure up to four IP addresses for the security device
to track. On a single device, you can configure up to 64 track IP addresses. That
total includes all track IP addresses whether they are for interface-based IP tracking,
for NSRP-based IP tracking, at the root level, or at the vsys level.
The tracked IP addresses do not have to be in the same subnetwork as the interface.
For each IP address to be tracked, you can specify the following:
Interval, in seconds, at which the pings are sent to the specified IP address.
Weight of the failed IP connection (once the sum of the weights of all failed IP
connections crosses a specified threshold, routes that are associated with the
interface are deactivated).
You can also configure the security device to track the default gateway for an
interface that is a PPPoE or DHCP client. To do that, use the “Dynamic” option:
(CLI) set interface interface monitor dynamic or (WebUI) Network > Interfaces >
Edit (for the DHCP or PPPoE client interface) > Monitor > Track IP > Add: Select
Dynamic.
NOTE: When you configure an IP address for the security device to track, the security
device does not add a host route for that IP address to the routing table.
Failure threshold for IP tracking on the interface — The total weight of the
cumulative failed attempts to reach IP addresses on the interface that causes
routes associated with the interface to be deactivated. You can set this
threshold at any value between 1 and 255. The default value is 1, which means
a failure to reach any configured tracked IP address causes routes associated
with the interface to be deactivated.
In the following example, the interface ethernet0/1 is bound to the Trust zone and
assigned the network address 10.1.1.1/24. The interfaces ethernet0/3 and
ethernet0/4 are bound to the Untrust zone. The ethernet0/3 interface is assigned
the network address 1.1.1.1/24 and is connected to the router at 1.1.1.250. The
ethernet0/4 interface is assigned the network address 2.2.2.1/24 and is connected
to the router at 2.2.2.250. See Figure 22.
10.1.1.0/24 Internet
ethernet0/4 2.2.2.1/24
Router 2.2.2.250
There are two default routes configured: one uses ethernet0/3 as the outbound
interface with the router address 1.1.1.250 as the gateway; the other uses
ethernet0/4 as the outbound interface with the router address 2.2.2.250 as the
gateway and is configured with a metric value of 10. The default route that uses
ethernet0/3 is the preferred route since it has a lower metric (the default metric
value for static routes is 1). The following output from the get route command
shows four active routes for the trust-vr (active routes are denoted with an asterisk).
The default route through ethernet0/3 is active, while the default route through
ethernet0/4 is not active since it is less preferred.
If the route through ethernet0/3 becomes unavailable, the default route through
ethernet0/4 becomes active. You enable and configure IP tracking on the
ethernet0/3 interface to monitor the router address 1.1.1.250. If IP tracking fails to
reach 1.1.1.250, all routes associated with the ethernet0/3 interface become
inactive on the security device. As a result, the default route through ethernet0/4
becomes active. When IP tracking is again able to reach 1.1.1.250, the default route
through ethernet0/3 becomes active and, at the same time, the default route
through ethernet0/4 becomes inactive, because it is less preferred than the default
route through ethernet0/3.
WebUI
Network > Interfaces > Edit (for ethernet0/3) > Monitor: Enter the following,
then click Apply:
CLI
set interface ethernet0/3 monitor track-ip ip 1.1.1.250 weight 10
set interface ethernet0/3 monitor track-ip threshold 5
set interface ethernet0/3 monitor track-ip
save
In the example, the failure threshold for the target address is set to the default value
of 3. That is, if the target does not return a response to three consecutive pings, a
weight of 10 is applied toward the failure threshold for IP tracking on the interface.
Because the failure threshold for IP tracking on the interface is 5, a weight of 10
causes routes associated with the interface to be deactivated on the security device.
You can verify the status of the IP tracking on the interface by issuing the CLI
command get interface ethernet0/3 track-ip, as shown in Figure 24.
The get route command shows that the default route through ethernet0/4 is now
active, while all routes through ethernet0/3 are no longer active.
Note that even though the routes through ethernet0/3 are no longer active, IP
tracking uses the routes associated with ethernet0/3 to continue sending ping
requests to the target IP address. When IP tracking is again able to reach 1.1.1.250,
the default route through ethernet0/3 again becomes active on the security device.
At the same time, the default route through ethernet0/4 becomes inactive, since it is
less preferred than the default route through ethernet0/3.
Interface Monitoring
A security device can monitor the physical and logical state of interfaces and then
take action based on observed changes, see Figure 26. For example, if the state of a
monitored interface changes from up to down, the following can occur, as shown in
Table 6.
If: Then:
The physical state of an The state change might trigger another interface that is monitoring
interface changes from the one that just went down to also go down. You can specify whether
up to down you want the second interface to be physically or logically down.
The state change of either interface going physically down, or the
combined weight of both going physically down together, might
trigger an NSRP failover. An NSRP device or a VSD group failover can
only occur as a result of a change to the physical state of an interface.
The logical state of an The state change might trigger another interface that is monitoring
interface changes from the one that just went down to also go down. Although the first
up to down as the result interface is down logically, you can specify whether you want the
of an IP tracking failure down state of the second interface to be logical or physical.
ethernet0/3 ethernet0/2
IP 1.1.1.1 IP 2.1.1.1
WebUI
Network > Interfaces > Edit (for the interface you want to do the monitoring)
> Monitor > Edit Interface: Enter the following, then click Apply:
CLI
set interface interface1 monitor interface interface2 [ weight number ]
save
If you do not set a weight, the security device applies the default value, 255.
If two interfaces monitor each other, they form a loop. In that case, if either
interface changes state, the other interface in the loop also changes state. See
Figure 27 on page 69.
NOTE: An interface can only be in one loop at a time. We do not support configurations in
which one interface belongs to multiple loops.
NOTE: This example omits the configuration of IP tracking on the ethernet0/1 and
ethernet0/2 interfaces (see “Tracking IP Addresses” on page 63). Without IP
tracking, the only way that ethernet0/1 and ethernet0/2 might fail is if they
become physically disconnected from other network devices or if they cannot
maintain links with those devices.
If you set the monitor failure threshold to 8—or leave it at 16 and set the weight of
each monitored interface to 16—the failure of either ethernet0/1 or ethernet0/2
can cause ethernet0/3 to fail.
Monitored Interfaces:
ethernet0/1, weight 8
ethernet0/2, weight 8
Monitor Failure Threshold: 16
WebUI
Network > Interfaces > Edit (for ethernet0/3) > Monitor > Edit Interface:
Enter the following, then click Apply:
Network > Interfaces > Edit (for ethernet0/3) > Monitor: Enter 16 in the
Monitor Threshold field, then click Apply.
CLI
set interface ethernet0/3 monitor interface ethernet0/1 weight 8
set interface ethernet0/3 monitor interface ethernet0/2 weight 8
set interface ethernet0/3 monitor threshold 16
save
WebUI
1. IP Tracking
Network > Interfaces > Edit (for ethernet0/1) > Monitor: Enter the following,
then click Apply:
NOTE: To control whether the state of an interface becomes logically or physically down
(or up), you must use the CLI command set interface interface monitor threshold
number action { down | up } { logically | physically }. Only physical interfaces
bound to any security zone other than the Null zone can be physically up or down.
> Monitor Track IP ADD: Enter the following, then click Add:
Static: (select)
Track IP: 10.1.1.250
Weight: 8
Interval: 3 Seconds
Threshold: 10
Network > Interfaces > Edit (for ethernet0/3) > Monitor: Enter the following,
then click Apply:
> Monitor Track IP ADD: Enter the following, then click Add:
Static: (select)
Track IP: 1.1.1.250
Weight: 8
Interval: 3 Seconds
Threshold: 10
2. Interface Monitoring
Network > Interfaces > Edit (for ethernet0/1) > Monitor > Edit Interface:
Enter the following, then click Apply:
Network > Interfaces > Edit (for ethernet0/3) > Monitor > Edit Interface:
Enter the following, then click Apply:
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
CLI
1. IP Tracking
set interface ethernet0/1 track-ip ip 10.1.1.250 weight 8
set interface ethernet0/1 track-ip threshold 8
set interface ethernet0/1 track-ip weight 8
set interface ethernet0/1 track-ip
set interface ethernet0/3 track-ip ip 1.1.1.250 weight 8
set interface ethernet0/3 track-ip threshold 8
set interface ethernet0/3 track-ip weight 8
set interface ethernet0/3 track-ip
2. Interface Monitoring
set interface ethernet0/1 monitor interface ethernet0/3 weight 8
set interface ethernet0/1 monitor threshold 8 action down physically
set interface ethernet0/3 monitor interface ethernet0/1 weight 8
set interface ethernet0/3 monitor threshold 8 action down physically
3. Routes
set vrouter trust-vr route 10.1.0.0/16 interface ethernet0/1 gateway 10.1.1.250
metric 10
set vrouter trust-vr route 10.1.0.0/16 interface ethernet0/2 gateway 10.1.2.250
metric 12
set vrouter trust-vr route 0.0.0.0/0 interface ethernet0/3 gateway 1.1.1.250
metric 10
set vrouter trust-vr route 0.0.0.0/0 interface ethernet0/4 gateway 1.1.2.250
metric 12
save
WebUI
Network > Interfaces > Edit (for the interface you want to do the monitoring)
> Monitor > Edit Zone: Enter the following, then click Apply:
CLI
set interface interface monitor zone zone [ weight number ]
If you do not set a weight, the security device applies the default value, 255.
How the security device handles session traffic on such an interface depends upon
the following:
NOTE: “Failure on the Egress Interface” describes how IP tracking triggers routing
changes and how those changes can affect the packet flow through all Juniper
Networks security devices.
NOTE: You must first create two routes to Host B, and both the egress interfaces must be
in the same zone so that the same policy applies to traffic before and after the
rerouting occurs.
2
Untrust Zone
Trust Zone Session Route Policy
Lookup Lookup Lookup
10.1.1.1/24 3 Host B
10.1.1.0/24
4
1
Host A Responder
10.1.1.5 Initiator
When Host B replies to Host A, the return traffic follows a similar path back through
the security device, as shown in Figure 31.
3 Untrust Zone
Trust Zone Session
Update
10.1.1.1/24
10.1.1.0/24
2 Host B
2.2.2.2
1
4
Host A Responder
10.1.1.5 Initiator
If IP tracking on ethernet0/2 fails, the security device deactivates routes that use
ethernet0/2 and uses ethernet0/3 for outbound traffic to Host B. However, replies
from Host B to Host A can arrive through either ethernet0/2 or ethernet0/3 and the
security device forwards them through ethernet0/1 to Host A. See Figure 32.
1
Untrust Zone
Trust Zone Route Session
Change Update
10.1.1.1/24 3
10.1.1.0/24 4 Host B
2.2.2.2
2
Responder
Host A
10.1.1.5 Initiator
Gateways:
Second Egress Interface 1.1.1.254
ethernet0/3 1.1.2.254
1.1.2.1/24
Untrust Zone
Trust Zone Policy Route Session
Lookup Lookup Lookup
10.1.1.1/24 Host B
10.1.1.0/24
1 2.2.2.2
3
Host A Initiator
10.1.1.5 Responder
Gateways:
1.1.1.254
Second Ingress Interface 1.1.2.254
ethernet0/3
1.1.2.1/24
When Host A replies to Host B, the return traffic follows a similar path back through
the security device, as shown in Figure 34.
2 Untrust Zone
Trust Zone Session
Lookup
10.1.1.1/24 3 Host B
10.1.1.0/24
4 2.2.2.2
1
Host A Initiator
10.1.1.5
Responder
4. When the gateway at 1.1.1.254 receives the reply, it forwards it to its next hop. Routing continues until Host B receives it.
If IP tracking on ethernet0/2 fails, the security device deactivates routes that use
ethernet0/2 and uses ethernet0/3 for outbound traffic to Host B. However, requests
from Host B to Host A can still arrive through ethernet0/2 and the security device
still forwards them to Host A through ethernet0/1. The data flow for requests from
Host B to Host A looks the same after an IP tracking failure as it did before.
However, the replies from Host A can take one of two different paths, depending on
the application of the set arp always-on-dest command.
If you set the command set arp always-on-dest, the security device sends an ARP
request for the destination MAC address when processing the reply to the first
packet in a session or when a route change occurs. (When this command is unset,
the security device caches the session initiator’s MAC address and uses that when
processing replies. By default, this command is unset).
When IP tracking on ethernet0/2 fails, the security device first deactivates all routes
using ethernet0/2 and then does a route lookup. It finds another route to reach
Host B through ethernet0/3 and the gateway at 1.1.2.254. It then scans its session
table and redirects all sessions to the new route. If you have the set arp
always-on-dest command enabled, the security device does an ARP lookup when it
receives the next packet from Host A because it is in a session affected by the route
change. Despite the ingress interface on which packets from Host B arrive, the
security device sends all further replies from Host A through ethernet0/3 to the
gateway at 1.1.2.254. See Figure 35 on page 78.
1 2
Untrust Zone
Trust Zone Route Session
Change Update
10.1.1.1/24 Host B
10.1.1.0/24 2.2.2.2
3
Host A Initiator
10.1.1.5 Responder
Gateways:
1.1.1.254
Second Ingress Interface 1.1.2.254
ethernet0/3
1.1.2.1/24
If you have set the command unset arp always-on-dest (which is the default
configuration), the security device uses the MAC address for the gateway at 1.1.1.1
that it cached when Host B sent the initial session packet. The security device
continues to send session replies through ethernet0/2. In this case, the IP tracking
failure caused no change in the flow of data through the security device.
2
Untrust Zone
Trust Zone Session
Update
10.1.1.1/24 3
10.1.1.0/24 4 Host B
2.2.2.2
Second Ingress Interface
1 ethernet0/3
1.1.2.1/24
Host A
10.1.1.5 Responder Gateways:
Initiator 1.1.1.254
1.1.2.254
Interfaces can operate in three different modes: Network Address Translation (NAT),
Route, and Transparent. If an interface bound to a Layer 3 zone has an IP address,
you can define the operational mode for that interface as either NAT or Route. An
interface bound to a Layer 2 zone (such as the predefined v1-trust, v1-untrust, and
v1-dmz zones, or a user-defined Layer 2 zone) must be in Transparent mode. You
select an operational mode when you configure an interface.
NOTE: Although you can define the operational mode for an interface bound to any
Layer 3 zone as NAT, the security device only performs NAT on traffic passing
through that interface en route to the Untrust zone. ScreenOS does not perform
NAT on traffic destined for any zone other than the Untrust zone. Also, note that
ScreenOS allows you to set an Untrust zone interface in NAT mode, but doing so
activates no NAT operations.
79
Concepts & Examples ScreenOS Reference Guide
Transparent Mode
When an interface is in Transparent mode, the security device filters packets
traversing the firewall without modifying any of the source or destination
information in the IP packet header. All interfaces behave as though they are part of
the same network, with the security device acting much like a Layer 2 switch or
bridge. In Transparent mode, the IP addresses of interfaces are set at 0.0.0.0,
making the presence of the security device transparent (invisible) to users. See
Figure 37.
209.122.30.3
209.122.30.2
209.122.30.2 209.122.30.4
209.122.30.1
209.122.30.5
Trust Zone
Switch
Public
Address
Space
Untrust Zone
External Router
To Internet
80 Transparent Mode
Chapter 4: Interface Modes
Zone Settings
By default, ScreenOS creates one function zone, the VLAN zone, and three L2
security zones: V1-Trust, V1-Untrust, and V1-DMZ.
VLAN Zone
The VLAN zone hosts the VLAN1 interface, which has the same configuration and
management abilities as a physical interface. When the security device is in
Transparent mode, you use the VLAN1 interface for managing the device and
terminating VPN traffic. You can configure the VLAN1 interface to permit hosts in
the L2 security zones to manage the device. To do that, you must set the VLAN1
interface IP address in the same subnet as the hosts in the L2 security zones.
For management traffic, the VLAN1 Manage IP takes precedence over the VLAN1
interface IP. You can set the VLAN1 Manage IP for management traffic and dedicate
the VLAN1 interface IP solely for VPN tunnel termination.
As stated in the previous section, when the device is in transparent mode, you use
the VLAN1 interface to manage the device. For management traffic to reach the
VLAN1 interface, you must enable the management options on the VLAN1 interface
and on the zone(s) through which the management traffic passes. By default, all
management options are enabled in the V1-Trust zone. To enable hosts in other
zones to manage the device, you must set those options on the zones to which they
belong.
NOTE: To see which physical interfaces are prebound to the L2 zones for each Juniper
Networks security platform, refer to the installation and configuration guide for
that platform.
Traffic Forwarding
A security device operating at Layer 2 (L2) does not permit any inter-zone traffic
unless there is a policy configured on the device. For more information about
setting policies, see “Policies” on page 2-159. After you configure a policy on the
security device, it does the following:
Allows ARP and L2 non-IP multicast and broadcast traffic. The security device
can then receive and pass L2 broadcast traffic for the spanning tree protocol.
Continues to block all non-IP and non-ARP unicast traffic and IPSec traffic.
Transparent Mode 81
Concepts & Examples ScreenOS Reference Guide
To block all L2 non-IP and non-ARP traffic, including multicast and broadcast
traffic, enter the unset interface vlan1 bypass-non-ip-all command.
To allow all L2 non-IP traffic to pass through the device, enter the set interface
vlan1 bypass-non-ip command.
To revert to the default behavior of the device, which is to block all non-IP and
non-ARP unicast traffic, enter the unset interface vlan1 bypass-non-ip
command.
NOTE: A security device with interfaces in Transparent mode requires routes for two
purposes: to direct self-initiated traffic, such as SNMP traps, and to forward VPN
traffic after encapsulating or decapsulating it.
As ARP traffic passes through a security device in Transparent mode, the device
notes the source MAC address in each packet and learns which interface leads to
that MAC address. In fact, the security device learns which interface leads to which
MAC address by noting the source MAC addresses in all packets it receives. It then
stores this information in its forwarding table.
82 Transparent Mode
Chapter 4: Interface Modes
NOTE: A security device in Transparent mode does not permit any traffic between zones
unless there is a policy configured on the device. For more information about how
the device forwards traffic when it is in Transparent mode, see “Traffic
Forwarding” on page 81.
The situation can arise when a device sends a unicast packet with a destination
MAC address, which it has in its ARP cache, but which the security device does not
have in its forwarding table. For example, the security device clears its forwarding
table every time it reboots. (You can also clear the forwarding table with the CLI
command clear arp.) When a security device in Transparent mode receives a
unicast packet for which it has no entry in its forwarding table, it can follow one of
two courses:
After doing a policy lookup to determine the zones to which traffic from the
source address is permitted, flood the initial packet out the interfaces bound to
those zones, and then continue using whichever interface receives a reply. This
is the Flood option, which is enabled by default.
Drop the initial packet, flood ARP queries (and, optionally, trace-route packets,
which are ICMP echo requests with the time-to-live value set to 1) out all
interfaces (except the interface at which the packet arrived), and then send
subsequent packets through whichever interface receives an ARP (or
trace-route) reply from the router or host whose MAC address matches the
destination MAC address in the initial packet. The trace-route option allows the
security device to discover the destination MAC address when the destination
IP address is in a nonadjacent subnet.
Flood Method
The flood method forwards packets in the same manner as most Layer 2 switches.
A switch maintains a forwarding table that contains MAC addresses and associated
ports for each Layer 2 domain. The table also contains the corresponding interface
through which the switch can forward traffic to each device. Every time a packet
arrives with a new source MAC address in its frame header, the switch adds the
MAC address to its forwarding table. It also tracks the interface at which the packet
arrived. If the destination MAC address is unknown to the switch, the switch
duplicates the packet and floods it out all interfaces (other than the interface at
which the packet arrived). It learns the previously unknown MAC address and its
corresponding interface when a reply with that MAC address arrives at one of its
interfaces.
When you enable the flood method and the security device receives an ethernet
frame with a destination MAC address that is not listed in the security device MAC
table, it floods the packet out all interfaces.
Transparent Mode 83
Concepts & Examples ScreenOS Reference Guide
Packet arrives at
ethernet0/1. V1-DMZ
Router Zone
V1-Trust Zone
ethernet0/2 ethernet0/3
IP 0.0.0.0/0 IP 0.0.0.0/0
The security device floods the packet out ethernet0/2 but receives no reply.
To enable the flood method for handling unknown unicast packets, do either of the
following:
WebUI
Network > Interfaces > Edit (for VLAN1): For the broadcast options, select
Flood, then click OK:
CLI
set interface vlan1 broadcast flood
save
ARP/Trace-Route Method
When you enable the ARP method with the trace-route option and the security
device receives an ethernet frame with a destination MAC address that is not listed
in its MAC table, the security device performs the following series of actions:
NOTE: When you enable the ARP method, the trace-route option is enabled by default.
You can also enable the ARP method without the trace-route option. However, this
method only allows the security device to discover the destination MAC address
for a unicast packet if the destination IP address is in the same subnet as the
ingress IP address. (For more information about the ingress IP address, see the
following Note.)
1. The security device notes the destination MAC address in the initial packet
(and, if it is not already there, adds the source MAC address and its
corresponding interface to its forwarding table).
84 Transparent Mode
Chapter 4: Interface Modes
3. The security device generates two packets—ARP query (arp-q) and a trace-route
(an ICMP echo request, or PING) with a time-to-live (TTL) field of 1—and floods
those packets out all interfaces except the interface at which the initial packet
arrived. For the arp-q packets and ICMP echo requests, the security device uses
the source and destination IP addresses from the initial packet. For arp-q
packets, the security device replaces the source MAC address from the initial
packet with the MAC address for VLAN1, and it replaces the destination MAC
address from the initial packet with ffff.ffff.ffff. For the trace-route option, the
security device uses the source and destination MAC addresses from the initial
packet in the ICMP echo requests that it broadcasts.
NOTE: The ingress IP address refers to the IP address of the last device to send the packet
to the security device. This device might be the source that sent the packet or a
router forwarding the packet.
NOTE: Actually, the trace-route returns the IP and MAC addresses of all the routers in the
subnet. The security device then matches the destination MAC address from the
initial packet with the source MAC address on the arp-r packets to determine
which router to target, and consequently, which interface to use to reach that
target.
4. Combining the destination MAC address gleaned from the initial packet with
the interface leading to that MAC address, the security device adds a new entry
to its forwarding table.
5. The security device forwards all subsequent packets it receives out the correct
interface to the destination.
WebUI
Network > Interfaces > Edit (for VLAN1): For the broadcast options, select
ARP, then click OK:
CLI
set interface vlan1 broadcast arp
save
Transparent Mode 85
Concepts & Examples ScreenOS Reference Guide
NOTE: The trace-route option is enabled by default. If you want to use ARP without the
trace-route option, enter the following command: unset interface vlan1
broadcast arp trace-route. This command unsets the trace-route option but does
not unset ARP as the method for handling unknown unicast packets.
Figure 39 shows how the ARP method can locate the destination MAC when the
destination IP address is in an adjacent subnet.
86 Transparent Mode
Chapter 4: Interface Modes
Figure 40 shows how the trace-route option can locate the destination MAC when
the destination IP address is in a nonadjacent subnet.
Enable Web, Telnet, SSH, and Ping on both the VLAN1 interface and the
V1-Trust security zone.
NOTE: By default, ScreenOS enables the management options for the VLAN1 interface
and V1-Trust security zone. Enabling these options is included in this example for
illustrative purposes only. Unless you have previously disabled them, you really do
not need to enable them manually.
To manage the device from a Layer 2 security zone, you must set the same
management options for both the VLAN1 interface and the Layer 2 security zone.
Transparent Mode 87
Concepts & Examples ScreenOS Reference Guide
Add a route in the trust virtual router (all Layer 2 security zones are in the
trust-vr routing domain) to enable management traffic to flow between the
security device and an administrative workstation beyond the immediate
subnet of the security device. All security zones are in the trust-vr routing
domain.
Internet
VLAN1 IP
V1-Trust Zone 1.1.1.1/24 V1-Untrust Zone
WebUI
1. VLAN1 Interface
Network > Interfaces > Edit (for VLAN1): Enter the following, then click OK:
IP Address/Netmask: 1.1.1.1/24
Management Services: WebUI, Telnet, SSH (select)
Other Services: Ping (select)
2. V1-Trust Zone
Network > Zones > Edit (for V1-Trust): Select the following, then click OK:
CLI
1. VLAN1 Interface
set interface vlan1 ip 1.1.1.1/24
set interface vlan1 manage web
set interface vlan1 manage telnet
set interface vlan1 manage ssh
set interface vlan1 manage ping
88 Transparent Mode
Chapter 4: Interface Modes
2. V1-Trust Zone
set zone v1-trust manage web
set zone v1-trust manage telnet
set zone v1-trust manage ssh
set zone v1-trust manage ping
3. Route
set vrouter trust-vr route 1.1.2.0/24 interface vlan1 gateway 1.1.1.251 metric 1
save
To increase the security of management traffic, you change the HTTP port number
for WebUI management from 80 to 5555, and the Telnet port number for CLI
management from 23 to 4646. You use the VLAN1 IP address—1.1.1.1/24—to
manage the security device from the V1-Trust security zone. You define addresses
for the FTP and mail servers. You also configure a default route to the external
router at 1.1.1.250, so that the security device can send outbound VPN traffic to it.
(The default gateway on all hosts in the V1-Trust zone is also 1.1.1.250.)
NOTE: For an example of configuring a VPN tunnel for a security device with interfaces in
Transparent mode, see “Transparent Mode VPN” on page 5-161.
1.1.1.0/24
Address space
Internet
VLAN1 IP
V1-Trust Zone 1.1.1.1/24 V1-Untrust Zone
Transparent Mode 89
Concepts & Examples ScreenOS Reference Guide
WebUI
1. VLAN1 Interface
Network > Interfaces > Edit (for the VLAN1 interface): Enter the following,
then click OK:
IP Address/Netmask: 1.1.1.1/24
Management Services: WebUI, Telnet (select)
Other Services: Ping (select)
2. HTTP Port
Configuration > Admin > Management: In the HTTP Port field, type 5555 and
then click Apply.
NOTE: The default port number is 80. Changing this to any number between 1024 and
32,767 is advised for discouraging unauthorized access to the configuration.
When logging in to manage the device later, enter the following in the URL field of
your browser: http://1.1.1.1:5555.
3. Interfaces
Network > Interfaces > Edit (for ethernet0/1): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet0/3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
90 Transparent Mode
Chapter 4: Interface Modes
6. Route
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: Any
Action: Permit
Policy > Policies > (From: V1-Untrust, To: V1-Trust) New: Enter the following,
then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Mail_Server
Service: Mail
Action: Permit
Policy > Policies > (From: V1-Untrust, To: V1-Trust) New: Enter the following,
then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), FTP_Server
Service: FTP-GET
Action: Permit
CLI
1. VLAN1
set interface vlan1 ip 1.1.1.1/24
set interface vlan1 manage web
set interface vlan1 manage telnet
set interface vlan1 manage ping
2. Telnet
set admin telnet port 4646
NOTE: The default port number for Telnet is 23. Changing this to any number between
1024 and 32,767 is advised for discouraging unauthorized access to the
configuration. When logging in to manage the device later via Telnet, enter the
following address: 1.1.1.1 4646.
Transparent Mode 91
Concepts & Examples ScreenOS Reference Guide
3. Interfaces
set interface ethernet0/1 ip 0.0.0.0/0
set interface ethernet0/1 zone v1-trust
set interface ethernet0/3 ip 0.0.0.0/0
set interface ethernet0/3 zone v1-untrust
4. V1-Trust Zone
set zone v1-trust manage web
set zone v1-trust manage telnet
set zone v1-trust manage ping
5. Addresses
set address v1-trust FTP_Server 1.1.1.5/32
set address v1-trust Mail_Server 1.1.1.10/32
6. Route
set vrouter trust-vr route 0.0.0.0/0 interface vlan1 gateway 1.1.1.250 metric 1
7. Policies
set policy from v1-trust to v1-untrust any any any permit
set policy from v1-untrust to v1-trust any Mail_Server mail permit
set policy from v1-untrust to v1-trust any FTP_Server ftp-get permit
save
NAT Mode
When an ingress interface is in Network Address Translation (NAT) mode, the
security device, acting like a Layer 3 switch (or router), translates two components
in the header of an outgoing IP packet destined for the Untrust zone: its source IP
address and source port number. The security device replaces the source IP address
of the originating host with the IP address of the Untrust zone interface. Also, it
replaces the source port number with another random port number generated by
the security device.
92 NAT Mode
Chapter 4: Interface Modes
10.1.1.15
10.1.1.10 10.1.1.20
10.1.1.5
10.1.1.25
Trust Zone
Untrust Zone
Public Address Interface
Space 1.1.1.1/24
External Router
1.1.1.250
Untrust Zone
Internet
When the reply packet arrives at the security device, the device translates two
components in the IP header of the incoming packet: the destination address and
port number, which are translated back to the original numbers. The security device
then forwards the packet to its destination.
NAT adds a level of security not provided in Transparent mode: The addresses of
hosts sending traffic through an ingress interface in NAT mode (such as a Trust zone
interface) are never exposed to hosts in the egress zone (such as the Untrust zone)
unless the two zones are in the same virtual routing domain and the security device
is advertising routes to peers through a dynamic routing protocol (DRP). Even then,
the Trust zone addresses are only reachable if you have a policy permitting inbound
traffic to them. (If you want to keep the Trust zone addresses hidden while using a
DRP, then put the Untrust zone in the untrust-vr and the Trust zone in the trust-vr,
and do not export routes for internal addresses in the trust-vr to the untrust-vr.)
If the security device uses static routing and just one virtual router, the internal
addresses remain hidden when traffic is outbound, due to interface-based NAT. The
policies you configure control inbound traffic. If you use only mapped IP (MIP) and
virtual IP (VIP) addresses as the destinations in your inbound policies, the internal
addresses still remain hidden.
NAT Mode 93
Concepts & Examples ScreenOS Reference Guide
10.0.0.0 – 10.255.255.255
172.16.0.0 – 172.31.255.255
192.168.0.0 – 192.168.255.255
NOTE: You can define a virtual IP (VIP) address only on an interface bound to the Untrust
zone.
NOTE: For more information about MIPs, see “Mapped IP Addresses” on page 8-63. For
more about VIPs, see “Virtual IP Addresses” on page 8-80.
94 NAT Mode
Chapter 4: Interface Modes
Interface Settings
For NAT mode, define the following interface settings, where ip_addr1 and ip_addr2
represent numbers in an IP address, mask represents the numbers in a netmask,
vlan_id_num represents the number of a VLAN tag, zone represents the name of a
zone, and number represents the bandwidth size in kbps:
1.You can set the manage IP address for each interface. Its primary purpose is to provide an IP
address for administrative traffic separate from network traffic. You can also use the manage IP
address for accessing a specific device when it is in a high availability configuration.
2.Optional setting for traffic shaping.
3.Selecting NAT defines the interface mode as NAT. Selecting Route defines the interface mode as
Route.
4.Although you are able to select NAT as the interface mode on an interface bound to the Untrust
zone, the security device does not perform any NAT operations on that interface.
NOTE: In NAT mode, you can manage a security device from any interface—and from
multiple interfaces—using the system IP address, interface IP addresses, manage
IP addresses, or the MGT IP address.
NOTE: Compare Figure 45 with that for Route mode in Figure 47, “Device in Route
Mode,” on page 99.
Mail Server
Internet
VIP 1.1.1.5 ->
10.1.1.5
ethernet0/1 ethernet0/3
Trust Zone Untrust Zone
10.1.1.1/24 1.1.1.1/24
NAT Mode Route Mode
NAT Mode 95
Concepts & Examples ScreenOS Reference Guide
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet0/1): Enter the following, then click
Apply:
NOTE: By default, any interface that you bind to the Trust zone is in NAT mode.
Consequently, this option is already enabled for interfaces bound to the Trust
zone.
Network > Interfaces > Edit (for ethernet0/3): Enter the following, then click
OK:
NOTE: If the IP address in the Untrust zone on the security device is dynamically
assigned by an ISP, leave the IP address and netmask fields empty and select
Obtain IP using DHCP. If the ISP uses Point-to-Point Protocol over Ethernet, select
Obtain IP using PPPoE, click the Create new PPPoE settings link, and enter the
name and password.
2. VIP
Network > Interfaces > Edit (for ethernet0/3) > VIP: Enter the following, then
click Add:
Network > Interfaces > Edit (for ethernet0/3) > VIP > New VIP Service: Enter
the following, then click OK:
Virtual Port: 25
Map to Service: Mail
Map to IP: 10.1.1.5
NOTE: For information about virtual IP (VIP) addresses, see “Virtual IP Addresses” on
page 8-80.
3. Route
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
96 NAT Mode
Chapter 4: Interface Modes
4. Policies
Policy > Policies > (From: Trust, To: Untrust) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: ANY
Action: Permit
Policy > Policies > (From: Untrust, To: Global) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), VIP(1.1.1.5)
Service: MAIL
Action: Permit
CLI
1. Interfaces
set interface ethernet0/1 zone trust
set interface ethernet0/1 ip 10.1.1.1/24
set interface ethernet0/1 nat
set interface ethernet0/3 zone untrust
set interface ethernet0/3 ip 1.1.1.1/24
set interface ethernet0/3 route
NOTE: The set interface ethernetn nat command determines that the security device
operates in NAT mode.
2. VIP
set interface ethernet0/3 vip 1.1.1.5 25 mail 10.1.1.5
3. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet0/3 gateway 1.1.1.250
4. Policies
set policy from trust to untrust any any any permit
set policy from untrust to global any vip(1.1.1.5) mail permit
save
NAT Mode 97
Concepts & Examples ScreenOS Reference Guide
Route Mode
When an interface is in Route mode, the security device routes traffic between
different zones without performing source NAT (NAT-src); that is, the source address
and port number in the IP packet header remain unchanged as it traverses the
security device. Unlike NAT-src, you do not need to establish mapped IP (MIP) and
virtual IP (VIP) addresses to allow inbound traffic to reach hosts when the
destination zone interface is in Route mode. Unlike Transparent mode, the
interfaces in each zone are on different subnets.
1.1.1.5
1.1.1.25
Trust Zone
Public Address
Space Trust Zone
Interface
1.1.1.1/24
Untrust Zone
Public Address Interface
Space 2.2.2.2/24
External Router
2.2.2.250
Untrust Zone
Internet
You do not have to apply Source Network Address Translation (NAT-src) at the
interface level so that all source addresses initiating outgoing traffic get translated to
the IP address of the destination zone interface. Instead, you can perform NAT-src
selectively at the policy level. You can determine which traffic to route and on
which traffic to perform NAT-src by creating policies that enable NAT-src for
specified source addresses on either incoming or outgoing traffic. For network
traffic, NAT can use the IP address or addresses of the destination zone interface
from a dynamic IP (DIP) pool, which is in the same subnet as the destination zone
interface. For VPN traffic, NAT can use a tunnel interface IP address or an address
from its associated DIP pool.
NOTE: For more information about configuring policy-based NAT-src, see “Source
Network Address Translation” on page 8-13.
98 Route Mode
Chapter 4: Interface Modes
Interface Settings
For Route mode, define the following interface settings, where ip_addr1 and
ip_addr2 represent numbers in an IP address, mask represents the numbers in a
netmask, vlan_id_num represents the number of a VLAN tag, zone represents the
name of a zone, and number represents the bandwidth size in kbps:
1.You can set the manage IP address for each interface. Its primary purpose is to provide an IP
address for administrative traffic separate from network traffic. You can also use the manage IP
address for accessing a specific device when it is in a high availability configuration.
2.Optional setting for traffic shaping.
3.Selecting Route defines the interface mode as Route. Selecting NAT defines the interface mode
as NAT.
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet0/1): Enter the following, then click
Apply:
Route Mode 99
Concepts & Examples ScreenOS Reference Guide
Network > Interfaces > Edit (for ethernet0/3): Enter the following, then click
OK:
NOTE: Selecting Route determines that the security device operates in Route mode,
without performing NAT on traffic entering or exiting the Trust zone.
2. Address
Policy > Policy Elements > Addresses > List > New: Enter the following and
then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: ANY
Action: Permit
Policy > Policies > (From: Untrust, To: Trust) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Mail Server
Service: MAIL
Action: Permit
CLI
1. Interfaces
set interface ethernet0/1 zone trust
set interface ethernet0/1 ip 1.2.2.1/24
set interface ethernet0/1 route
set interface ethernet0/3 zone untrust
set interface ethernet0/3 ip 1.1.1.1/24
set interface ethernet0/3 route
NOTE: The set interface ethernet number route command determines that the security
device operates in Route mode.
2. Address
set address trust mail_server 1.2.2.5/24
3. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet0/3 gateway 1.1.1.250
4. Policies
set policy from trust to untrust any any any permit
set policy from untrust to trust any mail_server mail permit
save
This chapter discusses the components, or building blocks, that you can reference
in policies. It contains the following sections:
NOTE: For information about user authentication, see Volume 9: User Authentication.
Addresses
ScreenOS classifies the addresses of all other devices by location and by netmask.
Each zone possesses its own list of addresses and address groups.
Because an individual host has a single IP address defined, it must have a netmask
setting of 255.255.255.255 (which masks out all but this host). Subnets have an IP
address and a netmask (for example, 255.255.255.0 or 255.255.0.0).
A wildcard address contains a range of address, enabling you to reduce the number
of policies that you create. A wildcard address has an IP address and a wildcard
mask (for example, 0.0.255.0). For more information on wildcard addresses, see
“Wildcard Addresses” on page 166.
Before you can configure policies to permit, deny, or tunnel traffic to and from
individual hosts and subnets, you must make entries for them in ScreenOS address
lists, which are organized by zones.
NOTE: You do not have to make address entries for “Any.” This term automatically
applies to all devices physically located within their respective zones.
Addresses 103
Concepts & Examples ScreenOS Reference Guide
Address Entries
Before you can set up many of the Juniper Networks firewall, VPN, and traffic
shaping features, you need to define addresses in one or more address lists. The
address list for a security zone contains the IP addresses or domain names of hosts
or subnets whose traffic is either allowed, blocked, encrypted, or
user-authenticated.
NOTE: Before you can use domain names for address entries, you must configure the
security device for Domain Name System (DNS) services. For information about
DNS configuration, see “Domain Name System Support” on page 217.
Adding an Address
In this example, you add the subnet “Sunnyvale_Eng” with the IP address
10.1.10.0/24 as an address in the Trust zone, and the address www.juniper.net as an
address in the Untrust zone.
WebUI
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
CLI
set address trust Sunnyvale_Eng 10.1.10.0/24
set address untrust Juniper www.juniper.net
save
104 Addresses
Chapter 5: Building Blocks for Policies
Modifying an Address
In this example, you change the address entry for the address “Sunnyvale_Eng” to
reflect that this department is specifically for software engineering and has a
different IP address—10.1.40.0/24.
WebUI
Policy > Policy Elements > Addresses > List > Edit (for Sunnyvale_Eng):
Change the name and IP address to the following, then click OK:
CLI
unset address trust Sunnyvale_Eng
set address trust Sunnyvale_SW_Eng 10.1.40.0/24
save
NOTE: After you define an address—or an address group—and associate it with a policy,
you cannot change the address location to another zone (such as from Trust to
Untrust). To change its location, you must first disassociate it from the underlying
policy.
Deleting an Address
In this example, you remove the address entry for the address
“Sunnyvale_SW_Eng”.
WebUI
Policy > Policy Elements > Addresses > List: Click Remove in the Configure
column for Sunnyvale_SW_Eng.
CLI
unset address trust “Sunnyvale_SW_Eng”
save
Address Groups
“Address Entries” on page 104 explained how you create, modify, and delete
address book entries for individual hosts and subnets. As you add addresses to an
address list, it becomes difficult to manage how policies affect each address entry.
ScreenOS allows you to create groups of addresses. Rather than manage a large
number of address entries, you can manage a small number of groups. Changes
you make to the group are applied to each address entry in the group.
Addresses 105
Concepts & Examples ScreenOS Reference Guide
Name Access
Address Policy
Name Access
Access Name
Address Policy
Name Name
Address
Address Policy Address
Name Access
Address Policy
You can create address groups with existing users, or you can create empty
address groups and later fill them with users.
NOTE: To ensure that a group does not accidentally contain itself as a member, the
security device performs a sanity check when you add one group to another. For
example, if you add group A as a member to group B, the security device
automatically checks that A does not already contain B as its member.
You can reference an address group entry in a policy like an individual address
book entry.
NOTE: The automatic nature by which the security device applies policies to each address
group member saves you from having to create them individually for each
address. Furthermore, ScreenOS writes these policies to the application-specific
integrated circuit (ASIC), which speeds up lookups.
106 Addresses
Chapter 5: Building Blocks for Policies
When you delete an individual address book entry from the address book, the
security device automatically removes it from all groups to which it belonged.
Address groups can only contain addresses that belong to the same zone.
Address names cannot be the same as group names. If the name “Paris” is used
for an individual address entry, it cannot be used for a group name.
You cannot add the predefined addresses: “Any,” “All Virtual IPs,” and “Dial-Up
VPN” to groups.
WebUI
Policy > Policy Elements > Addresses > Groups > (for Zone: Trust) New:
Enter the following group name, move the following addresses, then click OK:
Select Santa Clara Eng and use the << button to move the address from
the Available Members column to the Group Members column.
Select Tech Pubs and use the << button to move the address from the
Available Members column to the Group Members column.
CLI
set group address trust “HQ 2nd Floor” add “Santa Clara Eng”
set group address trust “HQ 2nd Floor” add “Tech Pubs”
save
Addresses 107
Concepts & Examples ScreenOS Reference Guide
WebUI
Policy > Policy Elements > Addresses > Groups > (for Zone: Trust) Edit (for
HQ 2nd Floor): Move the following address, then click OK:
Select Support and use the << button to move the address from the
Available Members column to the Group Members column.
CLI
set group address trust “HQ 2nd Floor” add Support
save
WebUI
Policy > Policy Elements > Addresses > Groups > (for Zone: Trust) Edit (HQ
2nd Floor): Move the following address, then click OK:
Select Support and use the >> button to move the address from the
Group Members column to the Available Members column.
Policy > Policy Elements > Addresses > Groups > (Zone: Trust): Click
Remove in the Configure column for Sales.
CLI
unset group address trust “HQ 2nd Floor” remove Support
unset group address trust Sales
save
NOTE: The security device does not automatically delete a group from which you have
removed all names.
Services
Services are types of traffic for which protocol standards exist. Each service has a
transport protocol and destination port number(s) associated with it, such as
TCP/port 21 for FTP and TCP/port 23 for Telnet. When you create a policy, you must
specify a service for it. You can select one of the predefined services from the
service book, or a custom service or service group that you created. You can see
which service you can use in a policy by viewing the Service drop-down list on the
Policy Configuration page (WebUI) or by using the get service command (CLI).
Predefined Services
You can view the list of predefined or custom services or service groups on the
security device using the WebUI or the CLI.
108 Services
Chapter 5: Building Blocks for Policies
NOTE: Each predefined service has a source port range of 1-65535, which includes the
entire set of valid port numbers. This prevents potential attackers from gaining
access by using a source port outside of the range. If you need to use a different
source port range for any predefined service, create a custom service. For
information, see “Custom Services” on page 120.
You can find more detailed information about some of these listed on the following
pages:
Services 109
Concepts & Examples ScreenOS Reference Guide
You can choose to permit or deny any or specific types of ICMP messages to
improve network security. Some types of ICMP messages can be exploited to gain
information about your network that might compromise security. For example,
ICMP, TCP, or UDP packets can be constructed to return ICMP error messages that
contain information about a network, such as its topology, and access list filtering
characteristics. Table 8 on page 110 lists ICMP message names, the corresponding
code, type, and description.
110 Services
Chapter 5: Building Blocks for Policies
Services 111
Concepts & Examples ScreenOS Reference Guide
Reply 14 0
Ping (ICMP ECHO) 8 0 Packet Internet Groper is a utility to determine whether a specific host is accessible
by its IP address.0/0 echo reply.
Denying ping functionality removes your ability to check to see if a host is active.
Permitting ping can allow others to execute a denial of service (DoS) or Smurf
attack.
ICMP-ECHO- 11 1 ICMP Fragment Echo Reassembly Time Expired error message indicates that the
FRAGMENT-ASSEMBLY- reassembly time was exceeded.
EXPIRE Denying these messages is recommended.
Traceroute Traceroute is a utility to indicate the path to access a specific host.
Forward 30 0 Denying this utility from the Internet (untrust) to your internal network (trust) is
recommended.
Discard 30 1
ICMP messages pass through without dropping sessions. Packets are however,
dropped per session.
112 Services
Chapter 5: Building Blocks for Policies
Services 113
Concepts & Examples ScreenOS Reference Guide
114 Services
Chapter 5: Building Blocks for Policies
1088a980-eae5-11d0-8d9b-00a02453c33
5b5b3580-b0e0-11d1-b92d-0060081e87f0
41208ee0-e970-11d1-9b9e-00e02c064c39
MS-NETLOGON 12345678-1234-abcd-ef00-01234567cffb Microsoft Netlogon Service
Services 115
Concepts & Examples ScreenOS Reference Guide
Streaming Video
Table 12 lists each supported streaming video service by name and includes the
default port and description. Depending on your network requirements, you can
choose to permit or deny any or all of these services.
NetMeeting TCP source 1-65535; TCP destination 1720, Microsoft NetMeeting uses TCP to provide teleconferencing (video
1503, 389, 522 and audio) services over the Internet.
UDP source 1719
Real media TCP source 1-65535; TCP destination 7070 Real Media is streaming video and audio technology.
RTSP 554 Real Time Streaming Protocol (RTSP) for streaming media
applications
SIP 5056 Session Initiation Protocol (SIP) is an Application Layer control
protocol for creating, modifying, and terminating sessions.
VDO Live TCP source 1-65535; TCP destination VDOLive is a scalable, video streaming technology.
7000-7010
116 Services
Chapter 5: Building Blocks for Policies
Program
Service Numbers Full Name
SUN-RPC-PORTMAPPER 111 Sun RPC Portmapper Protocol
100000
SUN-RPC-ANY ANY Any Sun RPC services
SUN-RPC-PROGRAM-MOUNTD 100005 Sun RPC Mount Daemon
SUN-RPC-PROGRAM-NFS 100003 Sun RPC Network File System
100227
SUN-RPC-PROGRAM-NLOCKMGR 100021 Sun RPC Network Lock Manager
SUN-RPC-PROGRAM-RQUOTAD 100011 Sun RPC Remote Quota Daemon
SUN-RPC-PROGRAM-RSTATD 100001 Sun RPC Remote Status Daemon
SUN-RPC-PROGRAM-RUSERD 100002 Sun RPC Remote User Daemon
SUN-RPC-PROGRAM-SADMIND 100232 Sun RPC System Administration Daemon
SUN-RPC-PROGRAM-SPRAYD 100012 Sun RPC SPRAY Daemon
SUN-RPC-PROGRAM-STATUS 100024 Sun RPC STATUS
SUN-RPC-PROGRAM-WALLD 100008 Sun RPC WALL Daemon
SUN-RPC-PROGRAM-YPBIND 100007 SUN RPC Yellow Page Bind Service
Services 117
Concepts & Examples ScreenOS Reference Guide
IP-Related Services
Table 15 lists the predefined IP-related services. Each entry includes the default port
and a description of the service.
Management Services
Table 17 lists the predefined management services. Each entry includes the name
of the service, the default or assigned port, and a description of the service.
118 Services
Chapter 5: Building Blocks for Policies
Mail Services
Table 18 lists the predefined mail services. Each includes the name of the service,
the default or assigned port number, and a description of the service.
UNIX Services
Table 19 lists the predefined UNIX services. Each entry includes the name of the
service, the default or assigned port, and a description of the service.
Services 119
Concepts & Examples ScreenOS Reference Guide
Miscellaneous Services
Table 20 lists predefined miscellaneous services. Each entry includes the service
name, default or assigned port, and a description of the service.
Custom Services
Instead of using predefined services, you can easily create custom services. You can
assign each custom service the following attributes:
Name
Transport protocol
Source and destination port numbers for services using TCP or UDP
Timeout value
120 Services
Chapter 5: Building Blocks for Policies
If you create a custom service in a virtual system (vsys) that has the same name as
a previously defined custom service in the root system, the service in the vsys takes
the default timeout for the specified transport protocol (TCP, UDP, or ICMP). To
define a custom timeout for a service in a vsys that is different from the default
when a custom service with the same name in the root system has its own timeout,
create the custom service in the vsys and root system in the following order:
1. First, create the custom service with a custom timeout in the vsys.
2. Then create another custom service with the same name but a different
timeout in the root system.
The following examples describe how to add, modify, and remove a custom service.
Whether the service uses TCP or UDP protocol, or some other protocol as
defined by the Internet specifications. In this example, the protocol is TCP.
WebUI
Policy > Policy Elements > Services > Custom > New: Enter the following,
then click OK:
CLI
set service cust-telnet protocol tcp src-port 1-65535 dst-port 23000-23000
set service cust-telnet timeout 30
save
NOTE: The timeout value is in minutes. If you do not set it, the timeout value of a custom
service is 180 minutes. If you do not want a service to time out, enter never.
Services 121
Concepts & Examples ScreenOS Reference Guide
Use the set service service_name clear command to remove the definition of a
custom service without removing the service from the service book:
WebUI
Policy > Policy Elements > Services > Custom > Edit (for cust-telnet): Enter
the following, then click OK:
CLI
set service cust-telnet clear
set service cust-telnet + tcp src-port 1-65535 dst-port 23230-23230
save
WebUI
Policy > Policy Elements > Services > Custom: Click Remove in the Configure
column for “cust-telnet”.
CLI
unset service cust-telnet
save
Services with multiple rule entries share the same timeout value. If multiple services
share the same protocol and destination port range, all services share the last
timeout value configured.
122 Services
Chapter 5: Building Blocks for Policies
2. The default timeout in the service entry database, if specified in the predefined
service.
1. The vsys TCP and UDP port-based timeout table, if a timeout is set.
Contingencies
When setting timeouts, be aware of the following:
If a service contains several service rule entries, all rule entries share the same
timeout. The timeout table is updated for each rule entry that matches the
protocol (for UDP and TCP—other protocols use the default). You need define
the service timeout only once. For example, if you create a service with two
rules, the following commands will set the timeout to 20 minutes for both rules:
If multiple services are configured with the same protocol and overlapping
destination ports, the latest service timeout configured overrides the others in
the port-based table. For example:
set service ftp-1 protocol tcp src 0-65535 dst 2121-2121 timeout 10
set service telnet-1 protocol tcp src 0-65535 dst 2100-2148 timeout 20
With this configuration, the security device applies the 20-minute timeout for
destination port 2121 in a service group, because the destination port numbers
for telnet-1 (2100-2148) overlap those for ftp-1 (2121), and you defined telnet-1
after you defined ftp-1.
To modify a service timeout when multiple services use the same protocol and
an overlapping destination port range, you must unset the service and reset it
with the new timeout value. This is because, during reboot, services are loaded
according to creation time, not modification time.
Services 123
Concepts & Examples ScreenOS Reference Guide
If you unset a service timeout, the default protocol-based timeout in the service
entry database is used, and the timeout values in both the service entry and
port-based timeout tables are updated with the default value.
If the modified service has overlapping destination ports with other services,
the default protocol-based timeout might not be the desired value. In that case,
reboot the security device, or set the service timeout again for the desired
timeout to take effect.
When you modify a predefined service and reboot, the modified service might
not be the last one in the configuration. This is because predefined services are
loaded before custom services, and any change made to a custom service, even
if made earlier, will show as the later than the predefined service change when
you reboot.
and later modify the timeout of the predefine service BGP as follows:
the BGP service will use the 75-minute timeout value, because it is now written
to the service entry database. But the timeout for port 179, the port BGP uses, is
also changed to 75 in the TCP port-based timeout table. After you reboot, the
BGP service will continue to use the 75-minute timeout which, as a single
service, it gets from the service entry database. But the timeout in the TCP
port-based table for port 179 will now be 60. You can verify this by entering the
get service bgp command.
This has no effect on single services. But if you add BGP or my_service to a
service group, the 60-minute timeout value will be used for destination port
179. This is because service group timeout is taken from the port-based
timeout table, if one is set.
Example
In the following example, you change the timeout threshold for the FTP
predefined service to 75 minutes:
WebUI
Policy > Policy Elements > Services > Predefined > Edit (FTP): Enter the
following, then click OK:
124 Services
Chapter 5: Building Blocks for Policies
CLI
set service FTP timeout 75
save
NOTE: For more information about ICMP types and codes, refer to RFC 792, Internet
Control Message Protocol.
An ICMP message type can also have a message code. The code provides more
specific information about the message, as shown in Table 22.
In this example, you define a custom service named “host-unreachable” using ICMP
as the transport protocol. The type is 3 (for Destination Unreachable) and the code
is 1 (for Host Unreachable). You set the timeout value at 2 minutes.
WebUI
Policy > Policy Elements > Services > Custom: Enter the following, then click
OK:
Services 125
Concepts & Examples ScreenOS Reference Guide
CLI
set service host-unreachable protocol icmp type 5 code 0
set service host-unreachable timeout 2
save
Juniper Networks security devices support Sun RPC as a predefined service and
allow traffic based on a policy you configure. The Application Layer Gateway (ALG)
provides the functionality for security devices to handle the dynamic transport
address negotiation mechanism of Sun RPC and to ensure program number-based
firewall policy enforcement. You can define a firewall policy to permit all RPC
requests, or permit by a specific program number.
Although the ALG for IPv4 supports Route and NAT modes for incoming and
outgoing requests, the IPv6 ALG does not support NAT, NAT-Protocol Translation
(NAT-PT), or Transparent mode. In addition, a TCP segment in a Sun RPC stream
might be fragmented, so it might not include an intact Sun RPC protocol data unit
(PDU). Such fragmentation occurs in the RPC layer; so the security device does not
support parsing a fragmented packet coming through a Sun RPC ALG over IPv4 and
IPv6. In addition, the IPv6 ALG does not support multicast CALLIT packets, or the
NetScreen Redundancy Protocol (NSRP).
1. The client sends the GETPORT message to the RPCBIND service on the remote
machine. The GETPORT message contains the program number, and version
and procedure number of the remote service it wants to call.
3. The client calls the remote service using the port number returned.
126 Services
Chapter 5: Building Blocks for Policies
A client also can use the CALLIT message to call the remote service directly, without
knowing the port number of the service. In this case, the procedure is as follows:
1. The client sends a CALLIT message to the RPCBIND service on the remote
machine. The CALLIT message contains the program number, and the version
and procedure number of the remote service it wants to call.
3. RCPBIND replies to the client if the call has been successful. The reply contains
the call result and the services’s port number.
In this example, you create a service object called my-sunrpc-nfs to use the Sun RPC
NFS, which is identified by two program IDs: 100003 and 100227.
WebUI
Policy > Policy Elements > Services > Sun RPC Services > New: Enter the
following, then click Apply:
CLI
set service my-sunrpc-nfs protocol sun-rpc program 100003-100003
set service my-sunrpc-nfs + sun-rpc program 100227-100227
save
Services 127
Concepts & Examples ScreenOS Reference Guide
The MS RPC ALG for IPv6 does not support the Endpoint Mapper protocol over UDP.
In addition, the IPv6 ALG does not support NSRP.
Because MS RPC services use dynamically negotiated ports, you cannot use regular
service objects based on fixed TCP/UDP ports to permit them in a security policy.
Instead, you must create MS RPC service objects using UUIDs. The MS Exchange
Info Store service, for example, uses the following four UUIDs:
0e4a0156-dd5d-11d2-8c2f-00c04fb6bcde
1453c42c-0fa6-11d2-a910-00c04f990f3b
10f24e8e-0fa6-11d2-a910-00c04f990f3b
1544f5e0-613c-11d1-93df-00c04fd7bd09
The corresponding TCP/UDP ports are dynamic. To permit them, you create an
ms-exchange-info-store service object that contains these four UUIDs. The ALG
maps the program numbers into dynamically negotiated TCP/UDP ports based on
these four UUIDs and permits or denies the service based on a policy you configure.
In this example, you create a service object called my-ex-info-store that includes
the UUIDs for the MS Exchange Info Store service.
WebUI
Policy > Policy Elements > Services > MS RPC: Enter the following, then click
Apply:
CLI
set service my-ex-info-store protocol ms-rpc uuid
0e4a0156-dd5d-11d2-8c2f-00c04fb6bcde
set service my-ex-info-store + ms-rpc uuid
1453c42c-0fa6-11d2-a910-00c04f990f3b
set service my-ex-info-store + ms-rpc uuid
10f24e8e-0fa6-11d2-a910-00c04f990f3b
128 Services
Chapter 5: Building Blocks for Policies
Juniper Networks security devices support RTSP as a service and allow or deny
RTSP traffic based on the policy you configure. The RTSP Application Layer Gateway
(ALG) is needed because RTSP uses dynamically assigned port numbers that are
conveyed in the packet payload when endpoints establish a control connection. The
ALG keeps track of the dynamically assigned port numbers and opens pinholes on
the security device accordingly. In Network Address Translation (NAT) mode, the
ALG translates IP addresses and ports as necessary. Security devices support RTSP
in Route and Transparent modes, and in both interface-based and policy-based NAT
mode.
Figure 49 on page 130 illustrates a typical RTSP session. The client initiates the
session (when the user clicks the Play button in a RealPlayer application, for
example) and establishes a TCP connection to the RTSP server on port 554, then
sends the OPTIONS message (messages are also called methods), to find out what
audio and video features the server supports. The server responds to the OPTIONS
message by specifying the name and version of the server, and a session identifier,
for example, 24256-1. (For more information about methods, see “SIP Request
Methods” on page 6-16, and refer to RFC 2326, Section 11.)
The client then sends the DESCRIBE message with the URL of the actual media file
the client wants. The server responds to the DESCRIBE message with a description
of the media in SDP format. The client then sends the SETUP message, which
specifies the transport mechanisms acceptable to the client for streamed media, for
example RTP/RTCP or RDT, and the ports on which it receives the media. When
using NAT, the RTSP ALG keeps track of these ports and translates them as
necessary. The server responds to the SETUP message and selects one of the
transport protocols, and, in this way, both client and server agree on a mechanism
for media transport. The client then sends the PLAY message, and the server begins
streaming the media to the client.
Services 129
Concepts & Examples ScreenOS Reference Guide
Dual-Stack Environment
You enable the RTSP ALG by using the set alg rtsp enable command. When you use
this command to enable ALG in a dual-stack environment, the IPv4 and IPv6 RTSP
ALGs are enabled at the same time. This feature has the following limitations:
The ALG does not support NetScreen Redundancy Protocol (NSRP) for IPv6.
130 Services
Chapter 5: Building Blocks for Policies
Services 131
Concepts & Examples ScreenOS Reference Guide
Table 25 lists all status codes defined for RTSP 1.0, and recommended reason
phrases. Reason phrases can be revised or redefined without affecting the operation
of the protocol.
132 Services
Chapter 5: Building Blocks for Policies
NOTE: For complete definitions of status codes, refer to RFC 2326, Real Time Streaming
Protocol (RTSP).
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet0/1): Enter the following, then click
Apply:
Services 133
Concepts & Examples ScreenOS Reference Guide
Network > Interfaces > Edit (for ethernet0/3): Enter the following, then click
Apply:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), client
Destination Address:
Address Book Entry: (select), MIP(1.1.1.3)
Service: RTSP
Action: Permit
CLI
1. Interfaces
set interface ethernet0/1 trust
set interface ethernet0/1 ip 10.1.1.1
set interface ethernet0/3 untrust
set interface ethernet0/3 ip 1.1.1.1
2. Addresses
set address trust media_server 10.1.1.3/24
134 Services
Chapter 5: Building Blocks for Policies
Security Device
LAN LAN
DIP Pool
Client on ethernet0/3 Media Server
10.1.1.3 1.1.1.5 to 1.1.1.50 1.1.1.3
WebUI
1. Interface
Network > Interfaces > Edit (for ethernet0/1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet0/3): Enter the following, then click
Apply:
Services 135
Concepts & Examples ScreenOS Reference Guide
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
ID: 5
IP Address Range: (select) 1.1.1.5 ~ 1.1.1.50
Port Translation: (select)
4. Policy
Policy > Policies > (From: Trust, To: Untrust) > New: Enter the following, then
click OK:
Source Address:
Address Book Entry (select): client
Destination Address:
Address Book Entry (select): media_server
Service: RTSP
Action: Permit
NAT:
Source Translation: (select)
(DIP on): 5 (1.1.1.5-1.1.1.50)/port-xlate
CLI
1. Interface
set interface ethernet0/1 zone trust
set interface ethernet0/1 ip 10.1.1.1
set interface ethernet0/3 zone untrust
set interface ethernet0/3 ip 1.1.1.1/24
2. Addresses
set address trust client ip 10.1.1.3/24
set address untrust media_server ip 1.1.1.3/24
3. DIP Pool
set interface ethernet0/3 dip 5 1.1.5 1.1.1.50
4. Policy
set policy from trust to untrust client media_server rtsp nat dip 5 permit
save
136 Services
Chapter 5: Building Blocks for Policies
SCTP is effective when used as the transport protocol for applications that require
monitoring and session-loss detection. For such applications, the SCTP path/session
failure-detection mechanisms, especially the heartbeat, actively monitor the
connectivity of the session. SCTP differs from TCP in having multi-homing
capabilities at either or both ends and several streams within a connection, typically
referred to an association. A TCP stream represents a sequence of bytes; an SCTP
stream represents a sequence of messages.
You can configure the security device to perform stateful inspection on all SCTP
traffic without performing Deep Inspection (DI). If you enable stateful inspection of
SCTP traffic, the SCTP ALG drops any anomalous SCTP packets.
PPTP uses TCP port 1723 for its control connection and Generic Routing
Encapsulation (GRE - IP protocol 47) for tunneling the encapsulated PPP data. The
GRE traffic carries no port number, making it difficult for the security device to
distinguish between two clients with the same public IP. PPTP uses the source IP
address and the Call ID field in the GRE header to identify a tunnel. When multiple
clients sharing the same public IP address establish tunnels with the same PPTP
server, they may get the same Call ID. You can translate the Call ID value in both the
control message and the data traffic, but only when the client is in a private
network and the server is in a public network.
PPTP clients can either directly connect to the Internet or dial into a network access
server (ISP) to reach the Internet. The security device that protects the PPTP clients
can translate the clients’ private IP addresses to a pool of public IP addresses using
Network Address Translation-Port Translation (NAT-PT). Because the GRE traffic
carries no port number for address translation, the PPTP ALG treats the Call ID field
as a port number as a way of distinguishing multiple clients.
After the PPTP client establishes a TCP connection with the PPTP server, the client
sends a Start Control Connection Request message to establish a control connection
with the server. The server replies with a Start Control Connection Reply message.
The client then sends a request to establish a call and sends an Outgoing Call
Request message. The security device assigns a Call ID (bytes 12-13 of the control
Services 137
Concepts & Examples ScreenOS Reference Guide
message) that is unique to the tunnel. The server replies with an Outgoing Call
Reply message, which carries its own Call ID (bytes 12-13) and the client’s Call ID
(bytes 14-15). The PPTP ALG parses the control connection messages for the Call ID
to identify the call to which a particular PPP packet belongs. The ALG identifies an
Outgoing Call Request message using the Control Message Type field (bytes 8-9)
with the value 7. When the ALG receives this message, it parses the control message
for the Call ID field (bytes 12-13). The security device translates the Call ID so that it
is unique across multiple calls from the same translated client IP. After receiving
Outgoing Call Response message, the ALG holds this message and opens a pinhole
in order to accept GRE traffic that the PPTP server sends. An Outgoing Call Request
message contains the following elements:
The ALG identifies an Outgoing Call Reply message using the Control Message Type
field (bytes 8-9) with the value 8. The ALG parses these control messages for the Call
ID field (bytes 12-13) and the client’s Call ID (bytes 14-15). The ALG then uses the
client’s Call ID value to find the mapping created for the other direction, and then
opens a pinhole to accept the GRE traffic that the client sends. An Outgoing Call
Reply message contains the following elements:
Each pinhole that the ALG opens creates a session for data traffic arriving in that
direction. The ALG opens two data sessions for each tunnel:
Traffic from the PPTP client to the server, using the server’s Call ID as the
destination port
Traffic from the PPTP server to the client, using the client’s translated Call ID as
the destination port
The default timeout value of the control connection is 30 minutes. The ALG closes
the pinhole when the data session exceeds the timeout value or is idle for long time.
When you close the control session through the ALG, the security device closes all
control connections and data sessions.
138 Services
Chapter 5: Building Blocks for Policies
NOTE: Because the PPTP ALG requires Port Address Translation (PAT), you cannot create a
hardware session for the data traffic that uses GRE, because the hardware does
not support encapsulation using GRE. On such Juniper Networks security devices,
ScreenOS must handle both the control traffic and the data traffic in software
path.
Call ID translation is not required when the client is on the public network and the
server is on the private side. In this case, no PAT is involved and the Call ID value
between any client–server pair is unique.
WebUI
Security > ALG > Basic: Select the PPTP check box, then click OK.
CLI
set alg pptp enable
Service Groups
A service group is a set of services that you have gathered together under one
name. After you create a group containing several services, you can then apply
services at the group level to policies, thus simplifying administration.
Each service book entry can be referenced by one or more service groups.
Each service group can contain predefined and user-defined service book
entries.
Service groups cannot have the same names as services; therefore, if you have
a service named “FTP,” you cannot have a service group named “FTP.”
If a service group is referenced in a policy, you can edit the group but you
cannot remove it until you have first removed the reference to it in the policy.
If a custom service book entry is deleted from the service book, the entry is
also removed from all the groups in which it was referenced.
Services 139
Concepts & Examples ScreenOS Reference Guide
WebUI
Policy > Policy Elements > Services > Groups > New: Enter the following
group name, move the following services, then click OK:
Select IKE and use the << button to move the service from the Available
Members column to the Group Members column.
Select FTP and use the << button to move the service from the Available
Members column to the Group Members column.
Select LDAP and use the << button to move the service from the Available
Members column to the Group Members column.
CLI
set group service grp1
set group service grp1 add ike
set group service grp1 add ftp
set group service grp1 add ldap
save
NOTE: If you try to add a service to a service group that does not exist, the security device
creates the group. Also, ensure that groups referencing other groups do not
include themselves in the reference list.
WebUI
Policy > Policy Elements > Services > Groups > Edit (for grp1): Move the
following services, then click OK:
Select IKE and use the >> button to move the service from the Group
Members column to the Available Members column.
Select FTP and use the >> button to move the service from the Group
Members column to the Available Members column.
Select LDAP and use the >> button to move the service from the Group
Members column to the Available Members column.
Select HTTP and use the << button to move the service from the Available
Members column to the Group Members column.
Select Finger and use the << button to move the service from the
Available Members column to the Group Members column.
Select IMAP and use the << button to move the service from the Available
Members column to the Group Members column.
140 Services
Chapter 5: Building Blocks for Policies
CLI
unset group service grp1 clear
set group service grp1 add http
set group service grp1 add finger
set group service grp1 add imap
save
WebUI
Policy > Policy Elements > Services > Groups: Click Remove (for grp1).
CLI
unset group service grp1
save
NOTE: The security device does not automatically delete a group from which you have
removed all members.
Dynamic IP Pools
A dynamic IP (DIP) pool is a range of IP addresses from which the security device
can dynamically or deterministically take addresses to use when performing
Network Address Translation on the source IP address (NAT-src) in IP packet
headers. (For information about deterministic source address translation, see
“NAT-Src from a DIP Pool with Address Shifting” on page 8-20.) If the range of
addresses in a DIP pool is in the same subnet as the interface IP address, the pool
must exclude the interface IP address, router IP addresses, and any mapped IP
(MIP) or virtual IP (VIP) addresses that might also be in that subnet. If the range of
addresses is in the subnet of an extended interface, the pool must exclude the
extended interface IP address.
There are three kinds of interfaces that you can link to dynamic IP (DIP) pools:
physical interfaces and subinterfaces for network and VPN traffic, and tunnel
interfaces for VPN tunnels only.
To Untrust Zone
VPN Tunnels
To Trust Zone
Firewall
DIP Pools
Interfaces
The admin at the remote site, must also create a tunnel interface with an IP address
in a neutral address space, such as 10.20.2.1/24, and set up a mapped IP (MIP)
address to its FTP server, such as 10.20.2.5 to host 10.1.1.5.
NOTE: This example includes only the configuration of the tunnel interface and its
accompanying DIP pool. For a complete example showing all the configuration
steps necessary for this scenario, see “VPN Sites with Overlapping Addresses” on
page 5-150.
WebUI
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Network > Interfaces > Edit (for tunnel.1) > DIP > New: Enter the following,
then click OK:
ID: 5
IP Address Range: 10.10.1.2 ~ 10.10.1.2
Port Translation: (select)
In the same subnet as the interface IP or its secondary IPs: (select)
NOTE: You can use the ID number displayed, which is the next available number
sequentially, or enter a different number.
CLI
set interface tunnel.1 zone untrust-tun
set interface tunnel.1 ip 10.10.1.1/24
set interface tunnel.1 dip 5 10.10.1.2 10.10.1.2
save
NOTE: Because PAT is enabled by default, there is no argument for enabling it. To create
the same DIP pool as defined above but without PAT (that is, with fixed port
numbers), do the following:
(WebUI) Network > Interfaces > Edit (for tunnel.1) > DIP > New: Clear the Port
Translation check box, then click OK.
You can add a maximum of three IP address ranges for a fixed-port DIP pool. The
IP address ranges should not overlap. When the first address range is exhausted,
the security device attempts to process the NAT request using the second address
range. When the second address range is exhausted, the security device attempts
to process the NAT request using the third address range. Note that the total range
of all IP addresses defined in the fixed-port DIP pool must not exceed the
permitted address scope of the subnet.
NOTE: There are no policies using this particular DIP pool. If a policy uses a DIP pool, you
must first delete the policy or modify it to not use the DIP pool before you can
modify the DIP pool.
WebUI
Network > Interfaces > Edit (for tunnel.1) > DIP > Edit (for ID 5): Enter the
following, then click OK:
CLI
unset interface tunnel.1 dip 5
set interface tunnel.1 dip 5 10.20.1.2 10.20.1.10
save
NOTE: For DIP pools that do not perform port translation, the security device assigns one
IP address for all concurrent sessions from the same host.
For example, it is important to have the same IP address for multiple sessions when
using the AOL Instant Messaging (AIM) client. You create one session when you log
in, and another for each chat. For the AIM server to verify that a new chat belongs
to an authenticated user, it must match the source IP address of the login session
with that of the chat session. If they are different—possibly because they were
randomly assigned from a DIP pool during the NAT process—the AIM server rejects
the chat session.
To ensure that the security device assigns the same IP address from a DIP pool to a
host for multiple concurrent sessions, you can enable the “sticky” DIP address
feature by entering the CLI command set dip sticky.
In this example, two branch offices have leased lines to a central office. The central
office requires them to use only the authorized IP addresses it has assigned them.
However, the offices receive different IP addresses from their ISPs for Internet
traffic. For communication with the central office, you use the extended interface
option to configure the security device in each branch office to translate the source
IP address in packets it sends to the central office to the authorized address. The
authorized and assigned IP addresses for branch offices A and B are as follows:
The security devices at both sites have a Trust zone and an Untrust zone. All
security zones are in the trust-vr routing domain. You bind ethernet0/1 to the Trust
zone and assign it IP address 10.1.1.1/24. You bind ethernet0/3 to the Untrust zone
and give it the IP address assigned by the ISPs: 195.1.1.1/24 for Office A and
201.1.1.1/24 for Office B. You then create an extended interface with a DIP pool
containing the authorized IP address on ethernet0/3:
You set the Trust zone interface in NAT mode. It uses the Untrust zone interface IP
address as its source address in all outbound traffic except for traffic sent to the
central office. You configure a policy to the central office that translates the source
address to an address in the DIP pool in the extended interface. (The DIP pool ID
number is 5. It contains one IP address, which, with Port Address Translation (PAT),
can handle sessions for ~64,500 hosts.) The MIP address that the central office
uses for inbound traffic is 200.1.1.1, which you enter as “HQ” in the Untrust zone
address book on each security device.
Central Office
(HQ)
Note: Leased lines connect branch offices A and B
directly to the central office.
200.1.1.1 Untrust Zone
Untrust Zone
ISP
Leased
Leased Line
Line
Internet
Untrust Zone, ethernet0/3 Untrust Zone, ethernet0/3
ISP assigns 195.1.1.1/24 ISP assigns 201.1.1.1/24
(physical interface) ISP ISP (physical interface)
HQ authorizes 211.10.1.1 /24 HQ authorizes 211.20.1.1/24
(extended interface) (extended interface)
Default Gateway 195.1.1.254 Default Gateway 201.1.1.254
NOTE: Each ISP must set up a route for traffic destined to a site at the end of a leased line
to use that leased line. The ISPs route any other traffic they receive from a local
security device to the Internet.
Network > Interfaces > Edit (for ethernet0/3): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet0/3) > DIP > New: Enter the
following, then click OK:
ID: 5
IP Address Range: 211.10.1.1 ~ 211.10.1.1
Port Translation: (select)
Extended IP/Netmask: 211.10.1.10/255.255.255.0
2. Address
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Address Name: HQ
IP Address/Domain Name:
IP/Netmask: (select), 200.1.1.1/32
Zone: Untrust
3. Route
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: ANY
Action: Permit
Policy > Policies > (From: Trust, To: Untrust) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), HQ
Service: ANY
Action: Permit
Position at Top: (select)
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): 5 (211.10.1.1-211.10.1.1)/X-late
Network > Interfaces > Edit (for ethernet0/3): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet0/3) > DIP > New: Enter the
following, then click OK:
ID: 5
IP Address Range: 211.20.1.1 ~ 211.20.1.1
Port Translation: (select)
Extended IP/Netmask: 211.20.1.10/255.255.255.0
2. Address
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Address Name: HQ
IP Address/Domain Name:
IP/Netmask: (select), 200.1.1.1/32
Zone: Untrust
3. Route
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: ANY
Action: Permit
Policy > Policies > (From: Trust, To: Untrust) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), HQ
Service: ANY
Action: Permit
Position at Top: (select)
> Advanced: Enter the following, then click Return to set the advanced options
and return to the basic configuration page:
NAT:
Source Translation: (select)
DIP On: (select), 5 (211.20.1.1-211.20.1.1)/X-late
NOTE: For information about loopback interfaces, see “Loopback Interfaces” on page 58.
Loopback Interface
Regardless of the egress loopback 1 DIP Pool
interface, the security device 1.3.3.1/30 1.3.3.2 - 1.3.3.2
translates the source IP
addresses to the address in Security Device
the DIP pool defined on the
loopback.1 interface. ethernet0/1
10.1.1.1/24
Host A Host B
Source IP Destination IP Source IP Destination IP
DATA 10.1.1.5 10.1.1.6 10.1.1.6 DATA
10.1.1.5 2.2.2.2 2.2.2.2
In this example, the security device receives the following IP addresses for two
Untrust zone interfaces from different Internet service providers (ISPs): ISP-1 and
ISP-2:
You bind these interfaces to the Untrust zone and then assign them the above IP
addresses. You also bind ethernet0/1 to the Trust zone and assign it IP address
10.1.1.1/24.
You want the security device to translate the source address in outbound traffic
from the Trust zone to a remote office in the Untrust zone. The translated address
must be the same IP address (1.3.3.2) because the remote office has a policy
permitting inbound traffic only from that IP address. You have previously obtained
the public IP addresses 1.3.3.1 and 1.3.3.2 and have notified both ISPs that you are
using these addresses in addition to the addresses that they assign the device.
You configure a loopback interface loopback.1 with the IP address 1.3.3.1/30 and a
DIP pool of 1.3.3.2 – 1.3.3.2 on that interface. The DIP pool has ID number 10. You
then make ethernet0/1 and ethernet0/2 members of the loopback group for
loopback.1.
You define an address for the remote office named “r-office” with IP address
2.2.2.2/32. You also define default routes for both ethernet0/1 and ethernet0/2
interfaces pointing to the routers for ISP-1 and ISP-2, respectively.
You define routes to two gateways for outbound traffic to use. Because you do not
prefer one route over the other, you do not include any metrics in the routes.
Outbound traffic might follow either route.
NOTE: To indicate a route preference, include metrics in both routes, giving your
preferred route a higher metric—that is, a value closer to 1.
Finally, you create a policy applying Source Network Address Translation (NAT-src)
to outbound traffic to the remote office. The policy references DIP pool ID 10.
WebUI
1. Interfaces
Network > Interfaces > New Loopback IF: Enter the following, then click OK:
Network > Interfaces > Edit (for ethernet0/1): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet0/2): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet0/3): Enter the following, then click
OK:
ID: 5
IP Address Range: 1.3.3.2 ~ 1.3.3.2
Port Translation: (select)
3. Address
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
4. Routes
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), r-office
Service: ANY
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
DIP On: (select), 10 (1.3.3.2-1.3.3.2)/port-xlate
CLI
1. Interfaces
set interface loopback.1 zone untrust
set interface loopback.1 ip 1.3.3.1/30
set interface ethernet0/1 zone trust
set interface ethernet0/1 ip 10.1.1.1/24
set interface ethernet0/1 nat
set interface ethernet0/2 zone untrust
set interface ethernet0/2 ip 1.1.1.1/24
set interface ethernet0/2 loopback-group loopback.1
set interface ethernet0/3 zone untrust
set interface ethernet0/3 ip 1.2.2.1/24
set interface ethernet0/3 loopback-group loopback.1
2. DIP Pool
set interface loopback.1 dip 10 1.3.3.2 1.3.3.2
3. Address
set address untrust r-office 2.2.2.2/32
4. Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet0/2 gateway 1.1.1.250
set vrouter trust-vr route 0.0.0.0/0 interface ethernet0/3 gateway 1.2.2.250
5. Policy
set policy from trust to untrust any r-office any nat src dip-id 10 permit
save
DIP Pool ID 7
1.1.1.101 – 1.1.1.150
ethernet0/2 ethernet0/3:1
1.1.1.1/24 1.1.1.2/24
Backup Master
VSD 0 Device B VSD 1
ethernet0/1 ethernet0/1:1
10.1.1.1/24 10.1.1.2/24
To solve this problem, you can create two DIP pools—one on the Untrust zone VSI
for each VSD group—and combine the two DIP pools into one DIP group, which you
reference in the policy. Each VSI uses its own VSD pool even though the policy
specifies the DIP group.
Untrust Zone
DIP Pool ID 8 DIP Pool ID 7
1.1.1.151 – 1.1.1.200 1.1.1.101 – 1.1.1.150
ethernet0/3 ethernet0/3:1
Untrust Zone VSIs 1.1.1.1/24 1.1.1.2/24
DIP Group 9
Master Backup
Device A VSD 1
VSD 0
NSRP Cluster VSD Group: 0 VSD Group: 1
Backup Master
VSD 0 Device B VSD 1
NOTE: For more information about setting up security devices for HA, see Volume 11:
High Availability.
In this example, you provide NAT services on two security devices (Devices A and B)
in an Active/Active HA pair.
You create two DIP pools—DIP 5 (1.1.1.20 – 1.1.1.29) on ethernet0/3 and DIP 6
(1.1.1.30 – 1.1.1.39) on ethernet0/3:1. You then combine them into a DIP group
identified as DIP 7, which you reference in a policy.
Let’s assume that you have already set up Devices A and B in an NSRP cluster,
created VSD group 1 (ScreenOS automatically creates VSD group 0 when you put a
device in an NSRP cluster), and configured the above interfaces. (For information
about configuring security devices for NSRP, see Volume 11: High Availability.)
WebUI
1. DIP Pools
Network > Interfaces > Edit (for ethernet0/3) > DIP > New: Enter the
following, then click OK:
ID: 5
IP Address Range: 1.1.1.20 – 1.1.1.29
Port Translation: (select)
Network > Interfaces > Edit (for ethernet0/3:1) > DIP > New: Enter the
following, then click OK:
ID: 6
IP Address Range: 1.1.1.30 – 1.1.1.39
Port Translation: (select)
NOTE: At the time of this release, you can only define a DIP group through the CLI.
2. Policy
Policy > Policies > (From: Trust, To: Untrust) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: ANY
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
DIP On: (select), 7
CLI
1. DIP Pools
set interface ethernet0/3 dip 5 1.1.1.20 1.1.1.29
set interface ethernet0/3:1 dip 6 1.1.1.30 1.1.1.39
2. DIP Groups
set dip group 7 member 5
set dip group 7 member 6
3. Policy
set policy from trust to untrust any any any nat src dip-id 7 permit
save
When you define a schedule, enter values for the following parameters:
Schedule Name: The name that appears in the Schedule drop-down list in the
Policy Configuration dialog box. Choose a descriptive name to help you identify
the schedule. The name must be unique and is limited to 19 characters.
Recurring: Enable this when you want the schedule to repeat weekly.
Start and End Times: You must configure both a start time and an end time.
You can specify up to two time periods within the same day.
Once: Enable this when you want the schedule to start and end only once.
mm/dd/yyyy hh:mm: You must enter both start and stop dates and times.
In this example, there is a short-term employee named Tom who is using the
company’s Internet access for personal pursuits after work. You create a schedule
for non-business hours that you can then associate with a policy to deny outbound
TCP/IP traffic from that worker’s computer (10.1.1.5/32) outside of regular business
hours.
WebUI
1. Schedule
Policy > Policy Elements > Schedules > New: Enter the following, then click
OK:
Period 2:
2. Address
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Address Name: Tom
Comment: Temp
IP Address/Domain Name:
IP/Netmask: (select), 10.1.1.5/32
Zone: Trust
3. Policy
Policy > Policies > (From: Trust, To: Untrust) New: Enter the following, then
click OK:
Name: No Net
Source Address:
Address Book Entry: (select), Tom
Destination Address:
Address Book Entry: (select), Any
Service: HTTP
Action: Deny
Schedule: After Hours
CLI
1. Schedule
set schedule “after hours” recurrent sunday start 00:00 stop 23:59
set schedule “after hours” recurrent monday start 00:00 stop 06:00 start 17:00
stop 23:59
set schedule “after hours” recurrent tuesday start 00:00 stop 06:00 start 17:00
stop 23:59
set schedule “after hours” recurrent wednesday start 00:00 stop 06:00 start
17:00 stop 23:59
set schedule “after hours” recurrent thursday start 00:00 stop 06:00 start 17:00
stop 23:59
set schedule “after hours” recurrent friday start 00:00 stop 06:00 start 17:00
stop 23:59
set schedule “after hours” recurrent saturday start 00:00 stop 23:59 comment
“for non-business hours”
2. Address
set address trust tom 10.1.1.5/32 “temp”
3. Policy
set policy from trust to untrust tom any http deny schedule “after hours”
save
The default behavior of a security device is to deny all traffic between security
zones (interzone traffic) and—except for traffic within the Untrust zone—allow all
traffic between interfaces bound to the same zone (intrazone traffic). To permit
selected interzone traffic to cross a security device you must create interzone
policies that override the default behavior. Similarly, to prevent selected intrazone
traffic from crossing a security device, you must create intrazone policies.
This chapter describes what policies do and how the various elements that
comprise a policy are related. It contains the following sections:
NOTE: If you configure multicast routing on a security device, you might have to
configure multicast policies. For information about multicast policies, see
“Multicast Policies” on page 7-135.
159
Concepts & Examples ScreenOS Reference Guide
Basic Elements
A policy permits, denies, or tunnels specified types of traffic unidirectionally
between two points. The type of traffic (or “service”), the location of the two
endpoints, and the invoked action compose the basic elements of a policy. Although
there can be other components, the required elements, which together constitute
the core section of a policy, are described in Table 27.
Element Description
Direction The direction of traffic between two security zones (from a source zone to
a destination zone)
Source Address The address from which traffic initiates
Destination Address The address to which traffic is sent
Service The type of traffic transmitted
Action The action that the security device performs when it receives traffic
meeting the first four criteria: deny, permit, reject, or tunnel
Note: The “tunnel” action—(VPN or L2TP tunnel)—contains the concept
of “permit” implicitly.
For example, the policy stated in the following CLI command permits FTP traffic
from any address in the Trust zone to an FTP server named “server1” in the DMZ
zone:
Source Address: any (that is, any address in the Trust zone. The term “any”
stands for a predefined address that applies to any address in a zone)
Action: permit (that security device permits this traffic to traverse its firewall)
Interzone Policies—Let you regulate the kind of traffic allowed to pass from
one security zone to another.
Intrazone Policies— Let you regulate the kind of traffic allowed to cross
interfaces bound to the same zone.
Interzone Policies
Interzone policies provide traffic control between security zones. You can set
interzone policies to deny, permit, reject, or tunnel traffic from one zone to another.
Using stateful inspection techniques, a security device maintains a table of active
TCP sessions and active UDP “pseudo” sessions so that it can allow replies to
service requests. For example, if you have a policy allowing HTTP requests from
host A in the Trust zone to server B in the Untrust zone, when the security device
receives HTTP replies from server B to host A, the security device checks the
received packet against its table. Finding the packet to be a reply to an approved
HTTP request, the security device allows the packet from server B in the Untrust
zone to cross the firewall to host A in the Trust zone. To permit traffic initiated by
server B to host A (not just replies to traffic initiated by host A), you must create a
second policy from server B in the Untrust zone to host A in the Trust zone.
Note: The security device rejects the HTTP request from server B because there is no policy permitting
Intrazone Policies
Intrazone policies provide traffic control between interfaces bound to the same
security zone. The source and destination addresses are in the same security zone
but are reached via different interfaces on the security device. Like interzone
policies, intrazone policies control traffic flowing unidirectionally. To allow traffic
initiated at either end of a data path, you must create two policies—one policy for
each direction.
set policy from trust to trust “host A” “server B” any permit ethernet0/1 ethernet0/4
set policy from trust to trust “server B” “host A” any permit 10.1.1.1/24 10.1.2.1/24
Layer 2 Switches
Host A Server B
10.1.1.5 LAN 1 LAN
10.1.1.0/24 10.1.2.0/24 10.1.2.30
Trust Zone
Global Policies
Unlike interzone and intrazone policies, global policies do not reference specific
source and destination zones. Global policies reference user-defined Global zone
addresses or the predefined Global zone address “any”. These addresses can span
multiple security zones. For example, if you want to provide access to or from
multiple zones, you can create a global policy with the Global zone address “any,”
which encompasses all addresses in all zones.
NOTE: At the time of this release, global policies do not support Source Network Address
Translation (NAT-src), VPN tunnels, or Transparent mode. You can, however,
specify a MIP or VIP as the destination address in a global policy.
When the security device receives a packet initiating a new session, the device
notes the ingress interface, and thereby learns the source zone to which that
interface is bound. The security device then performs a route lookup to determine
the egress interface, and thus determines the destination zone to which that
interface is bound. Using the source and destination zones, the security device can
perform a policy lookup, consulting the policy set lists in the following order:
1. If the source and destination zones are different, the security device performs a
policy lookup in the interzone policy set list.
(or)
If the source and destination zones are the same, the security device performs a
policy lookup in the intrazone policy set list.
2. If the security device performs the interzone or intrazone policy lookup and
does not find a match, the security device then checks the global policy set list
for a match.
3. If the security device performs the interzone and global policy lookups and
does not find a match, the security device then applies the default permit/deny
policy to the packet: unset/set policy default-permit-all.
(or)
If the security device performs the intrazone and global policy lookups and
does not find a match, the security device then applies the intrazone blocking
setting for that zone to the packet: unset/set zone zone block.
The security device searches each policy set list from top to bottom. Therefore, you
must position more specific policies above less specific policies in the list. (For
information about policy order, see “Reordering Policies” on page 190.)
Policies Defined
A security device provides a network boundary with a single point of entry and exit.
Because all traffic must pass through this point, you can screen and direct that
traffic by implementing policy set lists—for interzone policies, intrazone policies,
and global policies.
Policies allow you to deny, permit, reject (deny and send a TCP RST or an ICMP port
unreachable message to the source host), encrypt and decrypt, authenticate,
prioritize, schedule, filter, have no hardware session, and monitor the traffic
attempting to cross from one security zone to another. You decide which users and
what data can enter and exit, and when and where they can go.
NOTE: For security devices that support virtual systems, policies set in the root system do
not affect policies set in virtual systems.
Depending on the use of multiple entries or groups for the source address,
destination address, and service components in a policy, the number of logical rules
can be much larger than is readily apparent from the creation of the single policy.
For example, the following policy produces 125 logical rules:
However, the security device does not duplicate components for each logical rule.
The rules make use of the same set of components in various combinations. For
example, the above policy that produces 125 logical rules results in only 15
components:
These 15 components combine in various ways to produce the 125 logical rules
generated by the single policy. By allowing multiple logical rules to use the same set
of components in different combinations, the security device consumes far fewer
resources than if each logical rule had a one-to-one relationship with its
components.
Anatomy of a Policy
A policy must contain the following elements:
Services
Application
Name
VPN tunneling
L2TP tunneling
No hardware session
User authentication
Web filtering
Logging
Counting
Schedules
Antivirus scanning
Traffic shaping
ID
Every policy has an ID number, whether you define one or the security device
automatically assigns it. You can only define an ID number for a policy through the
set policy command in the CLI: set policy id number … After you know the ID
number, you can enter the policy context to issue further commands to modify the
policy. (For more information about policy contexts, see “Entering a Policy Context”
on page 185.)
Zones
A zone can be a segment of network space to which security measures are applied
(a security zone), a logical segment to which a VPN tunnel interface is bound (a
tunnel zone), or either a physical or logical entity that performs a specific function
(a function zone). A policy allows traffic to flow between two security zones
(interzone policy) or between two interfaces bound to the same zone (intrazone
policy). (For more information, see “Zones” on page 25, “Interzone Policies” on
page 161, and “Intrazone Policies” on page 161.)
Addresses
Addresses are objects that identify network devices such as hosts and networks by
their location in relation to the firewall—in one of the security zones. Individual
hosts are specified using the mask 255.255.255.255, indicating that all 32 bits of
the address are significant. Networks are specified using their subnet mask to
indicate which bits are significant. To create a policy for specific addresses, you
must first create entries for the relevant hosts and networks in the address book.
You can also create address groups and apply policies to them as you would to other
address book entries. When using address groups as elements of policies, be aware
that because the security device applies the policy to each address in the group, the
number of available internal logical rules and the components that comprise those
rules can become depleted more quickly than expected. This is a danger especially
when you use address groups for both the source and destination. (For more
information, see “Policies and Rules” on page 164.)
Wildcard Addresses
In addition to netmasks, Juniper Networks security devices allow you to define
wildcard masks. A wildcard mask is similar to the subnet mask, but instructs the
security device to consider the IP addresses corresponding to ‘0’s in wildcard mask.
IP address that have a wildcard mask are called wildcard addresses. Wildcard
addresses enable you to reduce the number of policies you create to control traffic.
NOTE: The security device considers the IP address corresponding to '1's in a netmask or
wildcard mask. However, netmask differs from wildcard mask on the rule that the
'1's in the netmask must always be continuous and in the leading place, while the
rule is not applicable for wildcard mask.
Services
Services are objects that identify application protocols using Layer 4 information
such as standard and accepted TCP and UDP port numbers for application services
like Telnet, FTP, SMTP, and HTTP. The ScreenOS includes predefined core Internet
services. Additionally, you can define custom services.
You can define policies that specify which services are permitted, denied,
encrypted, authenticated, logged, or counted.
Action
An action is an object that describes what the firewall does to the traffic it receives.
Reject blocks the packet from traversing the firewall. The security device drops
the packet and sends a TCP reset (RST) segment to the source host for TCP
traffic and an ICMP “destination unreachable, port unreachable” message (type
3, code 3) for UDP traffic. For types of traffic other than TCP and UDP, the
security device drops the packet without notifying the source host, which is also
what occurs when the action is “deny.”
NOTE: The security device sends a TCP RST after receiving (and dropping) a TCP segment
with any code bit set other than another RST.
When the ingress interface is operating at Layer 2 or 3 and the protocol is TCP, the
source IP address in the TCP RST is the destination IP address in the original
(dropped) packet. When the ingress interface is operating at Layer 2 and the
protocol is UDP, the source IP address in the ICMP message is also the destination
IP address in the original packet. However, if the ingress interface is operating at
Layer 3 and the protocol is UDP, then the source IP address in the ICMP message
is that of the ingress interface.
NOTE: For L2TP-over-IPSec, the source and destination addresses for the IPSec VPN
tunnel must be the same as those for the L2TP tunnel.
The security device applies the specified action on traffic that matches the
previously presented criteria: zones (source and destination), addresses (source and
destination), and service.
Application
The application option specifies the Layer 7 application that maps to the Layer 4
service that you reference in a policy. A predefined service already has a mapping
to a Layer 7 application. However, for custom services, you must link the service to
an application explicitly, especially if you want the policy to apply an Application
Layer Gateway (ALG) or deep inspection to the custom service.
NOTE: ScreenOS supports ALGs for numerous services, including DNS, FTP, H.323, HTTP,
RSH, SIP, Telnet, and TFTP.
Define a custom service with a name, timeout value, transport protocol, and
source and destination ports
When configuring a policy, reference that service and the application type for
the ALG that you want to apply
For information about applying deep inspection to a custom service, see “Mapping
Custom Services to Applications” on page 4-152.
Name
You can give a policy a descriptive name to provide a convenient means for
identifying its purpose.
VPN Tunneling
You can apply a single policy or multiple policies to any VPN tunnel that you have
configured. In the WebUI, the VPN Tunnel option provides a drop-down list of all
such tunnels. In the CLI, you can see all available tunnels with the get vpn
command. (For more information, see “Site-to-Site Virtual Private Networks” on
page 5-79 and “Dialup Virtual Private Networks” on page 5-159.)
When the VPN configurations at both ends of a VPN tunnel are using
policy-based-NAT, then the administrators of both gateway devices each need to
create an inbound and an outbound policy (four policies in total). When the VPN
policies constitute a matching pair (that is, everything in the inbound and outbound
policy configurations is the same except that the source and destination addresses
are reversed), you can configure one policy and then select the Modify matching
bidirectional VPN policy check box to create a second policy automatically for the
opposite direction. For the configuration of a new policy, the matching VPN policy
check box is cleared by default. For the modification of an existing policy that is a
member of a matching pair, the check box is selected by default, and any changes
made to one policy are propagated to the other.
NOTE: This option is available only through the WebUI. It is not supported when there are
multiple entries for any of the following policy components: source address,
destination address, or service. In addition, you cannot use wildcard addresses in
a VPN policy.
L2TP Tunneling
You can apply a single policy or multiple policies to any Layer 2 Tunneling Protocol
(L2TP) tunnel that you have configured. In the WebUI, the L2TP option provides a
drop-down list of all such tunnels. In the CLI, you can display status of active L2TP
tunnels with the get l2tp tunn_str active command, and see all available tunnels
with the get l2tp all command. You can also combine a VPN tunnel and an L2TP
tunnel—if both have the same endpoints—to create a tunnel combining the
characteristics of each. This is called L2TP-over-IPSec.
Deep Inspection
Deep inspection (DI) is a mechanism for filtering the traffic permitted at the
Network and Transport Layers by examining not only these layers but the content
and protocol characteristics at the Application Layer. DI is designed to detect and
prevent attacks or anomalous behavior present in traffic permitted by the security
device
NOTE: In the Open Systems Interconnection (OSI) Model, the Network Layer is Layer 3,
the Transport Layer is Layer 4, and the Application Layer is Layer 7. The OSI Model
is a networking industry standard model of network protocol architecture. The OSI
Model consists of seven layers.
To configure a policy for attack protection, you must make two choices: which
attack group (or groups) to use and which attack action to take if an attack is
detected. (For more information, see “Deep Inspection” on page 4-115.)
Session Limiting
When you configure or modify a policy, you can define a limit to the number of
sessions from a source IP address. You can configure the device to either issue an
alarm and allow the session to continue, or drop any further traffic.
When you enforce session limiting, only the new sessions will be counted against
the configured session limit for the source IP address to which the policy is applied.
Similarly, in the case of NetScreen Redundancy Protocol (NSRP) or Virtual Router
Redundancy Protocol (VRRP) clusters, the sessions that are reflected in the backup
device will not be counted against the configured session limit. When a failover
occurs, the backup device that takes over as the primary will allow any new
sessions only within the limit, or after any existing sessions age out if the sessions
count has reached the threshold.
NOTE: You can also perform Source Network Address Translation (NAT-src) at the
interface level, known as Network Address Translation (NAT). For information
about both interface-level NAT-src and NAT, see “NAT Mode” on page 92.
No Hardware Session
Using this option, you can disable the security device from creating a hardware
session for a specific type of traffic. This option is useful for debugging and for
when some types of traffic, such as PPTP, cannot be handled efficiently by the
ASIC. In the CLI, use the no-hw-sess argument in the set policy command.
NOTE: Enabling or disabling this feature after a session has been created does not affect
the session.
For TCP traffic, you must create a dummy hardware session to pass the traffic to
the CPU.
User Authentication
Selecting this option requires the auth user at the source address to authenticate
his/her identity by supplying a username and password before traffic is allowed to
traverse the firewall or enter the VPN tunnel. The security device can use the local
database or an external RADIUS, SecurID, or LDAP auth server to perform the
authentication check.
If a host supports multiple auth user accounts (as with a UNIX host running
Telnet), then after the security device authenticates the first user, all other users
from that host can pass traffic through the security device without being
authenticated, having inherited the privileges of the first user.
Run-Time Authentication
The run-time authentication process proceeds as follows:
1. When the auth user sends an HTTP, an FTP, or a Telnet connection request to
the destination address, the security device intercepts the packet and buffers it.
3. The auth user responds to this prompt with his/her username and password.
For the initial connection request, a policy must include one or all of the three
following services: Telnet, HTTP, or FTP. Only a policy with one or all of these
services is capable of initiating the authentication process. You can use any of the
following services in a policy involving user authentication:
A service group that includes the service or services you want, plus one or more
of the three services required to initiate the authentication process (Telnet, FTP,
or HTTP). For example, you can create a custom service group named “Login”
that supports FTP, NetMeeting, and H.323 services. Then, when you create the
policy, specify Login as the service.
NOTE: A policy with authentication enabled does not support DNS (port 53) as the
service.
1. The auth user makes an HTTP connection to the IP address of the WebAuth
server.
3. The auth user responds to this prompt with his/her username and password.
4. The security device or an external auth server authenticates the auth user’s
login information.
If the authentication attempt is successful, the security device permits the auth
user to initiate traffic to destinations as specified in policies that enforce
authentication via the WebAuth method.
NOTE: For more information about these two user authentication methods, see
“Referencing Auth Users in Policies” on page 9-46.
You can restrict or expand the range of auth users to which the policy applies by
selecting a specific user group, local or external user, or group expression. (For
information about group expressions, see “Group Expressions” on page 9-5.) If you
do not reference an auth user or user group in a policy (in the WebUI, select the
Allow Any option), the policy applies to all auth users in the specified auth server.
NOTE: ScreenOS links authentication privileges with the IP address of the host from
which the auth user logs on. If the security device authenticates one user from a
host behind a NAT device that uses a single IP address for all NAT assignments,
then users at other hosts behind that NAT device automatically receive the same
privileges.
HA Session Backup
When two security devices are in an NSRP cluster for high availability (HA), you can
specify which sessions to backup and which not to backup. For traffic whose
sessions you do not want backed up, apply a policy with the HA session backup
option disabled. In the WebUI, clear the HA Session Backup check box. In the CLI,
use the no-session-backup argument in the set policy command. By default,
security devices in an NSRP cluster back up sessions.
Web Filtering
Web filtering, also called URL filtering, enables you to manage Internet access and
prevent access to inappropriate web content. For more information, see “Web
Filtering” on page 4-97.
Logging
When you enable logging in a policy, the security device logs all connections to
which that particular policy applies. You can view the logs through either the WebUI
or CLI. In the WebUI, click Reports > Policies > Logging (for the policy whose log
you want to see). In the CLI, use the get log traffic policy id_num command.
NOTE: For more information about viewing logs and graphs, see “Monitoring Security
Devices” on page 3-55.
Counting
When you enable counting in a policy, the security device counts the total number
of bytes of traffic to which this policy applies and records the information in
historical graphs. To view the historical graphs for a policy in the WebUI, click
Reports > Policies > Counting (for the policy whose traffic count you want to
see).
NOTE: For more information about traffic alarms, see “Traffic Alarms” on page 3-68.
Schedules
By associating a schedule to a policy, you can determine when the policy is in
effect. You can configure schedules to recur or as a one-time event. Schedules
provide a powerful tool for controlling the flow of network traffic and enforcing
network security. For an example of the latter, if you were concerned about
employees transmitting important data outside the company, you might set a policy
that blocked outbound FTP-Put and MAIL traffic after normal business hours.
In the WebUI, define schedules on the Policy > Policy Elements > Schedules
page. In the CLI, use the set schedule command.
NOTE: In the WebUI, scheduled policies appear with a gray background to indicate that
the current time is not within the defined schedule. When a scheduled policy
becomes active, it appears with a white background.
Antivirus Scanning
Some Juniper Networks security devices support an internal AV scanner that you
can configure to filter FTP, HTTP, IMAP, POP3, and SMTP traffic. If the embedded AV
scanner detects a virus, it drops the packet and sends a message reporting the virus
to the client initiating the traffic.
NOTE: For more information about antivirus scanning, see “Antivirus Scanning” on
page 173.
Traffic Shaping
You can set parameters for the control and shaping of traffic for each policy.
Table 28 describes the traffic shaping parameters.
5 fn_bldgblck.fm
Parameter Description
Guaranteed Guaranteed throughput in kilobits per second (kbps). Traffic below this
Bandwidth threshold passes with the highest priority without being subject to any traffic
management or shaping mechanism.
Maximum Secured bandwidth available to the type of connection in kilobits per second
Bandwidth (kbps). Traffic beyond this threshold is throttled and dropped.
Note: It is advised that you do not use rates less than 10 Kbps. Rates below this
threshold lead to dropped packets and excessive retries that defeat the purpose
of traffic management.
Traffic Priority When traffic bandwidth falls between the guaranteed and maximum settings,
the security device passes higher priority traffic first, and lower priority traffic
only if there is no other higher priority traffic. There are eight priority levels.
DiffServ Differentiated Services (DiffServ) is a system for tagging (or “marking”) traffic at
Codepoint a position within a hierarchy of priority. You can map the eight ScreenOS
Marking priority levels to the DiffServ system. By default, the highest priority (priority 0)
in the ScreenOS system maps to the first three bits (111) in the DiffServ field
(see RFC 2474), or the IP precedence field in the TOS byte (see RFC 1349), in
the IP packet header. The lowest priority (priority 7) in ScreenOS maps to (000)
in the TOS DiffServ system. When you enable DSCP, ScreenOS overwrites the
first 3 bits in the ToS byte with the IP precedence priority. When you enable
DSCP and set a dscp-byte value, ScreenOS overwrites the first 6 bits of the ToS
byte with the DSCP value.
Note: Some devices require that you explicitly enable DSCP marking by setting
a system-wide environmental variable. Refer to the installation and
configuration manual for your device to find out if it requires that you explicitly
enable DSCP marking before using it in policies. If your device requires it, use
the following command to enable DSCP marking system wide: set envar
ipsec-dscp-mark=yes. This variable cannot be set using the WebUI. Use the
unset envar ipsec-dscp-mark to disable DSCP marking system wide.
NOTE: For a more detailed discussion of traffic management and shaping, see “Traffic
Shaping” on page 193.
To change the mapping between the ScreenOS priority levels and the DiffServ
system, use the following CLI command:
where number0 is the mapping for priority 0 (the highest priority in the TOS
DiffServ system), number1 is the mapping for priority 1, and so on.
To subsume IP precedence into class selector codepoints—that is, to zero out the
second three bits in the DiffServ field and thus insure that priority levels you set
with ip_precedence are preserved and handled correctly by downstream
routers—use the following CLI command:
Policies Applied
This section describes the management of policies: viewing, creating, modifying,
ordering and reordering, and removing policies.
Viewing Policies
To view policies through the WebUI, click Policies. You can sort the displayed
policies by source and destination zones by choosing zone names from the From
and To drop-down lists and then clicking Go. In the CLI, use the get policy [ all |
from zone to zone | global | id number ] command.
Creating Policies
To allow traffic to flow between two zones, you create policies to deny, permit,
reject, or tunnel traffic between those zones. You can also create policies to control
traffic within the same zone if the security device is the only network device that
can route the intrazone traffic between the source and destination addresses
referenced in the policy. You can also create global policies, which make use of
source and destination addresses in the Global zone address book.
To allow bidirectional traffic between two zones—for example, between the Trust
and Untrust zones—you need to create a policy that goes from Trust to Untrust, and
then create a second policy from Untrust to Trust. Depending on your needs, the
policies can use the same or different IP addresses, only the source and destination
addresses are reversed.
You can define policies between any zones that are located within the same
system—root or virtual. To define a policy between the root system and a vsys, one
of the zones must be a shared zone. (For information about shared zones in relation
to virtual systems, see Volume 10: Virtual Systems.)
The first policy allows internal users in the Trust zone to send and retrieve email
from a local mail server in the DMZ zone. This policy permits the services MAIL
(that is, SMTP) and POP3 originating from the internal users to traverse the Juniper
Networks firewall to reach the local mail server.
The second and third policies permit the service MAIL to traverse the firewall
between the local mail server in the DMZ zone and a remote mail server in the
Untrust zone.
However, before creating policies to control traffic between different security zones,
you must first design the environment in which to apply those policies. First, you
first bind interfaces to zones and assign the interfaces IP addresses:
Define an address in the Trust zone named “corp_net” and assign it IP address
10.1.1.0/24.
Define an address in the DMZ zone named “mail_svr” and assign it IP address
1.2.2.5/32.
Third, you create a service group named “MAIL-POP3” containing the two
predefined services MAIL and POP3.
Fourth, you configure a default route in the trust-vr routing domain pointing to the
external router at 1.1.1.250 through ethernet0/3.
After completing steps 1 through 4, you can then create the policies necessary to
permit the transmission, retrieval, and delivery of email in and out of your
protected network.
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet0/1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet0/2): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet0/3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Select MAIL and use the << button to move the service from the Available
Members column to the Group Members column.
Select POP3 and use the << button to move the service from the Available
Members column to the Group Members column.
4. Route
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
5. Policies
Policy > Policies > (From: Trust, To: DMZ) > New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), corp_net
Destination Address:
Address Book Entry: (select), mail_svr
Service: Mail-POP3
Action: Permit
Policy > Policies > (From: DMZ, To: Untrust) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), mail_svr
Destination Address:
Address Book Entry: (select), r-mail_svr
Service: MAIL
Action: Permit
Policy > Policies > (From: Untrust, To: DMZ) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), r-mail_svr
Destination Address:
Address Book Entry: (select), mail_svr
Service: MAIL
Action: Permit
CLI
1. Interfaces
set interface ethernet0/1 zone trust
set interface ethernet0/1 ip 10.1.1.1/24
set interface ethernet0/2 zone dmz
set interface ethernet0/2 ip 1.2.2.1/24
set interface ethernet0/3 zone untrust
set interface ethernet0/3 ip 1.1.1.1/24
2. Addresses
set address trust corp_net 10.1.1.0/24
set address dmz mail_svr 1.2.2.5/32
set address untrust r-mail_svr 2.2.2.5/32
3. Service Group
set group service MAIL-POP3
set group service MAIL-POP3 add mail
set group service MAIL-POP3 add pop3
4. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet0/3 gateway 1.1.1.250
5. Policies
set policy from trust to dmz corp_net mail_svr MAIL-POP3 permit
set policy from dmz to untrust mail_svr r-mail_svr MAIL permit
set policy from untrust to dmz r-mail_svr mail_svr MAIL permit
save
ABC Design also has a DMZ zone for its web and mail servers.
The following example presents a typical set of policies for the following users:
“Eng” can use all the services for outbound traffic except FTP-Put, IMAP, MAIL,
and POP3.
“Office” can use email and access the Internet, provided they authenticate
themselves via WebAuth. (For information about WebAuth user authentication,
see “Authentication Users” on page 9-45.)
Everyone in the Trust zone can access the Web and mail servers in the DMZ
zone.
A remote mail server in the Untrust zone can access the local mail server in the
DMZ zone.
Untrust Zone
Internet
www.abc.com
mail.abc.com
External Router
Security Device
Internal Router
DMZ Zone
Trust Zone
It is assumed that you have already configured the interfaces, addresses, service
groups, and routes that must be in place. For more information about configuring
these, see “Interfaces” on page 35, “Addresses” on page 103, “Service Groups” on
page 138, and Volume 7: Routing.
WebUI
1. From Trust to Untrust
Policy > Policies > (From: Trust, To: Untrust) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Eng
Destination Address:
Address Book Entry: (select), Any
Service: ANY
Action: Permit
Policy > Policies > (From: Trust, To: Untrust) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Office
Destination Address:
Address Book Entry: (select), Any
Service: Internet
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
Authentication: (select)
WebAuth: (select)
NOTE: “Internet” is a service group with the following members: FTP-Get, HTTP, and
HTTPS.
Policy > Policies > (From: Trust, To: Untrust) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: Com
Action: Reject
Position at Top: (select)
NOTE: “Com” is a service group with the following members: FTP-Put, MAIL, IMAP, and
POP3.
For traffic from the Untrust zone to the Trust zone, the default deny policy denies
everything.
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), mail.abc.com
Service: MAIL
Action: Permit
Policy > Policies > (From: Untrust, To: DMZ) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), www.abc.com
Service: Web
Action: Permit
NOTE: “Web” is a service group with the following members: HTTP and HTTPS.
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), mail.abc.com
Service: e-mail
Action: Permit
NOTE: “e-mail” is a service group with the following members: MAIL, IMAP, and POP3.
Policy > Policies > (From: Trust, To: DMZ) New: Enter the following, then click
OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), www.abc.com
Service: Internet
Action: Permit
Policy > Policies > (From: Trust, To: DMZ) New: Enter the following, then click
OK:
Source Address:
Address Book Entry: (select), sys-admins
Destination Address:
Address Book Entry: (select), Any
Service: ANY
Action: Permit
Source Address:
Address Book Entry: (select), mail.abc.com
Destination Address:
Address Book Entry: (select), Any
Service: MAIL
Action: Permit
CLI
1. From Trust to Untrust
set policy from trust to untrust eng any any permit
set policy from trust to untrust office any Internet permit webauth
set policy top from trust to untrust any any Com reject
NOTE: “Internet” is a service group with the following members: FTP-Get, HTTP, and
HTTPS.
“Com” is a service group with the following members: FTP-Put, MAIL, IMAP, and
POP3.
NOTE: “Web” is a service group with the following members: HTTP and HTTPS.
NOTE: “e-mail” is a service group with the following members: MAIL, IMAP, and POP3.
“Internet” is a service group with the following members: FTP-Get, HTTP, and
HTTPS.
WebUI
1. Trust Zone—Interfaces and Blocking
Network > Interfaces > Edit (for ethernet0/1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet0/1): Enter the following, then click
Apply:
Network > Zones > Edit (for Trust): Enter the following, then click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), accounting
Destination Address:
Address Book Entry: (select), Hamilton
Service: ANY
Action: Permit
CLI
1. Trust Zone—Interfaces and Blocking
set interface ethernet0/1 zone trust
set interface ethernet0/1 ip 10.1.1.1/24
NOTE: To use a domain name instead of an IP address, be sure to have DNS service
configured on the security device.
WebUI
1. Global Address
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), server1
Service: HTTP
Action: Permit
CLI
1. Global Address
set address global server1 www.juniper.net
2. Policy
set policy global any server1 http permit
save
set policy id 1 from trust to untrust host1 server1 HTTP permit attack
HIGH:HTTP:SIGS action close
If you want to make some changes to the policy, such as adding another source or
destination address, another service, or another attack group, you can enter the
context for policy 1 and then enter the pertinent commands:
set policy id 1
device(policy:1)-> set src-address host2
device(policy:1)-> set dst-address server2
device(policy:1)-> set service FTP
device(policy:1)-> set attack CRITICAL:HTTP:SIGS
You can also remove multiple items for a single policy component as long as you do
not remove them all. For example, you can remove server2 from the above
configuration, but not server2 and server1 because then no destination address
would remain.
Source address
Destination address
Service
Attack group
In ScreenOS releases prior to 5.0.0, the only way to have multiple source and
destination addresses or services is to first create an address or service group with
multiple members and then reference that group in a policy. You can still use
address and service groups in policies in ScreenOS 5.0.0. In addition, you can
simply add extra items directly to a policy component.
NOTE: If the first address or service referenced in a policy is “Any,” you cannot logically
add anything else to it. ScreenOS prevents this kind of misconfiguration and
displays an error message should it occur.
WebUI
To add more addresses and services, click the Multiple button next to the
component to which you want to add more items. To add more attack groups,
click the Attack Protection button. Select an item in the “Available Members”
column, and then use the << key to move it to the “Active Members” column.
You can repeat this action with other items. When finished, click OK to return
to the policy configuration page.
CLI
Enter the policy context with the following command:
In the WebUI, this option is available on the pop-up that appears when you click
Multiple next to either Source Address or Destination Address on the policy
configuration page.
NOTE: Address negation occurs at the policy component level, applying to all items in the
negated component. However, you cannot enforce address negation with a
wildcard address.
In this example, you create an intrazone policy that allows all addresses in the Trust
zone access to all FTP servers except to an FTP server named “vulcan”, which
engineering uses to post functional specifications for one another.
However, before creating the policy, you must first design the environment in which
to apply it. First, you enable intrazone blocking for the Trust zone. Intrazone
blocking requires a policy lookup before the security device passes traffic between
two interfaces bound to the same zone.
Second, you bind two interfaces to the Trust zone and assign them IP addresses:
You bind ethernet0/1 to the Trust zone and assign it IP address 10.1.1.1/24.
You bind ethernet0/4 to the Trust zone and assign it IP address 10.1.2.1/24.
Third, you create an address (10.1.2.5/32) for the FTP server named “vulcan” in the
Trust zone.
After completing these two steps, you can then create the intrazone policies.
NOTE: You do not have to create a policy for the engineering department to reach their
FTP server because the engineers are also in the 10.1.2.0/24 subnet and do not
have to cross the Juniper Networks firewall to reach their own server.
ethernet0/1 ethernet0/4
10.1.1.1/24 10.1.2.1/24
Internal Switches
10.1.1.0/24 10.1.2.0/24
(Rest of Corporate) (Engineering)
Trust Zone
Intrazone Blocking Enabled FTP Server
“vulcan”
10.1.2.5
WebUI
1. Intrazone Blocking
Network > Zones > Edit (for Trust): Enter the following, then click OK:
Network > Interfaces > Edit (for ethernet0/4): Enter the following, then click
Apply:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), vulcan
> Click Multiple, select Negate Following, then click OK to return to the
basic policy configuration page.
Service: FTP
Action: Permit
CLI
1. Intrazone Blocking
set zone trust block
2. Trust Zone Interfaces
set interface ethernet0/1 zone trust
set interface ethernet0/1 ip 10.1.1.1/24
set interface ethernet0/1 nat
set interface ethernet0/4 zone trust
set interface ethernet0/4 ip 10.1.2.1/24
set interface ethernet0/1 nat
3. Address
set address trust vulcan 10.1.2.5/32
4. Policy
set policy from trust to trust any !vulcan ftp permit
save
ScreenOS also provides a means for enabling and disabling policies. By default, a
policy is enabled. To disable it, do the following:
WebUI
Policies: Clear the Enable check box in the Configure column for the policy that
you want to disable.
CLI
set policy id id_num disable
save
NOTE: To enable the policy again, select Enable in the Configure column for the policy
that you want to enable (WebUI), or type unset policy id id_num disable (CLI).
Policy Verification
ScreenOS offers a tool for verifying that the order of policies in the policy list is
valid. It is possible for one policy to eclipse, or “shadow,” another policy. Consider
the following example:
Because the security device performs a policy lookup starting from the top of the
list, when it finds a match for traffic received, it does not look any lower in the
policy list. In the above example, the security device never reaches policy 2 because
the destination address “any” in policy 1 includes the more specific “dst-A” address
in policy 2. When an HTTP packet arrives at the security device from an address in
the Trust zone bound for dst-A in the Untrust zone, the security device always first
finds a match with policy 1.
To correct the above example, you can simply reverse the order of the policies,
putting the more specific one first:
This command reports the shadowing and shadowed policies. It is then the admin’s
responsibility to correct the situation.
NOTE: The concept of policy shadowing refers to the situation where a policy higher in
the policy list always takes effect before a subsequent policy. Because the policy
lookup always uses the first policy it finds that matches the five-part tuple of
source and destination zone, source and destination address, and service type, if
another policy applies to the same tuple (or a subset of the tuple), the policy
lookup uses the first policy in the list and never reaches the second one.
The policy verification tool cannot detect the case where a combination of policies
shadows another policy. In the following example, no single policy shadows
policy 3; however, policies 1 and 2 together do shadow it:
Reordering Policies
The security device checks all attempts to traverse the firewall against policies,
beginning with the first one listed in the policy set for the appropriate list (see
“Policy Set Lists” on page 163) and moving through the list. Because the security
device applies the action specified in the policy to the first matching policy in the
list, you must arrange them from the most specific to the most general. (Whereas a
specific policy does not preclude the application of a more general policy located
down the list, a general policy appearing before a specific one does.)
By default, a newly created policy appears at the bottom of a policy set list. There is
an option that allows you to position a policy at the top of the list instead. In the
Policy configuration page in the WebUI, select Position at Top. In the CLI, add the
key word top to the set policy command: set policy top …
WebUI
There are two ways to reorder policies in the WebUI: by clicking the circular
arrows or by clicking the single arrow in the Configure column for the policy
you want to move.
To move the policy to the very end of the list, enter <-1>. To move it up in
the list, enter the ID number of the policy above which you want to move
the policy in question.
A Policy Move page appears displaying the policy you want to move and a
table displaying the other policies.
In the table displaying the other policies, the first column, Move Location,
contains arrows pointing to various locations where you can move the
policy. Click the arrow that points to the location in the list where you want
to move the policy.
The Policy List page reappears with the policy you moved in its new position.
CLI
set policy move id_num { before | after } number
save
Removing a Policy
In addition to modifying and repositioning a policy, you can also delete it. In the
WebUI, click Remove in the Configure column for the policy that you want to
remove. When the system message prompts for confirmation to proceed with the
removal, click Yes. In the CLI, use the unset policy id_num command.1
This chapter discusses the various ways you can use your Juniper Networks security
device to manage limited bandwidth without compromising quality and availability
of the network to all of your users. It contains the following sections:
The traffic-shaping function applies to traffic from all policies. If you turn off traffic
shaping for a specific policy, while traffic shaping is still turned on for other policies,
the system applies a default traffic-shaping policy to that particular policy, with the
following parameters:
Guaranteed bandwidth 0
NOTE: You can enable mapping of priority levels to the Differentiated Services codepoint
(DSCP) marking system. For more information about DSCP marking, see “Traffic
Shaping” on page 173.
You can turn off traffic shaping system wide using the set traffic-shaping mode off
command. Use the set traffic-shaping mode on command to turn on shaping on
an interface. You can set traffic shaping to automatic in the WebUI: Configuration
> Advanced > Traffic Shaping. In automatic mode, if traffic shaping in enabled
on the policy, the device turns on traffic shaping when traffic hits the device and
turns off traffic shaping when no traffic hits the device.
NOTE: You cannot perform traffic-shaping on ASIC-based ISG1000, ISG2000, and NS5000
devices. ScreenOS supports traffic-shaping on non-ASIC devices.
T3–45 Mbps
Marketing: 10 Mbps In, 10 Mbps Out
Internet
Router Router
Sales: 5 Mbps In, 10 Mbps Out
DMZ for
Servers DMZ Zone
Support: 5 Mbps In, 5 Mbps Out
WebUI
1. Bandwidth on Interfaces
Network > Interfaces > Edit (for ethernet0/1): Enter the following, then click
OK:
NOTE: If you do not specify bandwidth settings on an interface, the security device uses
the available physical bandwidth.
Network > Interfaces > Edit (for ethernet0/3): Enter the following, then click
OK:
NOTE: You can also enable traffic shaping in policies referencing VPN tunnels.
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
Policy > Policies > (From: Trust, To: Untrust) New: Enter the following, then
click OK:
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
Policy > Policies > (From: Trust, To: Untrust) New: Enter the following, then
click OK:
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
Policy > Policies > (From: Untrust, To: Trust) New: Enter the following, then
click OK:
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
Policy > Policies > (From: Untrust, To: Trust) New: Enter the following, then
click OK:
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
Policy > Policies > (From: Untrust, To: Trust) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Support
Service: Any
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
CLI
To enable traffic shaping by policy, do the following:
1. Bandwidth on Interfaces
set interface ethernet0/1 bandwidth 45000
set interface ethernet0/3 bandwidth 45000
NOTE: If you do not specify bandwidth settings on an interface, the security device uses
the available physical bandwidth.
2. Bandwidth in Policies
set policy name “Marketing Traffic Shaping” from trust to untrust marketing any
any permit traffic gbw 10000 priority 0 mbw 15000
set policy name “Sales Traffic Shaping Policy” from trust to untrust sales any any
permit traffic gbw 10000 priority 0 mbw 10000
set policy name “Support Traffic Shaping Policy” from trust to untrust support any
any permit traffic gbw 5000 priority 0 mbw 10000
set policy name “Allow Incoming Access to Marketing” from untrust to trust any
marketing any permit traffic gbw 10000 priority 0 mbw 10000
set policy name “Allow Incoming Access to Sales” from untrust to trust any sales
any permit traffic gbw 5000 priority 0 mbw 10000
set policy name “Allow Incoming Access to Support” from untrust to trust any
support any permit traffic gbw 5000 priority 0 mbw 5000
save
High priority
2nd priority
3rd priority
4th priority
5th priority
6th priority
7th priority
The priority setting for a policy means that the bandwidth not already guaranteed
to other policies is queued on the basis of high priority first and low priority last.
Policies with the same priority setting compete for bandwidth in a round robin
fashion. The security device processes all of the traffic from all of the policies with
high priority before processing any traffic from policies with the next lower priority
setting, and so on, until all traffic requests have been processed. If traffic requests
exceed available bandwidth, the lowest priority traffic is dropped.
CAUTION: Be careful not to allocate more bandwidth than the interface can
support. The policy configuration process does not prevent you from creating
unsupported policy configurations. You can lose data if the guaranteed bandwidth
on contending policies surpasses the traffic bandwidth set on the interface.
If you do not allocate any guaranteed bandwidth, then you can use priority queuing
to manage all of traffic on your network. That is, all high priority traffic is sent
before any 2nd priority traffic is sent, and so on. The security device processes low
priority traffic only after all other traffic has been processed.
If all three departments send and receive traffic concurrently through the firewall,
the security device must allocate 20 Mbps of bandwidth to fulfill the guaranteed
policy requirements. The interface ethernet0/1 is bound to the Trust zone, and
ethernet0/3 is bound to the Untrust zone.
T3–45 Mbps
Support: 5Mbps Out, 5Mbps In, High Priority
Internet
Router Router
Sales: 2.5 Mbps Out, 3.5 Mbps In, 2nd Priority
DMZ for
Servers DMZ Zone
Marketing: 2.5 Mbps Out, 1.5 Mbps In, 3rd Priority
WebUI
1. Bandwidth on Interfaces
Interfaces > Edit (for ethernet0/1): Enter the following, then click OK:
Interfaces > Edit (for ethernet0/3): Enter the following, then click OK:
2. Bandwidth in Policies
Policy > Policies > (From: Trust, To: Untrust) New: Enter the following, then
click OK:
Name: Sup-out
Source Address:
Address Book Entry: (select), Support
Destination Address:
Address Book Entry: (select), Any
Service: Any
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NOTE: Differentiated Services (DS) is a system for tagging (or “marking”) traffic at a
position within a hierarchy of priority. DSCP marking maps the ScreenOS priority
level of the policy to the first three bits of codepoint in the DS field in the IP packet
header. For more information about DSCP marking, see “Traffic Shaping” on
page 173.
Policy > Policies > (From: Trust, To: Untrust) New: Enter the following, then
click OK:
Name: Sal-out
Source Address:
Address Book Entry: (select), Sales
Destination Address:
Address Book Entry: (select), Any
Service: Any
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
Policy > Policies > (From: Trust, To: Untrust) New: Enter the following, then
click OK:
Name: Mar-out
Source Address:
Address Book Entry: (select), Marketing
Destination Address:
Address Book Entry: (select), Any
Service: Any
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
Policy > Policies > (From: Untrust, To: Trust) New: Enter the following, then
click OK:
Name: Sup-in
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Support
Service: Any
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
Policy > Policies > (From: Untrust, To: Trust) New: Enter the following, then
click OK:
Name: Sal-in
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Sales
Service: Any
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
Policy > Policies > (From: Untrust, To: Trust) New: Enter the following, then
click OK:
Name: Mar-in
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Marketing
Service: Any
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
CLI
1. Bandwidth on Interfaces
set interface ethernet0/1 bandwidth 40000
set interface ethernet0/3 bandwidth 40000
2. Bandwidth in Policies
set policy name sup-out from trust to untrust support any any permit traffic gbw
5000 priority 0 mbw 40000 enable
set policy name sal-out from trust to untrust sales any any permit traffic gbw 2500
priority 2 mbw 40000 dscp enable
NOTE: Some devices require that you explicitly enable DSCP marking by setting a
system-wide environmental variable. Refer to the installation and configuration
manual for your device to find out if it requires that you explicitly enable DSCP
marking before using it in policies. If your device requires it, use the following
command to enable DSCP marking system wide: set envar
ipsec-dscp-mark=yes. This variable cannot be set using the WebUI. Use the
unset envar ipsec-dscp-mark to disable DSCP marking system wide.
set policy name mar-out from trust to untrust marketing any any permit traffic gbw
2500 priority 3 mbw 40000 dscp enable
set policy name sup-in from untrust to trust any support any permit traffic gbw
5000 priority 0 mbw 40000 dscp enable
set policy name sal-in from untrust to trust any sales any permit traffic gbw 3500
priority 2 mbw 40000 dscp enable
set policy name mar-in from untrust to trust any marketing any permit traffic gbw
1500 priority 3 mbw 40000 dscp enable
save
Ingress Policing
Ingress policing is traffic control at the ingress side of the security device. By
constraining the flow of traffic at the point of ingress, traffic exceeding your
bandwidth setting is dropped with minimal processing, conserving system
resources. You can configure ingress policing at the interface level and in security
policies.
set policy my_ftp from untrust to trust any any ftp permit traffic pbw 10000
Incoming FTP traffic exceeding the configured policing bandwidth (the pbw
keyword) is dropped. You can also set mbw in the policy, but at the policy level
mbw applies only to the egress side of traffic flow—traffic exceeding your
configured rate is still processed, and is dropped only at the egress side (see
Figure 65, “Traffic-Shaping Packet Flow” on page 206). You can configure mbw or
pbw in a policy, but not both.
NOTE: Ingress policing on tunnel interfaces is enforced after the encrypted packets are
decrypted by the VPN engine.
Traffic shaping (as distinct from ingress policing) concerns traffic management at
the egress side of the security device. As with physical interfaces, you shape traffic
on virtual interfaces by setting bandwidth values at the interface level, and in
policies.
In the context of traffic shaping, the term virtual interfaces refers to subinterfaces
bound to physical interfaces and, by extension, tunnel interfaces bound to those
subinterfaces—creating a hierarchy of interfaces. A subinterface bound to a physical
interface is said to be the child of the physical interface, its parent. Accordingly, a
tunnel interface bound to a subinterface is the child of that subinterface, the
physical interface being its grandparent. Figure 64 illustrates these dependencies.
ethernet0/1
mbw 10000
ethernet0/1.1 ethernet0/1.2
gbw 5000 - mbw 7000 gbw 2000 - mbw 5000
Virtual Interfaces
When working with virtual interfaces, bear in mind the following rules of interface
hierarchy:
set interface ethernet0/4.1 bandwidth egress gbw 1000 mbw 2000 ingress mbw
2000
You set bandwidth in the WebUI on the Network > Interfaces > Edit page.
After setting bandwidth, you use the get traffic-shaping interface command to see
the actual bandwidth flowing through the security device. For example, you might
have traffic entering on ethernet0/1 and exiting on ethernet0/3. If you set ingress
bandwidth on ethernet0/1, the command get traffic-shaping interface
ethernet0/3 will show actual throughput on the device.
If you set traffic shaping at the interface, you must also set traffic-shaping mode to
on (set traffic-shaping mode on).
set policy from trust to untrust any any ftp permit traffic gbw 1000 pbw 2000
Note that this command uses the policing bandwidth (pbw) keyword. You can use
pbw or mbw in a policy, but not both. The advantage to using pbw is that traffic is
dropped at the ingress side of the security device, reducing throughput processing
and conserving system resources. (See “Ingress Policing” on page 2-203.)
In the WebUI, after creating a policy, click the Advanced button to configure
traffic-shaping parameters.
Packet Flow
Figure 65 illustrates the part of the packet flow through the security device that is
affected by traffic shaping and policing. (See “Packet-Flow Sequence” on page 2-10
for a complete picture of packet flow.) Packets exceeding pbw (or mbw configured
at the interface) are dropped at step 9; shaping and DSCP marking occur at step 10,
and packets exceeding mbw (configured in a policy) are dropped at step 11.
Session Table
d 977 vsys id 0, flag 000040/00, Ingress Interface Shape and DSCP mark Proceed through all egress
pid -1, did 0, time 180 the packet, then queue it interfaces on the device and
13 (01) 10.10.10.1/1168 -> or
at the egress interface transmit packets in the queue
211.68.1.2/80, 6, 002be0c0066b,
Policy
subif 0, tun 0
Clients
Server
IP Address/Netmask: 10.1.1.1/24
Zone: Trust
Network > Interfaces > Sub-IF > New: Enter the following, then click Apply:
Network > Interfaces > New Tunnel IF: Enter the following, then click Apply:
VPNs > AutoKey IKE New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
IP Address/Netmask: 10.2.0.2/24
Zone: Trust
Network > Interfaces > Sub-IF > New: Enter the following, then click Apply:
Network > Interfaces > Tunnel IF > New: Enter the following, then click
Apply:
Network > Interfaces > Edit (for tunnel.1): Enter the following, then click OK:
3. Route
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
4. IKE
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
VPNs > AutoKey IKE New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Service: Any
Action: Permit
Policy > Policies > (From: Untrust, To: Trust) New: Enter the following, then
click OK:
Service: Any
Action: Permit
4. Policy
set policy from trust to untrust any any any permit
set policy from untrust to trust any any any permit
save
ethernet0/2, ethernet0/2,
ethernet0/1, 2.1.1.1 10.2.2.1 ethernet0/1,
10.1.1.1.1 1.1.1.2
Clients
Server
IP Address/Netmask: 10.1.1.1/24
Zone: Trust
Interface mode: (select) NAT
Network > Interfaces > Edit (for ethernet0/2): Enter the following, then click
OK:
IP Address/Netmask: 2.1.1.1/24
Zone: Untrust
Interface mode: (select) Route
2. IKE VPN
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
Preshared Key
> Advanced: Enter the following advanced settings, then click OK to return
to basic Gateway configuration page:
VPNs > AutoKey IKE New: Enter the following, then click OK:
4. Routing
Network > Routing > Destination > New: Enter the following, then click OK:
Name: 1
Service: FTP
Action: Tunnel
Tunnel VPN: (select), device2_vpn
Modify matching bidirectional VPN policy: (select)
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Policies configuration page:
IP Address/Netmask: 1.1.1.1/24
Zone: Trust
Interface mode: (select) Route
Network > Interfaces > Edit (for ethernet0/2): Enter the following, then click
OK:
IP Address/Netmask: 10.2.2.1/24
Zone: Untrust
Interface mode: (select) NAT
2. IKE VPN
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
3. Preshared Key
Preshared Key: secret
Outgoing Interface: ethernet0/2
> Advanced: Enter the following advanced settings, then click OK to return
to basic Gateway configuration page:
VPNs > AutoKey IKE New: Enter the following, then click OK:
Name: 1
Service: FTP
Action: Tunnel
Tunnel VPN: (select), device1_vpn
Modify matching bidirectional VPN policy: (select)
You can shape traffic in a policy that uses DSCP marking, or you can use DSCP
marking independent of traffic shaping. Traffic shaping governs how traffic is
processed on the security device and can be configured at the interface level or in
policies. DSCP marking, which you set at the policy level, governs how traffic is
processed by downstream routers.
NOTE: Some devices require that you explicitly enable DSCP marking by setting a
system-wide environmental variable. Refer to the installation and configuration
manual for your device to find out if it requires that you explicitly enable DSCP
marking before using it in policies. If your device requires it, use the following
command to enable DSCP marking system wide: set envar
ipsec-dscp-mark=yes. This variable cannot be set using the WebUI. Use the
unset envar ipsec-dscp-mark to disable DSCP marking system wide.
If you specify DSCP marking in a policy but do not set a value, ScreenOS maps the
policy priority to an equivalent IP precedence priority in the DSCP system. It does
this by overwriting the first 3 bits in the ToS byte with the IP precedence priority.
For example, if you create a policy that gives all traffic a priority of, for example, 2
(0 is the highest priority), and you enable DSCP marking, ScreenOS queues traffic
for that policy with level 2 priority at the egress interface and marks it with an
equivalent IP precedence priority. The following command creates a policy that
gives priority 2 to all traffic, and enables DSCP marking:
set policy from trust to untrust any any any permit traffic priority 2 dscp enable
But if you give DSCP a dscp-byte value of, for example, 46 (the highest priority), the
security device still queues traffic at the egress interface at priority 2 but overwrites
the first 6 bits of the ToS byte with the DSCP value.
set policy from trust to untrust any any any permit traffic priority 2 dscp enable
value 46
DSCP marking is supported on all platforms and can be configured with traffic
shaping or independently.
WebUI
VPNs > AutoKey IKE > Edit: Select the following options, then click Apply.
You can disable DSCP marking by selecting the Disable option in the DSCP Mark
field.
CLI
The following command enables DSCP-marking and sets the 6-bit DSCP in the
IPSEC header to 52.
Table 31 shows how DSCP marking works for clear packets in policies. Table 32
shows how DSCP marking works for clear packets in policy-based VPNs. Table 33
shows how DSCP marking works for clear packets in route-based VPNs.
Description Action
Clear packet with no marking on the policy. No marking.
Clear packet with marking on the policy. The packet is marked based on the policy.
Premarked packet with no marking on the Retain marking in the packet.
policy.
Premarked packet with marking on the policy. Overwrite marking in the packet based on the
policy.
Description Action
Clear packet into policy-based VPN with no No marking.
marking on the policy.
Clear packet into policy-based VPN with The inner packet and IP header of the ESP are
marking on the policy. both marked, based on the policy.
Premarked packet into policy-based VPN with Copy the inner packet marking to the IP header
no marking on the policy. of the ESP, retain marking in the inner packet.
Premarked packet into policy-based VPN with Overwrite the marking in the inner packet
marking on the policy. based on the policy, and copy the inner packet
marking to the IP header of the ESP.
Description Action
Clear packet into route-based VPN with no No marking.
marking on the policy.
Clear packet into route-based VPN with The inner packet and IP header of the ESP are
marking on the policy. both marked, based on the policy.
Premarked packet into route-based VPN with Copy the inner packet marking to the IP header
no marking on the policy. of the ESP, retain marking in the inner packet.
Premarked packet into route-based VPN with Overwrite the marking in the inner packet
marking on the policy. based on the policy, and copy the inner packet
marking to the IP header of the ESP.
Address Book
Syslog
WebTrends
Websense
LDAP
SecurID
RADIUS
NetScreen-Security Manager
Before you can use DNS for domain name/address resolution, you must enter the
addresses for DNS servers in the security device.
NOTE: When enabling the security device as a Dynamic Host Configuration Protocol
(DHCP) server (see “Dynamic Host Configuration Protocol” on page 225), you
must also enter the IP addresses for DNS servers in the DHCP page on the WebUI
or through the set interface interface dhcp command in the CLI.
DNS Lookup
The security device refreshes all the entries in its DNS table by checking them with
a specified DNS server at the following times:
In addition to the existing method of setting a time for a daily automatic refresh of
the DNS table, you can also define an interval of time from 4 to 24 hours.
NOTE: When you add a fully qualified domain name (FQDN) such as an address or IKE
gateway through the WebUI, the security device resolves it when you click Apply
or OK. When you type a CLI command that references an FQDN, the security
device attempts to resolve it when you enter it.
When the security device connects to the DNS server to resolve a domain
name/IP address mapping, it stores that entry in its DNS status table. The following
list contains some of the details involved in a DNS lookup:
When a DNS lookup returns multiple entries, the address book accepts all
entries. The other programs listed on page 217 accept only the first one.
The security device reinstalls all policies if it finds that anything in the domain
name table has changed when you refresh a lookup using the Refresh button in
the WebUI or enter the exec dns refresh CLI command.
If a lookup fails, the security device removes it from the cache table.
If the domain name lookup fails when adding addresses to the address book,
the security device displays an error message stating that you have successfully
added the address but the DNS name lookup failed.
The security device must do a new lookup once a day, which you can schedule it to
do at a specified time.
WebUI
Network > DNS > Host: Enter the following, then click Apply:
DNS refresh every day at: Select check box and enter time <hh:mm>
CLI
set dns host schedule time_str
save
WebUI
Network > DNS > Host > Show DNS Lookup Table
CLI
get dns host report
Internet
WebUI
Network > DNS > Host: Enter the following, then click Apply:
CLI
set dns host dns1 24.0.0.3
set dns host dns2 24.1.64.38
set dns host schedule 23:00
save
WebUI
Network > DNS > Host: Enter the following, then click Apply:
CLI
set dns host schedule 00:01 interval 4
save
To use DDNS, create an account (username and password) on the DDNS server. The
server uses this account information to configure the client device.
Security Device
(CPE Router)
Internet Trust Zone
DDNS Server
ethernet7
dyndns.org or ddo.jp
Figure 69 shows how the DDNS concept works. When an IP address changes, the
client can use the hostname www.my_host.com to reach the protected webserver,
through either the dyndns.org server or the ddo.jp server. However, each of these
servers requires a different configuration on the security device interface.
If you have configured the DDNS server type as dyndns.org in your security device,
you can choose the following service options:
Unlike entries from a DDNS host, static DNS entries do not expire after 35 days
without an update. However, static updates take longer to propagate through
the DNS system and support a maximum of 5 hostnames.
custom—You can control the domain names and dynamic IP addresses over
the entire zone at the domain level, rather than at the domain-name level.
Using a custom DNS service, you can configure unlimited hostnames and
support for any domain purchased from dyndns.org. Changes you make to the
DNS are propagated instantly across the DNS network. Dynamic DNS entries
with the custom service never expire.
NOTE: Service options are available only with the dyndns.org service. For static and
custom DNS services, you can configure a higher value for the minimum update
interval than for dynamic DNS service, because the IP addresses change
infrequently.
WebUI
Network > DNS > DDNS > New: Enter the following, then click OK:
ID: 12
Server Settings
Server Type: dyndns
Server Name: members.dyndns.org
Refresh Interval: 24
Minimum Update Interval: 15
Account Settings
Username: swordfish
Password: ad93lvb
Agent: Netscreen-6.0.0z-015608200600056
Bind to Interface: ethernet7
Host Name: www.my_host.com
Service: dyndns
NOTE: Minimum Update Interval specifies the minimum time interval (expressed in
minutes) between DDNS updates. The default is 10 minutes, and the allowable
range is 1-1440. In some cases, the device might not update the interval because
the DNS server first needs to time out the DDNS entry from its cache. In addition,
if you set the Minimum Update Interval to a low value, the security device might
lock you out. The recommended minimum value is 10 minutes.
CLI
set dns ddns
set dns ddns enable
set dns ddns id 12 server members.dyndns.org server-type dyndns refresh-interval
24 minimum-update-interval 15
set dns ddns id 12 src-interface ethernet7 host-name myhost_dynamic.dyndns.org
service dyndns
set dns ddns id 12 username swordfish password ad93lvb
save
WebUI
Network > DNS > DDNS > New: Enter the following, then click OK:
ID: 25
Server Settings
Server Type: ddo
Server Name: juniper.net
Refresh Interval: 24
Minimum Update Interval: 15
Account Settings
Username: my_host
Password: ad93lvb
Agent: Netscreen-6.0.0z-015608200600056
Host Name: www.my_host.com
Bind to Interface: ethernet7
CLI
set dns ddns
set dns ddns enable
set dns ddns id 25 server ddo.jp server-type ddo refresh-interval 24
minimum-update-interval 15
set dns ddns id 25 src-interface ethernet7
set dns ddns id 25 username my_host password ad93lvb
save
Domain lookups are usually more efficient. For example, DNS queries meant
for the corporate domain (such as acme.com) could go to the corporate DNS
server exclusively, while all others go to the ISP DNS server, which reduces the
load on the corporate server. This can also prevent corporate domain
information from leaking into the Internet.
DNS proxy allows you to transmit selected DNS queries through a tunnel
interface, which prevents malicious users from learning about the internal
configuration of a network. For example, DNS queries bound for the corporate
server can pass through a tunnel interface to use security features such as
authentication, encryption, and anti-replay.
The following commands create two proxy-DNS entries that selectively forward
DNS queries to different servers.
tunnel.1
Corporate
DNS Servers
*
acme.com
2.1.1.21
2.1.1.34
acme_eng.com
Any DNS query with a FQDN containing the domain name acme.com goes out
through tunnel interface tunnel.1, to the corporate DNS server at IP address
2.1.1.21.
For example, if a host sends a DNS query for www.acme.com, the device
automatically directs the query to this server. (Let’s assume that the server
resolves the query to IP address 3.1.1.2.)
Any DNS query with a FQDN containing the domain name acme_eng.com goes
out through tunnel interface tunnel.1 to the DNS server at IP address 2.1.1.34.
All other DNS queries (denoted by an asterisk) bypass the corporate servers and
go out through interface ethernet0/3 to the DNS server at IP address 1.1.1.23.
For example, if the host and domain name is www.juniper.net, the device
automatically bypasses the corporate servers and directs the query to this
server, which resolves the query to IP address 207.17.137.68.
WebUI
Network > DNS > Proxy: Enter the following, then click Apply:
Network > DNS > Proxy > New: Enter the following, then click OK:
Network > DNS > Proxy > New: Enter the following, then click OK:
Network > DNS > Proxy > New: Enter the following, then click OK:
Domain Name: *
Outgoing Interface: ethernet0/3
Primary DNS Server: 1.1.1.23
CLI
set dns proxy
set dns proxy enable
set interface ethernet0/3 proxy dns
set dns server-select domain acme.com outgoing-interface tunnel.1 primary-server
2.1.1.21
set dns server-select domain acme_eng.com outgoing-interface tunnel.1
primary-server 2.1.1.34
set dns server-select domain * outgoing-interface ethernet0/3 primary-server
1.1.1.23
save
Different security devices support the different DHCP roles described in Table 35.
Role Description
DHCP Client Some security devices can act as DHCP clients, receiving a dynamically
assigned IP address for any physical interface in any zone.
DHCP Server Some security devices can also act as DHCP servers, allocating dynamic IP
addresses to hosts (acting as DHCP clients) on any physical or VLAN
interface in any zone.
Note: While using the DHCP server module to assign addresses to hosts
such as workstations in a zone, you can still use fixed IP addresses for
other machines such as mail servers and WINS servers.
DHCP Relay Agent Some security devices can also act as DHCP relay agents, receiving DHCP
information from a DHCP server and relaying that information to hosts on
any physical or VLAN interface in any zone.
DHCP Some security devices can simultaneously act as a DHCP client, server, and
Client/Server/Relay relay agent. You can only configure one DHCP role on a single interface.
Agent For example, you cannot configure the DHCP client and server on the same
interface. Optionally, you can configure the DHCP client module to forward
TCP/IP settings that it receives to the DHCP server module, for use when
providing TCP settings to hosts in the Trust zone acting as DHCP clients.
NOTE: On devices that can have multiple interfaces bound to the Trust zone, the default
interface is the first interface bound to that zone and assigned an IP address.
WINS servers (2): A Windows Internet Naming Service (WINS) server maps
a NetBIOS name used in a Windows NT network environment to an IP
address used on an IP-based network. The number in parentheses
indicates the number of servers supported.
NetInfo servers (2): NetInfo is an Apple network service used for the
distribution of administrative data within a LAN.
NetInfo tag (1): The identifying tag used by the Apple NetInfo database.
DNS servers (3): A Domain Name System (DNS) server maps a uniform
resource locator (URL) to an IP address.
SMTP server (1): A Simple Mail Transfer Protocol (SMTP) server delivers
SMTP messages to a mail server, such as a POP3 server, which stores the
incoming mail.
POP3 server (1): A Post Office Protocol version 3 (POP3) server stores
incoming mail. A POP3 server must work conjointly with an SMTP server.
News server (1): A news server receives and stores postings for news
groups.
NOTE: If a DHCP client to which the security device is passing the above parameters has
a specified IP address, that address overrides all the dynamic information received
from the DHCP server.
In Dynamic mode, the security device, acting as a DHCP server, assigns (or
“leases”) an IP address from an address pool to a host DHCP client. The IP
address is leased for a determined period of time or until the client relinquishes
the address. (To define an unlimited lease period, enter 0.)
NOTE: An address pool is a defined range of IP addresses within the same subnet from
which the security device can draw DHCP address assignments. You can group up
to 255 IP addresses.
The DHCP server supports up to 64 entries, which can include both single IP
addresses and IP address ranges, for dynamic and reserved IP addresses.
The security device saves every IP address assigned through DHCP in flash
memory. Consequently, rebooting the security device does not affect address
assignments.
In this example, using DHCP, the 172.16.10.0/24 network in the Trust zone is
sectioned into three IP address pools.
The DHCP server assigns all IP addresses dynamically, except for two workstations
with reserved IP addresses and four servers with static IP addresses. The interface
ethernet0/1 is bound to the Trust zone, has IP address 172.16.10.1/24, and is in
NAT mode. The domain name is dynamic.com.
Address Pool
172-16.10.120 –
172.16.10.129
Reserved IP
172.16.10.11
MAC: 12:34:ab:cd:56:78
WebUI
1. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
NOTE: If you leave the Gateway and Netmask fields as 0.0.0.0, the DHCP server module
sends the IP address and netmask set for ethernet0/1 to its clients (172.16.10.1
and 255.255.255.0 in this example). However, if you enable the DHCP client
module to forward TCP/IP settings to the DHCP server module (see “Propagating
TCP/IP Settings” on page 240), then you must manually enter 172.16.10.1 and
255.255.255.0 in the Gateway and Netmask fields, respectively.
> Advanced Options: Enter the following, then click OK to set the
advanced options and return to the basic configuration page:
WINS#2: 0.0.0.0
DNS#2: 172.16.10.241
DNS#3: 0.0.0.0
SMTP: 172.16.10.25
POP3: 172.16.10.110
NEWS: 0.0.0.0
NetInfo Server #1: 0.0.0.0
NetInfo Server #2: 0.0.0.0
NetInfo Tag: (leave field empty)
Domain Name: dynamic.com
> Addresses > New: Enter the following, then click OK:
Dynamic: (select)
IP Address Start: 172.16.10.10
IP Address End: 172.16.10.19
> Addresses > New: Enter the following, then click OK:
Dynamic: (select)
IP Address Start: 172.16.10.120
IP Address End: 172.16.10.129
> Addresses > New: Enter the following, then click OK:
Dynamic: (select)
IP Address Start: 172.16.10.210
IP Address End: 172.16.10.219
> Addresses > New: Enter the following, then click OK:
Reserved: (select)
IP Address: 172.16.10.11
Ethernet Address: 1234 abcd 5678
> Addresses > New: Enter the following, then click OK:
Reserved: (select)
IP Address: 172.16.10.112
Ethernet Address: abcd 1234 efgh
CLI
1. Addresses
set address trust dns1 172.16.10.240/32 “primary dns server”
set address trust dns2 172.16.10.241/32 “secondary dns server”
set address trust snmp 172.16.10.25/32 “snmp server”
set address trust pop3 172.16.10.110/32 “pop3 server”
2. DHCP Server
set interface ethernet0/1 dhcp server option domainname dynamic.com
set interface ethernet0/1 dhcp server option lease 0
set interface ethernet0/1 dhcp server option dns1 172.16.10.240
set interface ethernet0/1 dhcp server option dns2 172.16.10.241
set interface ethernet0/1 dhcp server option smtp 172.16.10.25
set interface ethernet0/1 dhcp server option pop3 172.16.10.110
set interface ethernet0/1 dhcp server ip 172.16.10.10 to 172.16.10.19
set interface ethernet0/1 dhcp server ip 172.16.10.120 to 172.16.10.129
set interface ethernet0/1 dhcp server ip 172.16.10.210 to 172.16.10.219
set interface ethernet0/1 dhcp server ip 172.16.10.11 mac 1234abcd5678
set interface ethernet0/1 dhcp server ip 172.16.10.112 mac abcd1234efgh
set interface ethernet0/1 dhcp server service
save
NOTE: If you do not set an IP address for the gateway or a netmask, the DHCP server
module sends its clients the IP address and netmask for ethernet0/1 (172.16.10.1
and 255.255.255.0 in this example). However, if you enable the DHCP client
module to forward TCP/IP settings to the DHCP server module (see “Propagating
TCP/IP Settings” on page 240), then you must manually set these options: set
interface ethernet0/1 dhcp server option gateway 172.16.10.1 and set interface
ethernet0/1 dhcp server option netmask 255.255.255.0.
The following are predefined DHCP services, as described in RFC 2132, DHCP
Options and BOOTP Vendor Extensions.
In situations where the predefined server options are inadequate, you can define
custom DHCP server options. For example, for certain Voice-over IP (VoIP)
configurations, it is necessary send extra configuration information, which is not
supported by predefined server options. In such cases, you must define suitable
custom options.
In the following example, you create DHCP server definitions for IP phones which
act as DHCP clients. The phones use the following custom options:
CLI
1. Addresses
set address trust dns1 172.16.10.240/32 “primary dns server”
set address trust dns2 172.16.10.241/32 “secondary dns server”
2. DHCP Server
set interface ethernet0/1 dhcp server option domainname dynamic.com
set interface ethernet0/1 dhcp server option lease 0
set interface ethernet0/1 dhcp server option dns1 172.16.10.240
set interface ethernet0/1 dhcp server option dns2 172.16.10.241
set interface ethernet0/1 dhcp server option custom 444 string “Server 4”
set interface ethernet0/1 dhcp server option custom 66 ip 1.1.1.1
set interface ethernet0/1 dhcp server option custom 160 integer 2004
set interface ethernet0/1 dhcp server ip 172.16.10.10 to 172.16.10.19
If the security device receives a response from another DHCP server, the system
generates a message indicating that the DHCP service is enabled on the security
device but not started because another DHCP server is present on the network. The
log message includes the IP address of the existing DHCP server.
You can set one of three operational modes for DHCP server detection on an
interface: Auto, Enable, or Disable. Auto mode causes the security device to always
check for an existing DHCP server at bootup. You can configure the device to not
attempt to detect another DHCP server on an interface by setting the security DHCP
server to Enable or Disable mode. In Enable mode, the DHCP server is always on
and the device does not check if there is an existing DHCP server on the network.
In Disable mode, the DHCP server is always off.
WebUI
Network > DHCP > Edit (for ethernet0/1) > DHCP Server: Enter the following,
then click OK:
CLI
set interface ethernet0/1 dhcp server auto
save
WebUI
Network > DHCP > Edit (for ethernet0/1) > DHCP Server: Enter the following,
then click OK:
CLI
set interface ethernet0/1 dhcp server enable
save
NOTE: Issuing the CLI command set interface interface dhcp server service command
activates the DHCP server. If the DHCP server detection mode for the interface is
set to Auto, the DHCP server on the security device starts only if it does not find an
existing server on the network. Issuing the unset interface interface dhcp server
service command disables the DHCP server on the security device and also
deletes any existing DHCP configuration.
You can configure a DHCP relay agent on one or more physical or VLAN interfaces
on a security device, but you cannot configure a DHCP relay agent and DHCP server
or client functions on the same interface.
When the security device functions as a DHCP relay agent, its interfaces must be in
either Route mode or function as a Layer 3 device. For interfaces in Layer 3 mode
(that is have IP addresses assigned to the interfaces), you must configure a security
policy (from zone to zone or intrazone) to permit the predefined service
DHCP-Relay before forwarding occurs.
You can configure up to three DHCP servers for each DHCP relay agent. The relay
agent unicasts an address request from a DHCP client to all configured DHCP
servers. The relay agent forwards to the client all DHCP packets received from all
servers. See “Forwarding All DHCP Packets” on page 237.
NOTE: When a security device acts as a DHCP relay agent, the device does not generate
DHCP allocation status reports because the remote DHCP server controls all the IP
address allocations.
ScreenOS supports DHCP relay in different vsys and for VLAN-tagged subinterfaces.
Figure 72 illustrates the process involved in using a security device as a DHCP relay
agent. To ensure security, the DHCP messages pass through a VPN tunnel when
traveling through the untrusted network.
Request Request
Host DHCP
Server
Assignment Assignment
Host DHCP
Server
Request Request
In Figure 73, a security device receives its DHCP information from a DHCP server at
194.2.9.10 and relays it to hosts in the Trust zone. The hosts receive IP addresses
from an IP pool defined on the DHCP server. The address range is
180.10.10.2—180.10.10.254. The DHCP messages pass through a VPN tunnel
between the local security device and the DHCP server, located behind a remote
security device whose Untrust zone interface IP address is 2.2.2.2/24. The interface
ethernet0/1 is bound to the Trust zone, has the IP address 180.10.10.1/24, and is in
Route mode. The interface ethernet0/3 is bound to the Untrust zone and has the IP
address 1.1.1.1/24. All security zones are in the trust-vr routing domain.
WebUI
1. Interfaces
Interfaces > Edit (for ethernet0/1): Enter the following, then click Apply:
Zone: Trust
Static IP: (select this option when present)
IP Address/Netmask: 180.10.10.1/24
Interfaces > Edit (for ethernet0/3): Enter the following, then click OK:
Zone: Untrust
Static IP: (select this option when present)
IP Address/Netmask: 1.1.1.1/24
2. Address
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
Security Level:
User Defined: Custom (select)
Phase 1 Proposal: rsa-g2-3des-sha
Mode (Initiator): Main (ID Protection)
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NOTE: Setting a route to the external router designated as the default gateway is essential
for both outbound VPN and network traffic. In this example, the security device
sends encapsulated VPN traffic to this router as the first hop along its route to the
remote security device. In Figure 73, the concept is presented by depicting the
tunnel passing through the router.
6. Policies
Policy > Policies > (From: Trust, To: Untrust) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), DHCP Server
Service: DHCP-Relay
Action: Tunnel
Tunnel VPN: to_dhcp
Modify matching outgoing VPN policy: (select)
CLI
1. Interfaces
set interface ethernet0/1 zone trust
set interface ethernet0/1 ip 180.10.10.1/24
set interface ethernet0/1 route
set interface ethernet0/3 zone untrust
set interface ethernet0/3 ip 1.1.1.1/24
2. Address
set address untrust dhcp_server 194.2.9.10/32
3. VPN
set ike gateway “dhcp server” ip 2.2.2.2 main outgoing-interface ethernet0/3
proposal rsa-g2-3des-sha
set vpn to_dhcp gateway “dhcp server” proposal g2-esp-3des-sha
4. DHCP Relay Agent
set interface ethernet0/1 dhcp relay server-name 194.2.9.10
set interface ethernet0/1 dhcp relay vpn
5. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet0/3 gateway 1.1.1.250
6. Policies
set policy from trust to untrust any dhcp_server dhcp-relay tunnel vpn to_dhcp
set policy from untrust to trust dhcp_server any dhcp-relay tunnel vpn to_dhcp
save
In common PXE cases (as shown in Figure 74), at least two DHCP servers serve
clients. When the DHCP servers receive a request from the DHCP client, one of the
servers, DHCP Server1, provides DHCP address information to the client while
DHCP Server 2 (such as MS RIS) provides PXE information. This release of
ScreenOS allows the security device to forward all DHCP packets to the client.
Figure 74: Relaying All DHCP Packets from Multiple DHCP Servers
4. & 5. The DHCP servers send a DHCP reply for the request.
6. & 7. The security device relays the replies to the DHCP client.
Typically, a PXE server provides a boot-image-server for diskless PXE clients, which
are diskless PC machine. When a PXE client powers on, it sends out a broadcast
DHCP-DISCOVER (a kind of request), which means that the client requests the IP
and boot-image path. In most cases, two kinds of servers serve the PXE: a PXE
server (like a Microsoft RIS server) and a DHCP server. Both servers receive the
DISCOVER request. The PXE server replies to the DISCOVER request with
boot-image-server information. At the same time, the DHCP server replies to the
DISCOVER request with an IP-assignment information. Both the responses from the
two servers are forwarded to the DHCP client (diskless PC).
Configuring Next-Server-IP
If a security device receives conflicting or confusing information from the DHCP
server, the device uses the IP address in the Next-Server-IP field. This DHCP
configuration parameter has traditionally been used as the address of the TFTP
server in the bootstrap process.
For example, in PXE scenarios, the first DHCP server serves the IP address, and the
second DHCP server provides OS information. The Next-Server-IP field is
configured to specify the next server in the chain. The chain and each member can
vary from site to site. However, typically, it is a DHCP server chaining to a TFTP
server. The chain is terminated either by supplying all zeroes (0.0.0.0) or by
specifying the device interface IP into this field as shown in Table 37.
This Next-Server-IP information is returned in the siaddr field of the DHCP header
and is often used to chain several bootstrap servers together, with each serving a
specific function. The siaddr field is mandatory, if available, because some DHCP
servers will place their own IP address in this field when it is not configured.
If the Next-Server-IP is non-zero and not equal to this server’s address, then it is
interpreted by the client as the address of the next server in a chain that supplies
additional boot information. In the following example, the Next-Server-IP is
configured for Option66.
WebUI
Network > DHCP > Edit (DHCP Server): Select one of the following, then click
Apply:
CLI
set interface ethernet0/1 dhcp server enable
set interface ethernet0/1 dhcp server option custom 66 ip 10.10.10.1
set interface ethernet0/1 dhcp server config next-server-ip option66
save
NOTE: While some security devices can act as DHCP servers, a DHCP relay agents, or
DHCP clients at the same time, you cannot configure more than one DHCP role on
a single interface.
In this example, the interface bound to the Untrust zone has a dynamically assigned
IP address. When the security device requests its IP address from its ISP, it receives
its IP address, subnet mask, gateway IP address, and the length of its lease for the
address. The IP address of the DHCP server is 2.2.2.5.
Internal LAN
2. IP address assigned
ISP
(DHCP Server)
2.2.2.5
Internet
Untrust Zone
NOTE: Before setting up a site for DHCP service, you must have a Digital Subscriber Line
DSL) and an account with an Internet Service Provider (ISP).
WebUI
Network > Interfaces > Edit (for ethernet0/3): Select Obtain IP using DHCP,
then click OK.
NOTE: You cannot specify the IP address of the DHCP server through the WebUI;
however, you can do so through the CLI.
CLI
set interface ethernet0/3 dhcp client
set interface ethernet0/3 dhcp settings server 2.2.2.5
save
TCP/IP settings include the IP address of the default gateway and a subnet mask,
and IP addresses for any or all of the following servers:
DNS (3)
WINS (2)
NetInfo (2)
SMTP (1)
POP3 (1)
News (1)
In Figure 76, the security device is both a client of the DHCP server in the Untrust
zone and a DHCP server to the clients in the Trust zone. The device takes the TCP/IP
settings that it receives as a DHCP client and forwards them as a DHCP server to the
clients in the Trust zone. The Untrust Zone Interface is the DHCP client and receives
IP addresses dynamically from an ISP.
Untrust Zone
ISP
DHCP Server
TCP/IP Settings and Untrust
Zone Interface IP Address
DHCP Clients
Trust Zone
You can configure the DHCP server module to propagate all TCP/IP settings that it
receives from the DHCP client module using the set interface interface dhcp-client
settings update-dhcpserver command. You can also override any setting with a
different one.
In this example, you configure the security device to act both as a DHCP client on
the ethernet0/3 interface and as a DHCP server on the ethernet0/1 interface. (The
default DHCP server is on the ethernet0/1 interface.)
As a DHCP client, the security device receives an IP address for the ethernet0/3
interface and its TCP/IP settings from an external DHCP server at 211.3.1.6. You
enable the DHCP client module in the security device to transfer the TCP/IP settings
it receives to the DHCP server module.
You configure the DHCP server module to do the following with the TCP/IP settings
that it receives from the DHCP client module:
Forward the DNS IP addresses to its DHCP clients in the Trust zone.
Override the default gateway, netmask, SMTP server, and POP3 server IP
addresses with the following:
SMTP: 211.1.8.150
POP3: 211.1.8.172
NOTE: If the DHCP server is already enabled on the Trust interface and has a defined pool
of IP addresses (which is default behavior for certain platforms), you must first
delete the IP address pool before you can change the default gateway and
netmask.
You also configure the DHCP server module to deliver the following TCP/IP settings
that it does not receive from the DHCP client module:
Finally, you configure the DHCP server module to assign IP addresses from the
following IP Pool to the hosts acting as DHCP clients in the Trust zone: 10.1.1.50 –
10.1.1.200.
WebUI
NOTE: You can set this feature only through the CLI.
CLI
1. DHCP Client
set interface ethernet0/3 dhcp-client settings server 211.3.1.6
set interface ethernet0/3 dhcp-client settings update-dhcpserver
set interface ethernet0/3 dhcp-client settings autoconfig
set interface ethernet0/3 dhcp-client enable
2. DHCP Server
set interface ethernet0/1 dhcp server option gateway 10.1.1.1
set interface ethernet0/1 dhcp server option netmask 255.255.255.0
set interface ethernet0/1 dhcp server option wins1 10.1.2.42
set interface ethernet0/1 dhcp server option wins2 10.1.5.90
set interface ethernet0/1 dhcp server option pop3 211.1.8.172
set interface ethernet0/1 dhcp server option smtp 211.1.8.150
set interface ethernet0/1 dhcp server ip 10.1.1.50 to 10.1.1.200
set interface ethernet0/1 dhcp server service
save
If you have two DHCP servers, server 1 and server 2, a security device, sitting
between the DHCP servers and a client, individually passes DHCP requests to each
DHCP server on different outgoing interfaces. As each DHCP reply is received, the
security device passes them to the root vsys and then forwards them to the
appropriate DHCP client within a vsys.
DHCP Server 2
DHCP client
3. Configure a static route to allow the DHCP server in the root system to access
the vsys.
On devices that support PPPoE, you can configure a PPPoE client instance on any or
all interfaces. You configure a specific instance of PPPoE with a username,
password, and other parameters, and then you bind the instance to an interface.
When two Ethernet interfaces (a primary and a backup) are bound to the Untrust
zone, you can configure one or both interfaces for PPPoE.
Setting Up PPPoE
The following example illustrates how to define the untrusted interface of a security
device for PPPoE connections and how to initiate PPPoE service.
In this example, the security device receives a dynamically assigned IP address for
its Untrust zone interface (ethernet0/3) from the ISP, and the security device also
dynamically assigns IP addresses for the three hosts in its Trust zone. In this case,
the security device acts both as a PPPoE client and a DHCP server. The Trust zone
interface must be in either NAT or Route mode. In this example, it is in NAT mode.
Security Device
DSL Modem
ISP
DSLAM
Hub AC Internet
DSL Line
Primary
DNS Server
Before setting up the site in this example for PPPoE service, you must have the
following:
WebUI
1. Interfaces and PPPoE
Network > Interfaces > Edit (for ethernet0/1): Enter the following, then click
OK:
Zone: Trust
Static IP: (select this option when present)
IP Address/Netmask: 172.16.30.10/24
Network > Interfaces > Edit (for ethernet0/3): Enter the following, then click
OK:
Zone: Untrust
Obtain IP using PPPoE: (select)
User Name/Password: name/password
Network > Interfaces > Edit (for ethernet0/3): To test your PPPoE connection,
click Connect.
NOTE: When you initiate a PPPoE connection, your ISP automatically provides the IP
addresses for the Untrust zone interface and for the Domain Name System (DNS)
servers. When the security device receives DNS addresses by PPPoE, the new DNS
settings overwrite the local settings by default. If you do not want the new DNS
settings to replace the local settings, you can use the CLI command unset pppoe
dhcp-updateserver to disable this behavior.
If you use a static IP address for the Untrust zone interface, you must obtain the IP
addresses of the DNS servers and manually enter them on the security device and
on the hosts in the Trust zone.
2. DHCP Server
Network > Interfaces > Edit (for ethernet0/1) > DHCP: Select DHCP Server,
then click Apply.
Network > Interfaces > Edit (for ethernet0/1) > DHCP: Enter the following,
then click Apply:
Lease: 1 hour
Gateway: 0.0.0.0
Netmask: 0.0.0.0
DNS#1: 0.0.0.0
DNS#2: 0.0.0.0
Domain Name: (leave blank)
Network > Interfaces > DHCP (for ethernet0/1) > New Address: Enter the
following, then click OK:
Dynamic: (select)
IP Address Start: 172.16.30.2
IP Address End: 172.16.30.5
3. Activating PPPoE on the Security Device
1. Turn off the power to the DSL modem, the security device, and the three
workstations.
The security device makes a PPPoE connection to the ISP and, through the ISP,
gets the IP addresses for the DNS servers.
The workstations automatically receive the IP addresses for the DNS servers.
They get an IP address for themselves when they attempt a TCP/IP connection.
NOTE: When you use DHCP to assign IP addresses to hosts in the Trust zone, the security
device automatically forwards the IP addresses of the DNS servers that it receives
from the ISP to the hosts.
If the IP addresses for the hosts are not dynamically assigned through DHCP, you
must manually enter the IP addresses for the DNS servers on each host.
Every TCP/IP connection that a host in the Trust zone makes to the Untrust
zone automatically goes through the PPPoE encapsulation process.
CLI
1. Interfaces and PPPoE
set interface ethernet0/1 zone trust
set interface ethernet0/1 ip 172.16.30.10/24
set interface ethernet0/3 zone untrust
set pppoe interface ethernet0/3
set pppoe username name_str password pswd_str
2. DHCP Server
set interface ethernet0/1 dhcp server service
set interface ethernet0/1 dhcp server ip 172.16.30.2 to 172.16.30.5
set interface ethernet0/1 dhcp server option lease 60
save
3. Activating PPPoE on the Security Device
1. Turn off the power to the DSL modem, the security device, and the three
workstations.
The workstations automatically receive the IP addresses for the DNS servers.
They get an IP address for themselves when they attempt a TCP/IP connection.
Every TCP/IP connection that a host in the Trust zone makes to the Untrust
zone automatically goes through the PPPoE encapsulation process.
WebUI
1. PPPoE Configuration for ethernet0/3 Interface
Network > PPP > PPPoE Profile> New: Enter the following, then click OK:
CLI
1. PPPoE Configuration for ethernet0/3 Interface
set pppoe name eth3-pppoe username user1 password 123456
set pppoe name eth3-pppoe ac ac-11
set pppoe name eth3-pppoe authentication any
set pppoe name eth3-pppoe interface ethernet0/3
isp_1 e7 isp_1ac
Three PPPoE Instances isp_2 e7.1 isp_2ac
Three PPPoE Sessions
isp_3 e7.2 isp_3ac
isp_2ac
isp_3ac
In the following example, you define three PPPoE instances, specify an Access
Concentrator (AC) for each, then initiate each instance.
WebUI
1. Interface and Subinterfaces
Network > Interfaces > Edit (for ethernet7):
Network > PPP > PPPoE Profile > Connect (for isp_2)
Network > PPP > PPPoE Profile > Connect (for isp_3)
CLI
1. Interface and Subinterfaces
set interface ethernet7 zone untrust
set interface ethernet7.1 encap pppoe zone untrust
set interface ethernet7.2 encap pppoe zone untrust
2. PPPoE Instances and ACs
set pppoe name isp_1 username user1@domain1 password swordfish
set pppoe name isp_1 interface ethernet7
set pppoe name isp_1 ac isp_1ac
set pppoe name isp_2 username user2@domain2 password marlin
set pppoe name isp_2 interface ethernet7.1
set pppoe name isp_2 ac isp_2ac
set pppoe name isp_3 username user3@domain3 password trout
set pppoe name isp_3 interface ethernet7.2
set pppoe name isp_3 ac isp_3ac
save
3. PPPoE Initiation
exec pppoe name isp_1 connect
exec pppoe name isp_2 connect
exec pppoe name isp_3 connect
License Keys
The license key feature allows you to expand the capabilities of your Juniper
Networks security device without having to upgrade to a different device or system
image. You can purchase the following type of keys:
Advanced
Capacity
Extended
Virtualization
GTP
Vsys
IDP
Each security device ships with a standard set of features enabled and might
support the activation of optional features or the increased capacity of existing
features. For information regarding which features are currently available for
upgrading, refer to the latest marketing literature from Juniper Networks.
Authorization Code: A pass key required to generate and activate the license
key that you or your company have purchased for your Juniper Networks
security device. Note: The Authorization Code is required to generate your
license key—it is not the actual license key.
WebUI
Configuration > Update > ScreenOS/Keys > Select License Key Update
(Features) > click Browse > select the file with the license key, then click
Apply.
CLI
exec license-key key_num
Purchase a subscription
Retrieving the subscription license key activates your services on the device for the
time period purchased. Your specific service-activation process depends upon
which services you purchased and the method you used to purchase them.
Trial Service
To allow you to use AV, DI, anti-spam, or Web filtering services, the security device
provides a trial period. During this period, the device can obtain temporary
services. To retrieve eligible trial license keys from the entitlement server, use the
exec license-key update trials CLI command.
If your device has AV service bundled at the time of purchase, then the device
has preinstalled trial service. This trial service lasts up to 60 days.
Anti-spam
No Juniper Networks security device comes with Web filtering already enabled.
This feature does not have a trial service.
CAUTION: To avoid service interruption, you must register your Juniper Networks
security device as soon as possible after purchasing your subscription.
Registration ensures continuation of the subscription.
Key expires
NOTE: To delete a single license key from the key file, use the exec license-key delete
name_str CLI command.
Adding Antivirus, Web Filtering, Anti-Spam, and Deep Inspection to an Existing or a New
Device
After purchasing AV, Web filtering, anti-spam, or deep inspection (DI) subscriptions
to add to your existing Juniper Networks security device, perform the following
steps to activate the services:
1. After ordering the subscription, you should receive an authorization code, via
email, from Juniper Networks or your authorized VAR. This code is a readable
document that contains information you need to register your subscription.
http://tools.juniper.net/subreg
5. Retrieve the subscription key on the device. You can do this in one of two ways:
6. You must reset the device after the key has been loaded.
You can now configure the device to automatically or manually retrieve the
signature services. For instructions on configuring your security device for these
services, see the following sections:
System Clock
It is important that your Juniper Networks security device always be set to the right
time. Among other things, the time on your device affects the set up of VPN tunnels
and the timing of schedules. First, to ensure that the device always maintains the
proper time, you must set the system clock to the current time. Next, you can
enable the daylight saving time (DST) option, and you can configure up to three
Network Time Protocol (NTP) servers (one primary and two backups) from which
the device can regularly update its system clock.
1. Configuration > Date/Time: Click the Sync Clock with Client button.
A pop-up message prompts you to specify if you have enabled the DST option
on your computer clock.
2. Click Yes to synchronize the system clock and adjust it according to DST, or
click No to synchronize the system clock without adjusting it for DST.
Through the CLI, you set the clock by manually entering the date and time using the
following command:
DST is observed differently in various countries. Accordingly, you can choose the
appropriate DST settings that apply to your country.
You can set the DST adjustment to recur on a weekday schedule (for example, the
first Sunday in April) or on a specific date. You also can set DST adjustment not to
recur, in which case you can adjust DST settings only for a single year.
Time Zone
You set the time zone by specifying the number of hours by which the local time for
the security device is behind or ahead of GMT (Greenwich Mean Time). For
example, if the local time zone for the device is Pacific Standard Time, it is 8 hours
behind GMT. Therefore, you have to set the clock to -8.
device -> set clock timezone number (a number from -12 to 12)
or
When you manually synchronize the system clock, and you can only do this using
the CLI, you can specify a particular NTP server or none at all. If you specify an NTP
server, the security device queries that server only. If you do not specify an NTP
server, the device queries each NTP server configured on the device sequentially.
You can specify an NTP server using its IP address or its domain name.
The security device sends NTP requests from a source interface and optionally uses
an encrypted, preshared key when sending NTP requests to the NTP server. The key
provides authentication.
In the following example, you configure the primary NTP server and two backup
NTP servers by assigning an IP address to each server. Next, you set each server to
send NTP requests from the Trust interface. After that, you set the key ID and
preshared key for each server.
WebUI
Configuration > Date/Time: Enter the following, then click Apply:
CLI
set ntp server 1.1.1.1
set ntp server backup1 1.1.1.2
set ntp server backup2 1.1.1.3
set ntp server src-interface trust
set ntp server backup1 src-interface trust
set ntp server backup2 src-interface trust
set ntp server key-id 10 pre-share-key !2005abc
set ntp server backup1 key-id 10 pre-share-key !2005abc
set ntp server backup2 key-id 10 pre-share-key !2005abc
save
WebUI
Network > Interfaces > Edit (for ethernet0/0) > Basic: check the NTP Server
check box, then click Apply.
CLI
set interface interface ntp-server
save
NTP server configured on the device. If the device does not receive a valid reply
after trying all the configured NTP servers, it generates an error message in the
event log. The default value for this feature is 3 seconds and the range is 0 (no limit)
to 3600 (one hour).
When you manually synchronize the system clock, and you can only do this using
the CLI, the security device does not verify the maximum time adjustment value.
Instead, if it receives a valid reply, the device displays a message informing you of
which NTP server it reached, what the time adjustment is, and the type of
authentication method used. The message also asks you to confirm or cancel the
system clock update.
If the security device does not receive a reply, it displays a timeout message. This
message appears only after the device unsuccessfully attempted to reach all NTP
servers configured on the device.
NOTE: When issuing requests using the CLI, you can cancel the current request by
pressing Ctrl-C on the keyboard.
WebUI
Configuration > Date/Time: Enter the following, then click Apply:
CLI
set clock ntp
set ntp server 1.1.1.1
set ntp server backup1 1.1.1.2
set ntp server backup2 1.1.1.3
set ntp interval 5
set ntp max-adjustment 2
save
To enable the authentication of NTP traffic, you must assign a unique key ID and
preshared key to each NTP server you configure on a security device. The key ID
and preshared key serve to create a checksum with which the security device and
the NTP server can authenticate the data.
Type Description
Required When selected, the security device must include the authentication
information—key id and checksum—in every packet it sends to an NTP server and
must authenticate all NTP packets it receives from an NTP server. Before
authentication can occur between a security device and an NTP server, the
administrators of the security device and the NTP server must first exchange a key
id and a preshared key. They have to exchange these manually and can do so in
different ways such as via email or telephone.
Preferred When selected, the security device must first operate as in Required mode by
trying to authenticate all NTP traffic. If all attempts to authenticate fail, the security
device then operates as if you selected no authentication. It sends out packets to
an NTP server without including a key id and checksum. Essentially, although there
is a preference for authentication, if authentication fails, the security device still
permits NTP traffic.
Index IX-I
Concepts & Examples ScreenOS Reference Guide
IX-II Index
Index
Index IX-III
Concepts & Examples ScreenOS Reference Guide
IX-IV Index
Index
trace-route ......................................................................85 Z
traffic zones ......................................................................25 to 33
counting .................................................................173 defining.....................................................................30
logging ....................................................................172 editing .......................................................................31
priority ....................................................................174 function ....................................................................33
shaping ...................................................................193 function, MGT interface ..........................................38
traffic shaping ..............................................................193 global ........................................................................28
service priorities ....................................................197 global security ............................................................2
Transparent mode ................................................80 to 92 Layer 2 ......................................................................81
ARP/trace-route .......................................................83 tunnel ........................................................................29
blocking non-ARP traffic ........................................82 VLAN ...................................................................33, 81
blocking non-IP traffic ............................................82 zones, ScreenOS ...................................................25 to 33
broadcast traffic ......................................................81 predefined ..................................................................2
flood ..........................................................................83 security interfaces .....................................................3
routes ........................................................................82 zones, security ...........................................................2, 28
unicast options ........................................................83 determination, destination zone ...........................12
tunnel interfaces ............................................................39 determination, source zone ...................................10
definition ..................................................................39 global ..........................................................................2
policy-based NAT ....................................................39 interfaces, monitoring ............................................73
interfaces, physical .................................................36
U
unknown unicast options ....................................82 to 87
ARP ..................................................................84 to 87
flood .................................................................83 to 84
trace-route ................................................................85
URL filtering
See Web filtering
V
VIP ...................................................................................11
VIP, to zone with interface-based NAT ........................94
virtual HA interfaces ......................................................39
virtual routers
See VRs
virtual systems .................................................................9
VLAN zone ......................................................................81
VLAN1
interface .............................................................81, 87
zones.........................................................................81
VLANs, tags ......................................................................3
VPNs
policies....................................................................168
to zone with interface-based NAT .........................94
tunnel zones ............................................................29
VRs
forwarding traffic between ......................................4
introduction ...............................................................4
W
Web filtering .................................................................172
WebAuth, pre-policy auth process .............................172
wildcard addresses ......................................................166
wireless interface
logical interface .......................................................36
Index IX-V
Concepts & Examples ScreenOS Reference Guide
IX-VI Index
Concepts & Examples
ScreenOS Reference Guide
Volume 3:
Administration
Juniper Networks, the Juniper Networks logo, JUNOS, NetScreen, ScreenOS, and Steel-Belted Radius are registered trademarks of Juniper Networks, Inc.
in the United States and other countries. JUNOSe is a trademark of Juniper Networks, Inc. All other trademarks, service marks, registered trademarks, or
registered service marks are the property of their respective owners.
All specifications are subject to change without notice. Juniper Networks assumes no responsibility for any inaccuracies in this document or for any
obligation to update information in this document. Juniper Networks reserves the right to change, modify, transfer, or otherwise revise this publication
without notice.
FCC Statement
The following information is for FCC compliance of Class A devices: This equipment has been tested and found to comply with the limits for a Class A
digital device, pursuant to part 15 of the FCC rules. These limits are designed to provide reasonable protection against harmful interference when the
equipment is operated in a commercial environment. The equipment generates, uses, and can radiate radio-frequency energy and, if not installed and
used in accordance with the instruction manual, may cause harmful interference to radio communications. Operation of this equipment in a residential
area is likely to cause harmful interference, in which case users will be required to correct the interference at their own expense.
The following information is for FCC compliance of Class B devices: The equipment described in this manual generates and may radiate radio-frequency
energy. If it is not installed in accordance with Juniper Networks’ installation instructions, it may cause interference with radio and television reception.
This equipment has been tested and found to comply with the limits for a Class B digital device in accordance with the specifications in part 15 of the FCC
rules. These specifications are designed to provide reasonable protection against such interference in a residential installation. However, there is no
guarantee that interference will not occur in a particular installation.
If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user
is encouraged to try to correct the interference by one or more of the following measures:
Connect the equipment to an outlet on a circuit different from that to which the receiver is connected.
Caution: Changes or modifications to this product could void the user's warranty and authority to operate this device.
Disclaimer
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED
WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED
WARRANTY, CONTACT YOUR JUNIPER NETWORKS REPRESENTATIVE FOR A COPY.
ii
Table of Contents
About This Volume vii
Document Conventions.................................................................................. vii
Web User Interface Conventions ............................................................ vii
Command Line Interface Conventions ................................................... viii
Naming Conventions and Character Types ............................................ viii
Illustration Conventions ............................................................................ x
Requesting Technical Support .......................................................................... x
Self-Help Online Tools and Resources....................................................... xi
Opening a Case with JTAC ........................................................................ xi
Document Feedback ....................................................................................... xi
Chapter 1 Administration 1
Management via the Web User Interface ......................................................... 2
WebUI Help ............................................................................................... 2
Copying the Help Files to a Local Drive ............................................... 3
Pointing the WebUI to the New Help Location .................................... 3
HyperText Transfer Protocol...................................................................... 4
Session ID.................................................................................................. 4
Secure Sockets Layer ................................................................................. 5
SSL Configuration................................................................................ 7
Redirecting HTTP to SSL ..................................................................... 8
Management via the Command Line Interface................................................. 9
Telnet ........................................................................................................ 9
Securing Telnet Connections ................................................................... 10
Secure Shell ............................................................................................. 11
Client Requirements.......................................................................... 12
Basic SSH Configuration on the Device ............................................. 13
Authentication .................................................................................. 14
SSH and Vsys .................................................................................... 16
Host Key ........................................................................................... 16
Example: SSHv1 with PKA for Automated Logins ............................. 17
Secure Copy ............................................................................................ 18
Serial Console.......................................................................................... 19
Remote Console ...................................................................................... 20
Remote Console Using V.92 Modem Port.......................................... 20
Remote Console Using an AUX Port.................................................. 21
Modem Port ............................................................................................ 22
Management via NetScreen-Security Manager ............................................... 22
Initiating Connectivity Between NSM Agent and the MGT System ........... 23
Enabling, Disabling, and Unsetting NSM Agent........................................ 24
Setting the Primary Server IP Address of the Management System ......... 25
Setting Alarm and Statistics Reporting..................................................... 25
Configuration Synchronization ................................................................ 26
iv Table of Contents
Table of Contents
Index..........................................................................................................................IX-I
Table of Contents v
Concepts & Examples ScreenOS Reference Guide
vi Table of Contents
About This Volume
Juniper Networks security devices provide different ways for you to manage the
devices, either locally or remotely. Volume 3: Administration contains the following
chapters:
Document Conventions
This document uses the conventions described in the following sections:
The following example shows the WebUI path and parameters for defining an
address:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
To open Online Help for configuration settings, click the question mark (?) in the
upper left of the screen.
The navigation tree also provides a Help > Config Guide configuration page to help
you configure security policies and Internet Protocol Security (IPSec). Select an
option from the list, and follow the instructions on the page. Click the ? character in
the upper left for Online Help on the Config Guide.
In text, commands are in boldface type and variables are in italic type.
In examples:
If there is more than one choice, each choice is separated by a pipe ( | ). For
example, the following command means “set the management options for the
ethernet1, the ethernet2, or the ethernet3 interface”:
NOTE: When entering a keyword, you only have to type enough letters to identify the
word uniquely. Typing set adm u whee j12fmt54 will enter the command set
admin user wheezer j12fmt54. However, all the commands documented in this
guide are presented in their entirety.
If a name string includes one or more spaces, the entire string must be
enclosed within double quotes; for example:
Any leading spaces or trailing text within a set of double quotes are trimmed;
for example, “ local LAN ” becomes “local LAN”.
NOTE: A console connection only supports SBCS. The WebUI supports both SBCS and
MBCS, depending on the character sets that your browser supports.
Document Conventions ix
Concepts & Examples ScreenOS Reference Guide
Illustration Conventions
Figure 1 shows the basic set of images used in illustrations throughout this volume.
Policy Engine
Security Zone Interfaces:
White = Protected Zone Interface
(example = Trust Zone)
Black = Outside Zone Interface
(example = Untrust Zone)
Generic Network Device
Tunnel Interface
Server
VPN Tunnel
Router
Juniper Networks
Switch Security Devices
Hub
Download the latest versions of software and review your release notes—
http://www.juniper.net/customers/csc/software/
To verify service entitlement by product serial number, use our Serial Number
Entitlement (SNE) Tool—
https://tools.juniper.net/SerialNumberEntitlementSearch/
Document Feedback
If you find any errors or omissions in this document, contact Juniper Networks at
[email protected].
Document Feedback xi
Concepts & Examples ScreenOS Reference Guide
This chapter describes management methods and tools, methods for securing
administrative traffic, and the administrative privilege levels that you can assign to
admin users. This chapter contains the following sections:
1
Concepts & Examples ScreenOS Reference Guide
Figure 2: WebUI
To use the WebUI, you must have the following application and connection:
WebUI Help
You can view Help files for the WebUI at
http://help.juniper.net/help/english/screenos_version/filename.htm
(for example, http://help.juniper.net/help/english/6.1.0/610_Help.htm).
You also have the option of relocating the Help files. You might want to store them
locally and point the WebUI to either the administrator’s workstation or a secured
server on the local network. In case you do not have Internet access, storing the
Help files locally provides accessibility to them you otherwise would not have.
NOTE: If you want to run the Help files directly from the documentation CD, you can skip
this procedure. Proceed to “Pointing the WebUI to the New Help Location” on
page 3-3.
3. Navigate to the location where you want to store the Help directory and paste
the Help directory there.
1. Configuration > Admin > Management: In the Help Link Path field, replace the
default URL:
http://help.juniper.net/help/english/screenos_version/filename.htm
with
or
2. Click Apply.
When you click the help link in the upper right corner of the WebUI, the device
now uses the new path that you specified in the Help Link Path field to locate
the appropriate Help file.
NOTE: For more information, see “Secure Sockets Layer” on page 5, “VPN Tunnels for
Administrative Traffic” on page 43, and “MGT and VLAN1 Interfaces” on page 29.
Session ID
The security device assigns each HTTP administrative session a unique session ID.
For security devices that support virtual systems (vsys), the ID is globally unique
across all systems—root and vsys.
Figure 3 illustrates how the security device can distinguish concurrent sessions
from multiple admins behind a NAT device that assigns the same source IP
address to all outbound packets.
Figure 4 illustrates how the security device can distinguish concurrent root-level
admin sessions from the same source IP address to the root system and from
there to different virtual systems.
Independent of application protocol, SSL uses TCP to provide secure service (see
Figure 5). SSL uses certificates to authenticate first the server or both the client and
the server, and then encrypt the traffic sent during the session. ScreenOS supports
authentication only of the server (security device), not the client (administrator
attempting to connect to the security device through SSL).
Alice (SSL client) contacts security device (SSL server) to log in.
Security Device
(SSL Server)
Device sends Alice a certificate and proposes that they use a secret
Alice key cipher (3DES, DES, RC4, or RC4-40), compression method
NetScreen-Security (PKZip or gzip), and hash algorithm (SHA-1 or MD5).
Manager Admin
(SSL Client)
Alice encrypts a random number with the public key in the certificate and sends it
back with a list of the proposed items that she accepted. (Alice meanwhile uses the
random number and the agreed-upon secret key cipher to create a secret key.)
Device uses its private key to decrypt the number. It then uses that
number and the agreed-upon secret key cipher to create a secret key.
Alice and security device use their shared secret key to encrypt traffic between themselves.
They also use the agreed-upon compression method to compress data and the agreed-upon
hash algorithm to generate a hash of the data to provide message integrity.
A Juniper Networks security device can redirect administrative traffic using HTTP
(default port 80) to SSL (default port 443). The default certificate for SSL is the
automatically generated self-signed certificate, although you can later use a
different certificate if you want. Because SSL is integrated with PKI key/certificate
management, you can select the SSL certificate from any in the certificate list. You
can also use the same certificate for an IPSec VPN.
NOTE: For information about redirecting administrative HTTP traffic to SSL, see
“Redirecting HTTP to SSL” on page 8. For information about self-signed
certificates, see “Self-Signed Certificates” on page 5-47. For information on
obtaining certificates, see “Certificates and CRLs” on page 5-34.
SSL server authentication (not SSL server and client authentication); that is, the
security device authenticates itself to the administrator attempting to connect
through SSL, but the administrator does not use SSL to authenticate himself to
the device
Public Key Infrastructure (PKI) key management integration (see “Public Key
Cryptography” on page 5-29)
NOTE: The RC4 algorithms are always paired with MD5; DES and 3DES with SHA-1.
SSL Configuration
The basic steps for setting up SSL are as follows:
1. Make use of the self-signed certificate that the security device automatically
generates during its initial bootup, or create another self-signed certificate, or
obtain a CA-signed certificate and load it on the device.
NOTE: Check your browser to see how strong the ciphers can be and which ones your
browser supports. (Both the security device and your browser must support the
same kind and size of ciphers you use for SSL.) In Internet Explorer 5x, click Help,
About Internet Explorer, and read the section about cipher strength. To obtain
the advanced security package, click Update Information. In Netscape
Communicator, click Help, About Communicator, and read the section about
RSA. To change the SSL configuration settings, click Security Info, Navigator,
Configure SSL v3.
For more information, see “Self-Signed Certificates” on page 5-47. For details on
requesting and loading a certificate, see “Certificates and CRLs” on page 5-34.
WebUI
Configuration > Admin > Management: Enter the following, then click Apply:
SSL: (select)
Port: Use the default port number (443) or change it to another.
Certificate: Select the certificate you intend to use from the drop-down list.
Cipher: Select the cipher you intend to use from the drop-down list.
NOTE: If you change the SSL port number, the admins need to specify the nondefault
port number when entering the URL in their browser.
CLI
set ssl port num
set ssl cert id_num
set ssl encrypt { { 3des | des } sha-1 | { rc4 | rc4-40 } | md5 }
set ssl enable
save
NOTE: To learn the ID number for a certificate, use the following command:
get pki x509 list cert.
3. Configure the interface through which you manage the security device to
permit SSL management:
WebUI
Network > Interfaces > Edit (for the interface you want to manage): Select the
SSL management service check box, then click OK.
CLI
set interface interface manage ssl
save
4. Connect to the security device via the SSL port. When you enter the IP address
for managing the security device in the browser’s URL field, change http to
https, and follow the IP address with a colon and the HTTPS (SSL) port number
if you have changed it from the default. For example:
https://123.45.67.89:1443).
During the SSL handshake, the security device sends Alice its certificate. Alice
encrypts a random number with the public key contained in the certificate and
sends it back to the device, which uses its private key to decrypt the number. Both
participants then use the shared random number and a negotiated secret key
cipher (3DES, DES, RC4, or RC4-40) to create a shared secret key, which they use to
encrypt traffic between themselves. They also use an agreed-upon compression
method (PKZip or gzip) to compress data and an agreed-upon hash algorithm
(SHA-1 or MD-5) to generate a hash of the data to provide message integrity.
SSL Handshake
Encrypted
To enable the redirection and use the default automatically generated self-signed
certificate for SSL, do either of the following:
WebUI
Configuration > Admin > Management: Enter the following, then click Apply:
CLI
set admin http redirect
save
NOTE: You do not have to enter a CLI command to apply the automatically generated
self-signed certificate for use with SSL because the security device applies it to SSL
by default. If you have previously assigned another certificate for use with SSL and
you now want to use the default certificate instead, you must unset the other
certificate with the unset ssl cert id_num command, in which id_num is the ID
number of the previously assigned certificate.
Although HTTP does not provide the security that SSL does, you can configure the
security device so that it does not redirect HTTP traffic. To disable the HTTP-to-SSL
redirect mechanism, clear the Redirect HTTP to HTTPS option in the WebUI, or
enter the unset admin http redirect CLI command.
NOTE: For a complete listing of the ScreenOS CLI commands, refer to the ScreenOS CLI
Reference Guide: IPv4 Command Descriptions.
Telnet
Telnet is a login and terminal emulation protocol that uses a client/server
relationship to connect to and remotely configure network devices over a TCP/IP
network. The administrator launches a Telnet client program on the administration
workstation and creates a connection with the Telnet server program on the
security device. After logging in, the administrator can issue CLI commands, which
are sent to the Telnet program on the security device, effectively configuring the
device as if operating through a direct connection. Using Telnet to manage security
devices requires the following application and connection:
To minimize an unauthorized user’s chances of logging into a device, you can limit
the number of unsuccessful login attempts allowed before the security device
terminates a Telnet session. This restriction also protects against certain types of
attacks, such as automated dictionary attacks.
By default, the device allows up to three unsuccessful login attempts before it closes
the Telnet session. To change this number, enter the following command:
In addition, to ensure that admin users use a secure connection when they manage
a security device through Telnet, you can require such users to Telnet only through a
virtual private network (VPN) tunnel. After you have set this restriction, the device
denies access if anyone tries to Telnet without going through a VPN tunnel.
NOTE: For information about VPN tunnels, see Volume 5: Virtual Private Networks.
Secure Shell
The built-in Secure Shell (SSH) server on a Juniper Networks security device
provides a means by which administrators can remotely manage the device in a
secure manner using applications that are SSH aware. SSH allows you to open a
remote command shell securely and execute commands. SSH provides protection
from IP or DNS spoofing attacks and password or data interception.
You can choose to run either an SSH version 1 (SSHv1) or an SSH version 2 (SSHv2)
server on the device. SSHv2 is considered more secure than SSHv1 and is currently
being developed as the IETF standard. However, SSHv1 has been widely deployed
and is commonly used. Note that SSHv1 and SSHv2 are not compatible with each
other. That is, you cannot use an SSHv1 client to connect to an SSHv2 server on the
security device, or vice versa. The client console or terminal application must run
the same SSH version as the server. Figure 8 illustrates SSH traffic flow.
A maximum of five SSH sessions are allowed on a Juniper Networks security device
at any one time.
Client Requirements
As mentioned in “Secure Shell” on page 11, the client application must run the
same SSH version as the server on the security device. SSHv2 clients must be
configured to request the Diffie-Hellman key exchange algorithm and the Digital
Signature Algorithm (DSA) for public key device authentication. SSHv1 clients must
be configured to request the RSA for public key device authentication.
1. Determine whether you will use password or Public Key Authentication (PKA)
for SSH. If PKA will be used, the PKA keys must be bound to an admin before
SSH connections can be made. See “Authentication” on page 14 for more
information about using passwords or PKA.
2. Determine which version of SSH you need to enable on the security device.
(Remember that the client application and the SSH server on the device must
run the same SSH version.) If you enabled SSH on the device in a previous
ScreenOS version, SSHv1 runs when you enable SSH now. To see which version
of SSH is active but not enabled on the device, enter the get ssh CLI command:
In the output shown above, SSHv1 is active and runs when you enable SSH. If
you want to use a different SSH version, make sure that all keys created with
the previous version are removed. For example, to clear SSHv1 keys and to use
SSHv2, enter the following CLI commands:
NOTE: Setting the SSH version does not enable SSH on the security device.
3. If you do not want to use port 22 (the default port) for SSH client connections,
you can specify a port number between 1024 and 32767.
NOTE: You can also use the WebUI to change the port number and enable SSHv2 and
SCP on the Configuration > Admin > Management page.
4. Enable SSH for the root system or for the virtual system. See “SSH and Vsys” on
page 16 for additional information about enabling and using SSH for a vsys.
To enable SSH for a vsys, you need to first enter the vsys and then enable SSH:
5. Enable SSH on the interface on which the SSH client will connect.
6. Distribute the host key that is generated on the security device to the SSH
client. See “Host Key” on page 16 for more information.
Authentication
An administrator can connect to a Juniper Networks security device with SSH using
one of two authentication methods:
NOTE: The supported authentication algorithms are RSA for SSHv1 and DSA for SSHv2.
Both password authentication and PKA require that you create an account for the
admin user on the device and enable SSH manageability on the interface through
which you intend to manage the device via an SSH connection. (For information
about creating an admin user account, see “Defining Admin Users” on page 35.)
The password authentication method does not require any further set up on the
SSH client.
On the other hand, to prepare for PKA, you must first perform the following tasks:
1. On the SSH client, generate a public and private key pair using a key generation
program. (The key pair is either RSA for SSHv1 or DSA for SSHv2. See the SSH
client application documentation for more information.)
NOTE: If you want to use PKA for automated logins, you must also load an agent on the
SSH client to decrypt the private key component of the PKA public/private key
pair and hold the decrypted version of the private key in memory.
2. Move the public key from the local SSH directory to a directory on your TFTP
server, and launch the TFTP program.
NOTE: You can also paste the content of the public key file directly into the CLI command
set ssh pka-rsa [ username name_str ] key key_str (for SSHv1) or set ssh pka-dsa
[ user-name name_str ] key key_str (for SSHv2), pasting it where indicated by the
variable key_str, or into the Key field in the WebUI (Configuration > Admin >
Administrators > SSH PKA). However, the CLI and WebUI have a size restriction:
the public key size cannot exceed 512 bits. This restriction is not present when
loading the key via TFTP.
3. Log into the device so that you can configure it through the CLI.
4. To load the public key from the TFTP server to the device, enter one of the
following CLI commands:
For SSHv1:
For SSHv2:
The username or user-name options are only available to the root admin, so
that only the root admin can bind an RSA key to another admin. When you—as
the root admin or as a read/write admin—enter the command without a
username, the device binds the key to your own admin account; that is, it binds
the key to the admin that enters the command.
NOTE: The security device supports up to four PKA public keys per admin user.
When an administrator attempts to log in via SSH on an interface that has SSH
manageability enabled, the device first checks if a public key is bound to that
administrator. If so, the device authenticates the administrator using PKA. If a
public key is not bound to the administrator, the device prompts for a username
and password. (You can use the following command to force an admin to use only
the PKA method: set admin ssh password disable username name_str.) Regardless
of the authentication method you intend the administrator to use, when you initially
define his or her account, you still must include a password, even though when you
later bind a public key to this user, the password becomes irrelevant.
The maximum number of SSH sessions is a device-wide limit and is between 2 and
24, depending upon the platform. If the maximum number of SSH clients are
already logged into the device, no other SSH client can log into the SSH server. The
root system and the vsys share the same SSH port number. This means that if you
change the SSH port from the default port 22, the port is changed for all vsys as
well.
NOTE: When you deploy a large number of virtual systems on a single device, be aware
that if many or all vsys admins use SSH, the storage reserved for PKI objects can
fill up.
Host Key
The host key allows the security device to identify itself to an SSH client. On devices
that support virtual systems (vsys), each vsys has its own host key. When SSH is first
enabled on a vsys (for devices that support vsys) or on a device, a host key is
generated that is unique to the vsys or device. The host key is permanently bound
to the vsys or device and the same host key is used if SSH is disabled and then
enabled again.
The host key on the device must be distributed to the SSH client in one of two ways:
Manually—the root or vsys admin sends the host key to the client admin user
via email, telephone, and so on. The receiving admin stores the host key in the
appropriate SSH file on the SSH client system. (The SSH client application
determines the file location and format.)
Automatically—When the SSH client connects to the device, the SSH server
sends the unencrypted public component of the host key to the client. The SSH
client searches its local host key database to see if the received host key is
mapped to the address of the device. If the host key is unknown (there is no
mapping to the device address in the client’s host key database), the Admin
user might be able to decide whether to accept the host key. Otherwise, the
connection is terminated. (See the appropriate SSH client documentation for
information on accepting unknown host keys.)
To verify that the SSH client has received the correct host key, the Admin user on
the client system can generate the SHA hash of the received host key. The client
Admin user can then compare this SHA hash with the SHA hash of the host key on
the device. On the device, you can display the SHA hash of the host key by
executing the CLI command get ssh host-key.
You define an admin user account named cfg, with password cfg and read-write
privileges. You enable SSH manageability on interface ethernet1, which is bound to
the Untrust zone.
You have previously used a key generation program on your SSH client to generate
an RSA public/private key pair, moved the public key file, which has the filename
“idnt_cfg.pub”, to a directory on your TFTP server, and launched the TFTP program.
The IP address of the TFTP server is 10.1.1.5.
WebUI
Configuration > Admin > Administrators > New: Enter the following, then
click OK:
Name: cfg
New Password: cfg
Confirm Password: cfg
Privileges: Read-Write (select)
SSH Password Authentication: (select)
Network > Interfaces > Edit (for ethernet1): Select SSH in Service Options,
then click OK.
NOTE: You can only load a public key file for SSH from a TFTP server via the exec ssh
command.
CLI
set admin user cfg password cfg privilege all
set interface ethernet1 manage ssh
exec ssh tftp pka-rsa username cfg file-name idnt_cfg.pub ip-addr 10.1.1.5
save
Secure Copy
Secure Copy (SCP) provides a way for a remote client to transfer files to or from the
security device using the SSH protocol. (The SSH protocol provides authentication,
encryption, and data integrity to the SCP connection.) The device acts as an SCP
server to accept connections from SCP clients on remote hosts.
SCP requires that the remote client be authenticated before file transfer
commences. SCP authentication is exactly the same process used to authenticate
SSH clients. The SCP client can be authenticated with either a password or a PKA
key. Once the SCP client is authenticated, one or more files can be transferred to or
from the device. The SCP client application determines the exact method for
specifying the source and destination filenames; refer to the SCP client application
documentation.
SCP is disabled by default on the device. To enable SCP, you must also enable SSH.
WebUI
Configuration > Admin > Management: Select the following, then click Apply:
CLI
set ssh enable
set scp enable
save
You can also copy a ScreenOS image to and from a device. To save an image named
“ns.5.1.0r1” to a device from an SCP client, enter the following SCP client
command, in which the administrator's login name is “juniper” and the IP address
of the device is 10.1.1.1:
Then enter the reset command to reboot the security device to load and run the
new ScreenOS image.
To copy a ScreenOS image from a device to an SCP client and name the saved
image “current_image_backup,” enter the following SCP client command:
You need to consult your SCP client application documentation for information on
how to specify the administrator name, device IP address, source file, and
destination file.
Serial Console
You can manage a security device through a direct serial connection from the
administrator’s workstation to the device via the console port. Although a direct
connection is not always possible, this is the most secure method for
managing the device provided that the location around the device is
secure.
NOTE: To prevent unauthorized users from logging in remotely as the root admin, you
can require the root admin to log into the device through the console only. For
additional information on this restriction, see “Restricting the Root Admin to
Console Access” on page 42.
You will also need HyperTerminal software (or another kind of VT100 terminal
emulator) on the management workstation, with the HyperTerminal port settings
configured as follows:
8 bit
No parity
1 stop bit
No flow control
NOTE: For more details on using HyperTerminal, refer to the ScreenOS CLI Reference
Guide: IPv4 Command Descriptions or the documentation for your device.
Remote Console
You can remotely access the console interface on a security device by dialing into it.
There are two ways of dialing into the console:
In order to use remote console connection, you must first enable remote
management with the following CLI command:
Figure 10 shows how to connect the device for remote console management.
Public telephone
system
v.92 port on
security device
You will also need HyperTerminal software (or another kind of VT100 terminal
emulator) on the management workstation, with the HyperTerminal port settings
configured as follows:
8 bit
No parity
1 stop bit
No flow control
NOTE: For more details on using HyperTerminal, refer to the ScreenOS CLI Reference
Guide: IPv4 Command Descriptions or the documentation for your device.
Figure 11 shows how to connect the device for remote console management.
Public telephone
system
You will also need HyperTerminal software (or another kind of VT100 terminal
emulator) on the management workstation, with the HyperTerminal port settings
configured as follows:
8 bit
No parity
1 stop bit
No flow control
NOTE: For more details on using HyperTerminal, refer to the ScreenOS CLI Reference
Guide: IPv4 Command Descriptions or the documentation for your device.
Modem Port
You can also manage a security device by connecting the administrator’s
workstation to the modem port on the device. The modem port functions similarly
to the console port, except that you cannot define parameters for the modem port
or use this connection to upload an image.
The GUI Server receives and responds to requests and commands from the
UI. It manages the system resources and configuration data required to
manage your network. It also contains a local data store of information
about your managed security devices, administrators, and configurations.
The Device Server acts as a collection point for all data generated by each of
your network devices. It stores this data, primarily traffic logs, in the local
data store.
NSM Agent is a service that resides on each managed security device. NSM
Agent receives configuration parameters from the external management
system and forwards them to ScreenOS. NSM Agent also monitors each
device and transmits reports back to the management system. NSM Agent
can download signature packs, certificates, and entitlements between a
security device and NetScreen-Security Manager.
Case 1: A device already has a known IP address and is reachable over your
network infrastructure.
In this case, both users perform initialization tasks. The administrator adds the
device through the NetScreen-Security Manager UI. The administrator also
determines which CLI commands the on-site user needs and delivers them to
the user, who then executes them through the console. The device then
automatically connects with the management system and is ready to send
configuration information to the NetScreen-Security Manager database.
Case 3: The device is a new appliance and contains the factory default settings.
In this case, both users perform initialization tasks. The on-site user can use an
encrypted configuration script, called Configlet, which the NetScreen-Security
Manager administrator generates. The process is as follows:
1. The administrator selects the device platform and ScreenOS version, using
the Add Device wizard in the NetScreen-Security Manager UI.
2. The administrator edits the device and enters the desired configuration.
4. The administrator generates and delivers the Configlet file (or the
necessary CLI commands, as with Case 2) to the on-site user.
For more information, refer to the discussion about adding devices in the
NetScreen-Security Manager Administrator’s Guide.
If you want to unset NetScreen-Security Manager, use the unset nsmgmt all
command. This command sets NSM Agent to its initial defaults, so it acts as though
it was never connected to NetScreen-Security Manager. Use the unset nsmgmt all
command when you want to reconfigure the NetScreen-Security Manager settings.
WebUI
Configuration > Admin > NSM: Select Enable Communication with
NetScreen-Security Manager (NSM), then click Apply.
CLI
set nsmgt enable
save
WebUI
Configuration > Admin > NSM: Clear Enable Communication with
NetScreen-Security Manager (NSM), then click Apply.
CLI
unset nsmgt enable
save
In the following example you set the primary server IP address to 1.1.1.100.
WebUI
Configuration > Admin > NSM: Enter the following, then click Apply:
CLI
set nsmgmt server primary 1.1.1.100
save
Attack statistics
Ethernet statistics
Policy statistics
In the following example, you enable transmission of all Alarm and Statistics
messages to the Management System.
WebUI
Configuration > Admin > NSM: Enter the following, then click Apply:
CLI
set nsmgmt report statistics attack enable
set nsmgmt report statistics policy enable
set nsmgmt report alarm attack enable
set nsmgmt report alarm traffic enable
set nsmgmt report statistics flow enable
set nsmgmt report statistics ethernet enable
set nsmgmt report alarm idp enable
set nsmgmt report alarm other enable
save
Configuration Synchronization
If the ScreenOS configuration is changed from the last time it was synchronized
with NetScreen-Security Manager, then the security device notifies the
NetScreen-Security Manager administrator of the change. For example, the device
sends a message when a device administrator uses console, telnet, SSH, or the
WebUI to change a security device configuration. Changing the configuration with
any application other than NetScreen-Security Manager causes it to be
unsynchronized. The NetScreen-Security Manager configuration file must be
synchronized with the security device configuration file for NetScreen-Security
Manager to work correctly. The synchronization is achieved when you import the
configuration file to NetScreen-Security Manager. For information on importing
devices, refer to the NetScreen-Security Manager Administrator’s Guide.
The following example displays the command used to view the configuration status.
WebUI
NOTE: You must use the CLI to retrieve the running configuration state.
CLI
get config nsmgmt-dirty
WebUI
NOTE: You must use the CLI to retrieve the running configuration hash.
CLI
device-> enter vsys vsys1
device(vsys1)-> get config hash
a26a16cd6b8ef40dc79d5b2ec9e1ab4f
device(vsys1)->
device(vsys1)-> exit
In the following example, the security device retrieves the last running and saved
configuration timestamps for the vsys1 virtual system:
WebUI
NOTE: You must use the CLI to retrieve the running and saved configuration timestamps.
CLI
get config timestamp vsys vsys1
get config saved timestamp
NOTE: If you omit vsys vsys_name from the command, the security device retrieves the
configuration timestamp for the root system. If the timestamp is unavailable, then
an “unknown” message is displayed.
WebUI: Selecting this option allows the interface to receive HTTP traffic for
management via the Web user interface (WebUI).
Telnet: A terminal emulation program for TCP/IP networks such as the Internet,
Telnet is a common way to remotely control network devices. Selecting this
option enables Telnet manageability.
SSH: You can administer the security device from an Ethernet connection or a
dial-in modem using Secure Command Shell (SSH). You must have an SSH
client that is compatible with Version 1.5 of the SSH protocol. These clients are
available for Windows 95 and later, Windows NT, Linux, and UNIX. The security
device communicates with the SSH client through its built-in SSH server, which
provides device configuration and management services. Selecting this option
enables SSH manageability.
SNMP: The security device supports both SNMPv1 and SNMPv2c, and all
relevant Management Information Base II (MIB II) groups, as defined in
RFC-1213. Selecting this option enables SNMP manageability.
SSL: Selecting this option allows the interface to receive HTTPS traffic for secure
management of the security device via the WebUI.
Ping: Selecting this option allows the security device to respond to an ICMP
echo request, or ping, which determines whether a specific IP address is
accessible over the network.
Ident-Reset: Services like Mail and FTP send identification requests. If they
receive no acknowledgement, they send the request again. While the request is
processing, there is no user access. By enabling the Ident-reset option, the
security device sends a TCP reset announcement in response to an IDENT
request to port 113 and restores access that has been blocked by an
unacknowledged identification request.
To use these options, you enable them on one or more interfaces, depending on
your security and administrative needs.
In Transparent mode, you can configure all security devices to allow administration
through the logical interface, VLAN1. To enable management traffic to reach the
VLAN1 interface, you must enable the management options you want both on
VLAN1 and on the Layer 2 zones—V1-Trust, V1-Untrust, V1-DMZ, user-defined
Layer 2 zone—through which the management traffic passes to reach VLAN1.
To maintain the highest level of security, Juniper Networks recommends that you
limit administrative traffic exclusively to the VLAN1 or MGT interface and user
traffic to the security zone interfaces. Separating administrative traffic from
network user traffic greatly increases administrative security and ensures constant
management bandwidth.
WebUI
Network > Interfaces > Edit (for mgt): Enter the following, then click OK:
IP Address/Netmask: 10.1.1.2/24
Management Services: WebUI, SSH: (select)
CLI
set interface mgt ip 10.1.1.2/24
set interface mgt manage web
set interface mgt manage ssh
save
WebUI
Network > Interfaces > Edit (for VLAN1): Enter the following, then click OK:
IP Address/Netmask: 10.1.1.1/24
Management Services: WebUI, Telnet: (select)
Network > Zones > Edit (for V1-Trust): Select the following, then click OK:
CLI
set interface vlan1 ip 10.1.1.1/24
set interface vlan1 manage web
set interface vlan1 manage telnet
set zone v1-trust manage web
set zone v1-trust manage telnet
save
In this example, you bind ethernet1 to the Trust zone and ethernet3 to the Untrust
zone. You assign ethernet1 the IP address 10.1.1.1/24 and give it the Manage IP
address 10.1.1.2. (Note that the Manage IP address must be in the same subnet as
the security zone interface IP address.) You also allow ethernet1 to receive web and
Telnet traffic. You then assign ethernet3 the IP address 1.1.1.1/24 and block all
administrative traffic to that interface.
WebUI
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
CLI
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 manage-ip 10.1.1.2
set interface ethernet1 manage web
unset interface ethernet1 manage snmp
set interface ethernet1 manage telnet
unset interface ethernet1 manage ssl
unset interface ethernet1 manage ssh
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
save
NOTE: When you bind an interface to any security zone other than the Trust and
V1-Trust zones, all management options are disabled by default. Therefore, in this
example, you do not have to disable the management options on ethernet3.
When a security device is a backup unit in a redundant group for high availability
(HA), you can access and configure the unit through its manage IP address (or
addresses)
NOTE: The manage IP address differs from the VLAN1 address in the following two ways:
When the security device is in Transparent mode, the VLAN1 IP address can be
the endpoint of a VPN tunnel, but the manage IP address cannot.
If you select the Manageable option on the interface configuration page in the
WebUI, you can manage the security device either through the interface IP address
or the Manage IP address associated with that interface.
Figure 13 on page 32 illustrates this example in which you bind ethernet2 to the
DMZ zone and ethernet3 to the Untrust zone. You set the management options on
each interface to provide access for the specific kinds of administrative traffic. You
allow HTTP and Telnet access on ethernet2 for a group of local administrators in the
DMZ zone, and SNMP access on ethernet3 for central device monitoring from a
remote site. Ethernet2 and ethernet3 each have a manage IP address, to which the
administrative traffic is directed. You also set a route directing self-generated SNMP
traffic out ethernet3 to the external router at 1.1.1.250.
Router 1.1.1.250
Local Admins
DMZ Zone
ethernet2
IP: 1.2.2.1/24
Manage IP: 1.2.2.2
LAN
Trust Zone
WebUI
Network > Interfaces > Edit (ethernet2): Enter the following, then click OK:
Network > Interfaces > Edit (ethernet3): Enter the following, then click OK:
CLI
set interface ethernet2 zone dmz
set interface ethernet2 ip 1.2.2.1/24
set interface ethernet2 manage-ip 1.2.2.2
set interface ethernet2 manage web
set interface ethernet2 manage telnet
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface ethernet3 manage-ip 1.1.1.2
set interface ethernet3 manage snmp
save
Levels of Administration
Juniper Networks security devices support multiple administrative users. For any
configuration changes made by an administrator, the security device logs the
following information:
There are several levels of administrative user. The availability of some of these
levels depends on the model of your Juniper Networks security device. The
following sections list all the admin levels and the privileges for each level. These
privileges are only accessible to an admin after he or she successfully logs in with a
valid username and password.
Root Administrator
The root administrator has complete administrative privileges. There is only one
root administrator per security device. The root administrator has the following
privileges:
Levels of Administration 33
Concepts & Examples ScreenOS Reference Guide
Read/Write Administrator
The read/write administrator has the same privileges as the root administrator, but
cannot create, modify, or remove other admin users. The read/write administrator
has the following privileges:
Creates virtual systems and assigns a virtual system administrator for each one
Read-Only Administrator
The read-only administrator has only viewing privileges using the WebUI, and can
only issue the get and ping CLI commands. The read-only administrator has the
following privileges:
Read-only privileges in the root system, using the following four commands:
enter, exit, get, and ping
Creates and edits auth, IKE, L2TP, XAuth, and Manual Key users
34 Levels of Administration
Chapter 1: Administration
NOTE: For more information on virtual systems, see “Virtual Systems” on page 10-1.
WebUI
Configuration > Admin > Administrators > New: Enter the following, then
click OK:
Name: Roger
New Password: 2bd21wG7
Confirm New Password: 2bd21wG7
Privileges: Read-Only (select)
CLI
set admin user Roger password 2bd21wG7 privilege read-only
save
WebUI
Configuration > Admin > Administrators > Edit (for Roger): Enter the
following, then click OK:
Name: Roger
New Password: 2bd21wG7
Confirm New Password: 2bd21wG7
Privileges: Read-Write (select)
CLI
unset admin user Roger
set admin user Roger password 2bd21wG7 privilege all
save
WebUI
Configuration > Admin > Administrators: Click Remove in the Configure
column for Roger.
CLI
unset admin user Roger
save
Interface trustee
An interface trustee only has access to the WebUI and is restricted to the
signaling methods and IP address assignment for the primary Untrust interface.
For devices with ADSL interfaces, an interface trustee has control over the
following characteristics:
For devices with only ethernet interfaces, an interface trustee can control how
the interface IP address is assigned (statically defined by administrator, or
dynamically acquired from the circuit via DHCP or PPPoE).
Modem trustee
A modem trustee only has access to the WebUI and is restricted to Modem and
ISP settings for the serial interface. A modem trustee can created, modify, and
delete modem definitions to suit their specific needs, and can create, modify,
and delete the settings for ISP1 and ISP2. A modem trustee can view the
configurations for ISP3 and ISP4, and can test connectivity for any defined ISP
and phone number.
You can view all administrator accounts by entering the get admin user command,
or you can view only the trustee accounts by entering the get admin user trustee
command.
In the following example, you configure a Read/Write modem trustee account for
Richard Brockie. You set his username to be sdonovan and his password to be
!23fb.
WebUI
Configuration > Admin > Administrators
CLI
set admin user sdonovan password !23fb privilege all
set admin user sdonovan trustee modem
WebUI
CLI
clear admin name Roger
save
See “Changing the Admin Login Name and Password” on page 39.
5. Disable the ping and ident-reset service options on the interfaces, both of which
respond to requests initiated by unknown parties and can reveal information
about your network:
WebUI
Network > Interfaces > Edit (for the interface you want to edit): Disable the
following service options, then click OK:
Ping: Selecting this option allows the security device to respond to an ICMP
echo request, or “ping,” which determines whether a specific IP address is
accessible from the device.
CLI
unset interface interface manage ping
unset interface interface manage ident-reset
In this example, the IP address of the interface bound to the Trust zone is
10.1.1.1/24. To manage the security device via the WebUI on this interface, you
must use HTTP. To increase the security of the HTTP connection, you change the
HTTP port number from 80 (the default) to 15522.
WebUI
Configuration > Admin > Management: In the HTTP Port field, enter 15522,
then click Apply.
CLI
set admin port 15522
save
WARNING: Be sure to record your new password. If you forget it, you must reset
the security device to its factory settings, and all your configurations will be lost.
For more information, see “Resetting the Device to the Factory Default Settings”
on page 41.
Admin users for the security device can be authenticated using the internal
database or an external auth server. When the admin user logs into the security
device, it first checks the local internal database for authentication. If there is no
entry present and an external auth server is connected, it then checks for a
matching entry in the external auth server database. After an admin user
successfully logs into an external auth server, the security device maintains the
admin’s login status locally.
NOTE: Juniper Networks supports RADIUS, SecurID, and LDAP servers for admin user
authentication. (For more information, see “Admin Users” on page 9-2.) Although
the root admin account must be stored on the local database, you can store
root-level read/write and root-level read-only admin users on an external auth
server. To store root-level and vsys-level admin users on an external auth server
and query their privileges, the server must be RADIUS and you must load the
netscreen.dct file on it.
For more information about admin user levels, see “Levels of Administration” on
page 33. For more about using external auth servers, see “External Authentication
Servers” on page 9-17.
When the root admin changes any attribute of an admin user’s profile—username,
password, or privilege—any administrative session that the admin currently has
open automatically terminates. If the root admin changes any of these attributes for
himself, or if a root-level read/write admin or vsys read/write admin changes his
own password, all of that user’s currently open admin sessions terminate, other
than the one in which he made the change.
NOTE: The behavior of an HTTP or HTTPS session using the WebUI is different. Because
HTTP does not support a persistent connection, any change that you make to your
own user profile automatically logs you out of that and all other open sessions.
NOTE: Instead of using actual words for passwords, which might be guessed or
discovered through a dictionary attack, you can use an apparently random string
of letters and numbers. To create such a string that you can easily remember,
compose a sentence and use the first letter from each word. For example,
“Charles will be 6 years old on November 21” becomes “Cwb6yooN21.”
WebUI
Configuration > Admin > Administrators > Edit (for John): Enter the
following, then click OK:
Name: Smith
New Password: 3MAb99j2
Confirm New Password: 3MAb99j2
CLI
unset admin user John
set admin user Smith password 3MAb99j2 privilege all
save
WebUI
Configuration > Admin > Administrators > Edit (for first entry): Enter the
following, then click OK:
Name: Smith
New Password: ru494Vq5
Confirm New Password: ru494Vq5
CLI
set admin password ru494Vq5
save
You can set the minimum password length only if you are the root admin and your
own password meets the minimum length requirement you are attempting to set.
Otherwise, the security device displays an error message.
To specify a minimum length for the root admin’s password, enter the following CLI
command:
NOTE: By default, the device recovery feature is enabled. You can disable it by entering
the unset admin device-reset command. Also, if the security device is in FIPS
mode, the recovery feature is automatically disabled.
!!!! Lost Password Reset !!!! You have initiated a command to reset the device
to factory defaults, clearing all current configuration, keys and settings. Would
you like to continue? y/n
4. Press the y key to reset the device. You can now log in using netscreen as the
default username and password.
WebUI
Configuration > Admin > Permitted IPs: Enter the following, then click Add:
CLI
set admin manager-ip 172.16.40.42/32
save
WebUI
Configuration > Admin > Permitted IPs: Enter the following, then click Add:
CLI
set admin manager-ip 172.16.40.0 255.255.255.0
save
To restrict the access of the root admin to the console only, enter the following
command:
Juniper Networks security devices support two types of VPN tunnel configurations:
Route-based VPNs: The security device uses route table entries to direct traffic
to tunnel interfaces, which are bound to VPN tunnels.
Policy-based VPNs: The security device uses the VPN tunnel names specifically
referenced in policies to direct traffic through VPN tunnels.
For each VPN tunnel configuration type, there are the following types of VPN
tunnel:
Manual key: You manually set the three elements that define a Security
Association (SA) at both ends of the tunnel: a Security Parameters Index (SPI),
an encryption key, and an authentication key. To change any element in the SA,
you must manually enter it at both ends of the tunnel.
AutoKey IKE with pre-shared key: One or two pre-shared secrets—one for
authentication and one for encryption—function as seed values. Using them,
the IKE protocol generates a set of symmetrical keys at both ends of the tunnel;
that is, the same key is used to encrypt and decrypt. At predetermined
intervals, these keys are automatically regenerated.
AutoKey IKE with certificates: Using the Public Key Infrastructure (PKI), the
participants at both ends of the tunnel use a digital certificate (for
authentication) and an RSA public/private key pair (for encryption). The
encryption is asymmetrical; that is, one key in a pair is used to encrypt and the
other to decrypt.
NOTE: For a complete description of VPN tunnels, see Volume 5: Virtual Private Networks.
For more information on NetScreen-Remote, refer to the NetScreen-Remote VPN
Client Administrator Guide.
If you use a policy-based VPN configuration, you must create an address book entry
with the IP address of an interface in any zone other than the one to which the
outgoing interface is bound. You can then use that as the source address in policies
referencing the VPN tunnel. This address also serves as the end entity address for
the remote IPSec peer. If you are using a route-based VPN configuration, such an
address book entry is unnecessary.
The VPN tunnel protects administrative traffic that terminates at the security
device itself instead of passing through the device to another security zone.
NOTE: Compare this example with “Administration Through a Policy-Based Manual Key
VPN Tunnel” on page 47.
Admin tunnel.1
10.1.1.56 unnumbered
(static IP address)
10.10.10.1/32
(internal IP address)
WebUI
1. Interfaces
Network > Interfaces > Edit (ethernet1): Enter the following, then click Apply:
Network > Interfaces > Edit (ethernet3): Enter the following, then click OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
NOTE: The unnumbered tunnel interface borrows the IP address of the specified security
zone interface.
2. VPN
VPNs > Manual Key > New: Enter the following, then click OK:
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
3. Route
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface tunnel.1 zone trust
set interface tunnel.1 ip unnumbered interface ethernet1
NOTE: The unnumbered tunnel interface borrows the IP address of the specified security
zone interface.
2. VPN
set vpn tunnel-adm manual 5555 5555 gateway 10.1.1.56 outgoing ethernet1 esp
des password netscreen1 auth md5 password netscreen2
set vpn tunnel-adm bind interface tunnel.1
3. Route
set vrouter trust-vr route 10.10.10.1/32 interface tunnel.1
save
3. Click Add a new connection, and enter Admin next to the new connection
icon that appears.
5. Click the PLUS symbol, located to the left of the UNIX icon, to expand the
connection policy.
6. Click My Identity, in the Select Certificate drop-down list, choose None, and in
the Internal Network IP Address, enter 10.10.10.1.
8. Click the PLUS symbol, located to the left of the Security Policy icon, then click
the PLUS symbol to the left of Key Exchange (Phase 2) to expand the policy
further.
10. Click Inbound Keys, and in the Security Parameters Index field, enter 5555.
11. Click Enter Key, enter the following, then click OK:
NOTE: These are the two generated keys that you copied after configuring the security
device.
12. Click Outbound Keys, and, in the Security Parameters Index field, enter 5555.
13. Click Enter Key, enter the following, then click OK:
the internal address of the admin’s workstation in the policy you create referencing
the tunnel “tunnel-adm”. A policy is necessary because this is a policy-based VPN,
meaning that the policy lookup—not a route lookup—links the destination address
to the appropriate VPN tunnel.
NOTE: Compare this example with “Administration Through a Route-Based Manual Key
VPN Tunnel” on page 44.
LAN
Admin Internet
10.1.1.56 (static
IP address) Manual Key VPN
Tunnel “tunnel-adm”
WebUI
1. Interfaces
Network > Interfaces > Edit (ethernet1): Enter the following, then click Apply:
Network > Interfaces > Edit (ethernet3): Enter the following, then click OK:
Policy > Policy Elements > Addresses > Lists > New: Enter the following,
then click OK:
4. Route
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), admin
Destination Address:
Address Book Entry: (select), Untrust-IF
Service: Any
Action: Tunnel
Tunnel:
VPN: tunnel-adm
Modify matching bidirectional VPN policy: (select)
Position at Top: (select)
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Addresses
set address trust admin 10.10.10.1/32
set address untrust Untrust-IF 1.1.1.1/32
3. VPN
set vpn tunnel-adm manual 5555 5555 gateway 10.1.1.56 outgoing ethernet1 esp
des password netscreen1 auth md5 password netscreen2
4. Route
set vrouter trust-vr route 10.10.10.1/32 interface ethernet1
5. Policies
set policy top from trust to untrust admin Untrust-IF any tunnel vpn tunnel-adm
set policy top from untrust to trust Untrust-IF admin any tunnel vpn tunnel-adm
save
2. Click Add a new connection, and enter Admin next to the new connection
icon that appears.
4. Click the PLUS symbol, located to the left of the UNIX icon, to expand the
connection policy.
5. Click My Identity, and, in the Select Certificate drop-down list, choose None.
7. Click the PLUS symbol, located to the left of the Security Policy icon, and then
the PLUS symbol to the left of Key Exchange (Phase 2) to expand the policy
further.
9. Click Inbound Keys, and in the Security Parameters Index field, enter 5555.
10. Click Enter Key, enter the following, and click OK:
NOTE: These are the two generated keys that you copied after configuring the security
device.
11. Click Outbound Keys, and in the Security Parameters Index field, enter 5555.
12. Click Enter Key, enter the following, then click OK:
Password Policy
The password policy feature allows you to enforce a minimum length and a
complexity scheme for administrator (admin) and authenticated (auth) user
passwords. The password policy feature is intended for use in a local database, and
therefore is useful in environments where the Windows directory or RADIUS are not
available to provide centralized password policy enforcement.
Minimum length
Complexity
The range for password minimum length is 1 to 32 characters. Use the following
command to create a password policy requiring a minimum length of 8 characters
for admin passwords:
Password Policy 51
Concepts & Examples ScreenOS Reference Guide
Password complexity means passwords must include at least two uppercase letters,
two lowercase letters, and two alphanumeric and two non-alphanumeric characters;
for example: AAbb12@#. To require that passwords contain complexity, you set
complexity to 1. To unset the complexity requirement, set complexity to 0. Use the
following command to create a password policy requiring that auth passwords
contain complexity:
In the following example, you create a password policy for admin and auth accounts
requiring complexity and a minimum length of 8 characters:
CLI
set password-policy user-type admin minimum-length 8
set password-policy user-type admin complexity 1
set password-policy user-type auth minimum-length 8
set password-policy user-type auth complexity 1
save
NOTE: You can configure a password policy only from the command line interface (CLI).
CLI
unset password-policy user-type auth minimum-length
52 Password Policy
Chapter 1: Administration
In the following example, you delete the admin account named admin2005, then
display the current password policy. As shown, the policy specifies that passwords
must have a minimum length of 8 characters, and use complexity (a minimum of
two uppercase, two lowercase, two alphanumeric, and two non-alphanumeric
characters). You then create a new admin account named admin2006 and set a
password for it that fulfills the minimum length and complexity requirements of the
password policy.
CLI
unset admin admin2005
get password-policy
user-type: admin
password minimum length: 8
password complexity scheme: 1
user-type: auth
password minimum length: 8
password complexity scheme: 1
NOTE: You can configure an admin account only from the command line interface (CLI).
When activated, the login banner is used globally by the root device and all virtual
systems (vsys). You cannot differentiate or customize between or within a vsys. The
login banner preempts all individually defined administrative access banners and
firewall authentication banners. After entering a username and password, the user
must click the Login button. Pressing the Enter key will not log the user into the
device.
Use the SCP utility to securely copy the banner file to the security device. With the
following command, an administrator with username netscreen copies the banner
file my_large_banner.txt to a security device at IP address 1.1.1.2. The banner file
must be saved on the security device as usrterms.txt.
You must restart the device to activate the new banner. To modify the banner file,
create a new file and overwrite the existing one with the new one.
To remove the banner, issue the following command on the security device:
This disables the login banner feature after you restart the device.
This chapter discusses the following topics about monitoring Juniper Networks
security devices. It contains the following sections:
“Syslog” on page 71
The following list provides the possible destinations for logged data:
Console: A destination for all log entries to appear when you are
troubleshooting a security device through the console. Optionally, you might
elect to have only alarm messages (critical, alert, emergency) appear here to
alert you immediately if you happen to be using the console at the time an
alarm is triggered.
Email: A method for sending event and traffic logs to remote administrators.
SNMP: In addition to the transmission of SNMP traps, a security device can also
send alarm messages (critical, alert, emergency) from its event log to an SNMP
community.
Syslog: All event and traffic log entries that a security device can store
internally, it can also send to a syslog server. Because syslog servers have a
much greater storage capacity than the internal flash storage on a security
device, sending data to a syslog server can mitigate data loss that might occur
when log entries exceed the maximum internal storage space. Syslog stores
alert- and emergency-level events in the security facility that you specify, and
all other events (including traffic data) in the facility you specify.
WebTrends: Allows you to view log data for critical-, alert-, and
emergency-level events in a more graphical format than syslog, which is a
text-based tool.
USB: Allows you to store data on a USB flash drive. When you set USB as the
log destination, the system sends log messages to a file on the USB flash drive.
The log file is named hostname_date.evt_log, where hostname is the system
hostname at boot time, and date is date on which the device was last started.
Logging to USB is disabled by default; use the set log usb enable CLI command
to enable USB logging.
Use the set log... destination... command to set the severity levels for all log
destinations. The following example logs all system module messages of level
critical or higher to the USB flash drive:
Event Log
ScreenOS provides an event log for monitoring system events such as
admin-generated configuration changes, and self-generated messages and alarms
regarding operational behavior and attacks. The security device categorizes system
events by the following severity levels:
Emergency: Messages on SYN attacks, Tear Drop attacks, and Ping of Death
attacks. For more information on these types of attacks, see Volume 4:
Attack Detection and Defense Mechanisms.
Critical: Messages about conditions that probably affect the functionality of the
device, such as high availability (HA) status changes.
Error: Messages about error conditions that probably affect the functionality of
the device, such as a failure in antivirus scanning or in communicating with
SSH servers.
Warning: Messages about conditions that could affect the functionality of the
device, such as a failure to connect to email servers or authentication failures,
timeouts, and successes.
The event log displays the date, time, level and description of each system event.
You can view system events for each category stored in flash storage on the
security device through the WebUI or the CLI. You can also open or save the file to
the location you specify, and then use an ASCII text editor (such as Notepad or
WordPad) to view the file. Alternatively, you can send them to an external storage
space (see “Storing Log Information” on page 55).
NOTE: For detailed information about the messages that appear in the event log, refer to
the ScreenOS Message Log Reference Guide.
Event Log 57
Concepts & Examples ScreenOS Reference Guide
WebUI
Reports > System Log > Event: Select a severity level from the Log Level
drop-down list.
CLI
get event level { emergency | alert | critical | error | warning | notification |
information | debugging }
WebUI
Reports > System Log > Event: Enter a word or phrase up to 15 characters in
length in the search field, then click Search.
CLI
get event include word_string
In this example, you view event log entries with a “warning” severity level and do a
search for the keyword AV.
WebUI
Reports > System Log > Event:
CLI
get event level warning include av
58 Event Log
Chapter 2: Monitoring Security Devices
When you filter the event log by specifying a source or destination IP address
or range of addresses, the device displays the log entries for the specified
source or destination IP address, or range of addresses.
Date: You can sort the event log by date only, or by date and time. When you
sort log entries by date and time, the device lists the log entries in descending
order by date and time.
You can also filter event log entries by specifying a start date, an end date, or a
date range. When you specify a start date, the device displays log entries with
date/time stamps after the start date. When you specify an end date, the device
displays log entries with date/time stamps before the end date.
Time: When you sort logs by time, the device displays the log entries in
descending order by time, regardless of the date. When you specify a start
time, the device displays log entries with time stamps after the specified start
time, regardless of the date. When you specify an end time, the device displays
log entries with time stamps before the specified end time, regardless of the
date. When you specify both a start and end time, the device displays log
entries with time stamps within the specified time period.
Message Type ID Number: You can display event log entries for a specific
message type ID number, or you can display log entries with message type ID
numbers within a specified range. The device displays log entries with the
message type ID number(s) you specified, in descending order by date and
time.
In this example you view event log entries that contain source IP addresses within
the range 10.100.0.0 to 10.200.0.0. The log entries are also sorted by source IP
address.
WebUI
NOTE: You must use the CLI to sort the event log by address entries.
CLI
get event sort-by src-ip 10.100.0.0-10.200.0.0
Event Log 59
Concepts & Examples ScreenOS Reference Guide
WebUI
1. Reports > System Log > Event: Click Save.
The File Download dialog box prompts you to open the file (using an ASCII
editor) or save it to disk.
CLI
get event > tftp 10.1.1.5 evnt07-02.txt
WebUI
NOTE: You must use the CLI to download entries by severity level.
CLI
get event level critical > tftp 10.1.1.5 crt_evnt07-02.txt
60 Event Log
Chapter 2: Monitoring Security Devices
Traffic Log
The Juniper Networks security device can monitor and record traffic that it permits
or denies based on previously configured policies. You can enable the logging
option for each policy that you configure. When you enable the logging option for a
policy that permits traffic, the device records the traffic allowed by that policy.
When you enable the logging option for a policy that denies traffic, the device
records traffic that attempted to pass through the device, but was dropped because
of that policy.
Duration
To log all traffic that a security device receives, you must enable the logging option
for all policies. To log specific traffic, enable logging only on policies that apply to
that traffic. To enable the logging option on a policy, do either of the following:
WebUI
Policies > (From: src_zone, To: dst_zone) New: Select Logging and then click
OK.
CLI
set policy from src_zone to dst_zone src_addr dst_addr service action log
In addition to logging traffic for a policy, the device can also maintain a count in
bytes of all network traffic to which the policy was applied. When you enable the
counting option, the device includes the following information when it displays
traffic log entries
You can enable counting on a policy from the WebUI and from the CLI.
WebUI
Policies > (From: src_zone, To: dst_zone) New > Advanced: Select Counting,
click Return, then click OK.
CLI
set policy from src_zone to dst_zone src_addr dst_addr service action log count
Traffic Log 61
Concepts & Examples ScreenOS Reference Guide
WebUI
Policies > Logging (for policy ID number)
or
CLI
get log traffic policy number
WebUI
Policies: Click the Logging icon for the policy with ID number 3.
Service: HTTP
Policy ID number: 3
CLI
get log traffic policy 3
Source or Destination IP Address: You can sort the traffic log by source or
destination IP address. You can also filter the traffic log by specifying a source
or destination IP address or range of addresses.
62 Traffic Log
Chapter 2: Monitoring Security Devices
Date: You can sort the traffic log by date only, or by date and time. The device
lists the log entries in descending order by date and time.
You can also filter event log entries by specifying a start date, an end date, or a
date range. When you specify a start date, the device displays log entries with
date/time stamps after the start date. When you specify an end date, the device
displays log entries with date/time stamps before the end date.
Time: When you sort the traffic log by time, the device displays the log entries
in descending order by time, regardless of the date. When you specify a start
time, the device displays log entries with time stamps after the specified start
time, regardless of the date. When you specify an end time, the device displays
log entries with time stamps before the specified end time, regardless of the
date. When you specify both a start and end time, the device displays log
entries with time stamps within the specified time period.
WebUI
NOTE: The ability to sort the traffic log by time is available only through the CLI.
CLI
get log traffic sort-by time start-time 01:00:00
Downloading the Traffic Log
You can also open or save the log to the location you specify, and then use an ASCII
text editor (such as Notepad or WordPad) to view the file.
Alternatively, you can send traffic log entries to an external storage space (see
“Storing Log Information” on page 55). The security device makes an entry in the
traffic log when a session terminates. When you enable the security device to send
traffic log entries to an external storage location, it sends new entries every second.
Because the security device makes a traffic log entry when a session closes, the
security device sends traffic log entries for all sessions that have closed within the
past second. You can also include traffic log entries with event log entries sent by
email to an admin.
In this example, you download the traffic log for a policy with ID number 12. For
the WebUI, you download it to the local directory “C:\netscreen\logs”. For the CLI,
you download it to the root directory of a TFTP server at the IP address
10.10.20.200. You name the file “traf_log11-21-02.txt.”
Traffic Log 63
Concepts & Examples ScreenOS Reference Guide
WebUI
1. Reports > Policies > Logging (for policy ID 12): Click Save.
The File Download dialog box prompts you to open the file (using an ASCII
editor) or save it to disk.
CLI
get log traffic policy 12 > tftp 10.10.20.200 traf_log11-21-02.txt
Table 1 lists the reasons for session close that ScreenOS identifies. Any session that
cannot be identified is labeled OTHER.
64 Traffic Log
Chapter 2: Monitoring Security Devices
In the following example, you configure the device to not display the reason for
closing sessions because it interferes with a script that you want to run on the
traffic log. You must use the command line interface to change the log output style.
WebUI
Not available.
CLI
set log traffic detail 0
save
Traffic Log 65
Concepts & Examples ScreenOS Reference Guide
Self Log
ScreenOS provides a self log to monitor and record all packets terminated at the
security device. For example, if you disable some management options on an
interface—such as WebUI, SNMP, and ping—and HTTP, SNMP, or ICMP traffic is
sent to that interface, entries appear in the self log for each dropped packet.
WebUI
Configuration > Report Settings > Log Settings: Select the Log Packets
Terminated to Self check box, then click Apply.
CLI
set firewall log-self
When you enable the self log, the security device logs the entries in two places: the
self log and the traffic log. Similar to the traffic log, the self log displays the date,
time, source address/port, destination address/port, duration, and service for each
dropped packet terminating at the security device. Self log entries typically have a
source zone of Null and a destination zone of “self.”
WebUI
Reports > System Log > Self
CLI
get log self
Source or Destination IP Address: You can sort the self log by source or
destination IP address. You can also filter the self log by specifying a source or
destination IP address or range of addresses.
Date: You can sort the self log by date only, or by date and time. The device
lists the log entries in descending order by date and time.
You can also filter self log entries by specifying a start date, an end date, or a
date range. When you specify a start date, the device displays log entries with
date/time stamps after the start date. When you specify an end date, the device
displays log entries with date/time stamps before the end date.
Time: When you sort the self log by time, the security device displays the log
entries in descending order by time, regardless of the date. When you specify a
start time, the device displays log entries with time stamps after the specified
start time, regardless of the date. When you specify an end time, the device
66 Self Log
Chapter 2: Monitoring Security Devices
displays log entries with time stamps before the specified end time, regardless
of the date. When you specify both a start and end time, the device displays log
entries with time stamps within the specified time period.
WebUI
NOTE: The ability to filter the self log by time is available only through the CLI.
CLI
get log self end-time 16:32:57
In this example, you download a self log to the local directory “C:\netscreen\logs”
(WebUI) or to the root directory of a TFTP server at the IP address 10.1.1.5 (CLI).
You name the file “self_log07-03-02.txt.”
WebUI
1. Reports > System Log > Self: Click Save.
The File Download dialog box prompts you to open the file (using an ASCII
editor) or save it to disk.
CLI
get log self > tftp 10.1.1.5 self_log07-03-02.txt
Self Log 67
Concepts & Examples ScreenOS Reference Guide
In this example, you download the asset recovery log to the local directory
“C:\netscreen\logs” (WebUI) or to the root directory of a TFTP server at the IP
address 10.1.1.5 (CLI). You name the file “sys_rst.txt,”
WebUI
1. Reports > System Log > Asset Recovery: Click Save.
The File Download dialog box prompts you to open the file (using an ASCII
editor) or save it to disk.
CLI
get log asset-recovery > tftp 10.1.1.5 sys_rst.txt
Traffic Alarms
The security device supports traffic alarms when traffic exceeds thresholds that you
have defined in policies. You can configure the security device to alert you through
one or more of the following methods whenever the security device generates a
traffic alarm:
Console
SNMP
Syslog
WebTrends
NetScreen-Global PRO
You set alarm thresholds to detect anomalous activity. To know what constitutes
anomalous activity, you must first establish a baseline of normal activity. To create
such a baseline for network traffic, you must observe traffic patterns over a period
of time. Then, after you have determined the amount of traffic that you consider as
normal, you can set alarm thresholds above that amount. Traffic exceeding that
threshold triggers an alarm to call your attention to a deviation from the baseline.
You can then evaluate the situation to determine what caused the deviation and
whether you need to take action in response.
You can also use traffic alarms to provide policy-based intrusion detection and
notification of a compromised system. Examples of the use of traffic alarms for
these purposes are provided below.
WebUI
Policy > Policy Elements > Addresses > List > New: Enter the following,
then click OK:
Policies > (From: Untrust, To: DMZ) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), web1
Service: Telnet
Action: Deny
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
Counting: (select)
Alarm Threshold: 64 Bytes/Sec, 0 Kbytes/Min
CLI
set address dmz web1 211.20.1.5/32
set policy from untrust to dmz any web1 telnet deny count alarm 64 0
save
Traffic Alarms 69
Concepts & Examples ScreenOS Reference Guide
WebUI
Policy > Policy Elements > Addresses > List > New: Enter the following,
then click OK:
Policies > (From: Global, To: Global) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), ftp1
Service: FTP-Get
Action: Permit
Policies > (From: Global, To: Global) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), ftp1
Destination Address:
Address Book Entry: (select), Any
Service: ANY
Action: Deny
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
Counting: (select)
Alarm Threshold: 64 Bytes/Sec, 0 Kbytes/Min
CLI
set address global ftp1 211.20.1.10/32
set policy global any ftp1 ftp-get permit
set policy global ftp1 any deny count alarm 64 0
save
70 Traffic Alarms
Chapter 2: Monitoring Security Devices
WebUI
Configuration > Report Settings > Email: Enter the following information,
then click Apply:
NOTE: If you have DNS enabled, you can also use a hostname for the mail server, such as
mail.juniper.net.
CLI
set admin mail alert
set admin mail mail-addr1 [email protected]
set admin mail mail-addr2 [email protected]
set admin mail server-name 172.16.10.254
set admin mail traffic-log
save
Syslog
A security device can generate syslog messages for system events at predefined
severity levels (see the list of severity levels in “Event Log” on page 57), and
optionally for traffic that policies permit across a firewall. It sends these messages
to up to four designated syslog hosts running on UNIX/Linux systems. For each
syslog host, you can specify the following:
Whether the security device includes traffic log entries, event log entries, or
both traffic and event log entries.
Whether to send traffic through a VPN tunnel to the syslog server and—if
through a VPN tunnel—which interface to use as the source interface (for
examples, see “Example: Self-Generated Traffic Through a Route-Based
Tunnel” on page 79 and “Example: Self-Generated Traffic Through a
Policy-Based Tunnel” on page 86).
The security facility, which classifies and sends emergency and alert level
messages to the Syslog host; and the regular facility, which classifies and sends
all other messages for events unrelated to security.
By default, the security device sends messages to syslog hosts via UDP (port 514).
To increase the reliability of the message delivery, you can change the transport
protocol for each syslog host to TCP.
Syslog 71
Concepts & Examples ScreenOS Reference Guide
You can use syslog messages to create email alerts for the system administrator, or
to display messages on the console of the designated host using UNIX syslog
conventions.
WebUI
Configuration > Report Settings > Syslog: Enter the following, then click
Apply:
Enable syslog messages: Select this option to send logs to the specified
syslog servers.
No.: Select 1, 2, and 3 to indicate you are adding 3 syslog servers.
IP/Hostname: 1.1.1.1, 2.2.2.1, 3.3.3.1
Port: 1514, 2514, 3514
Security Facility: Local0, Local0, Local0
Facility: Local0, Local0, Local0
Event Log: (select)
Traffic Log: (select)
TCP: (select)
CLI
set syslog config 1.1.1.1 port 1514
set syslog config 1.1.1.1 log all
set syslog config 1.1.1.1 facilities local0 local0
set syslog config 1.1.1.1 transport tcp
set syslog config 2.2.2.1 port 2514
set syslog config 2.2.2.1 log all
set syslog config 2.2.2.1 facilities local0 local0
set syslog config 2.2.2.1 transport tcp
set syslog config 3.3.3.1 port 3514
set syslog config 3.3.3.1 log all
set syslog config 3.3.3.1 facilities local0 local0
set syslog config 2.2.2.1 transport tcp
set syslog enable
save
72 Syslog
Chapter 2: Monitoring Security Devices
You can also send WebTrends messages through a VPN tunnel. In the WebUI, use
the Use Trust Zone Interface as Source IP for VPN option. In the CLI, use the set
webtrends vpn command.
In the following example, you send notification messages to the WebTrends host
(172.10.16.25).
WebUI
1. WebTrends Settings
Configuration > Report Settings > WebTrends: Enter the following, then click
Apply:
NOTE: When you enable WebTrends on a security device running in Transparent mode,
you must set up a static route. See “Static Routing” on page 7 -1.
CLI
3. WebTrends Settings
set webtrends host-name 172.10.16.25
set webtrends port 514
set webtrends enable
4. Severity Levels
set log module system level notification destination webtrends
save
Syslog 73
Concepts & Examples ScreenOS Reference Guide
Security devices also support all relevant Management Information Base II (MIB II)
groups defined in RFC-1213, Management Information Base for Network
Management of TCP/IP-based Internets: MIB-II. The devices also have private
enterprise MIB files, which you can load into an SNMP MIB browser.
NOTE: Using SNMP MIB browser, you can check the CPU, memory usage, and session
usage counts on both the ScreenOS and the Intrusion Detection and Prevention
(IDP) security modules.
The Juniper Networks SNMP agent generates the following traps (notifications)
when specified events or conditions occur:
Cold Start Trap: The security device generates a cold start trap when it
becomes operational after you power it on.
Trap for SNMP Authentication Failure: The SNMP agent in the security device
triggers the authentication failure trap if someone attempts to connect to it
using an incorrect SNMP community string or if the IP address of the host
attempting the connection is not defined in an SNMP community. (This option
is enabled by default.)
Traps for System Alarms: security device error conditions and firewall
conditions trigger system alarms. Three enterprise traps are defined to cover
alarms related to hardware, security, and software. (For more information on
firewall settings and alarms, see “ICMP Fragments” on page 4 -240 and “Traffic
Alarms” on page 68.)
Traps for Traffic Alarms: Traffic alarms are triggered when traffic exceeds the
alarm thresholds set in policies. (For more information on configuring policies,
see “Policies” on page 2 -159.)
Table 2 lists possible alarm types and their associated trap number.
NOTE: The network administrator must have an SNMP manager application such as
HP OpenView or SunNet Manager to browse the SNMP MIB II data and to receive
traps from either the trusted or untrusted interface. Shareware and freeware
SNMP manager applications available from the Internet.
Security devices do not ship with a default configuration for the SNMP manager. To
configure your security device for SNMP, you must first create communities, define
their associated hosts, and assign permissions (read/write or read-only).
When you create an SNMP community, you can specify whether the community
supports SNMPv1, SNMPv2c, or both SNMP versions, as required by the SNMP
management stations. (For backward compatibility with earlier ScreenOS releases
that only support SNMPv1, security devices support SNMPv1 by default.) If an
SNMP community supports both SNMP versions, you must specify a trap version
for each community member.
For security reasons, an SNMP community member with read/write privileges can
change only the following variables on a security device:
sysContact - Contact information for the admin of the security device in case
the SNMP admin needs to contact him or her. This can be the security admin’s
name, email address, telephone number, office location, or a combination of
such information.
sysLocation - The physical location of the security device. This can be the
name of a country, city, building, or its exact location on a rack in a network
operations center (NOC).
sysName - The name that SNMP administrators use for the security device. By
convention, this is a fully qualified domain name (FQDN), but it can be
something else.
ipDefaultTTL - The default value inserted into the time-to-live (TTL) field in the
IP header of datagrams originating from the security device whenever the
Transport Layer protocol does not supply a TTL value.
Implementation Overview
Juniper Networks has implemented SNMP in its devices in the following ways:
Each community has either read-only or read-write permission for the MIB II
data.
You can access the MIB II data and traps through any physical interface.
Each system alarm (a system event classified with a severity level of critical,
alert, or emergency) generates a single enterprise SNMP trap to each of the
hosts in each community that is set to receive traps.
The security device sends Cold Start / Link Up / Link Down traps to all hosts in
communities that you set to receive traps.
If you specify trap-on for a community, you also have the option to allow traffic
alarms.
You provide contact information for the local admin of the security device in case
an SNMP community member needs to contact him—name: [email protected].
You also provide the location of the security device—location: 3-15-2. These
numbers indicate that the device is on the third floor, in the fifteenth row, and in
the second position in that row.
You also enable the SNMP agent to generate traps whenever someone illegally
attempts an SNMP connection to the security device. Authentication failure traps is
a global setting that applies to all SNMP communities and is disabled by default.
Finally, you enable SNMP manageability on ethernet1, an interface that you have
previously bound to the Trust zone. This is the interface through which the SNMP
manager application communicates with the SNMP agent in the security device.
WebUI
Configuration > Report Settings > SNMP: Enter the following settings, then
click Apply:
Configuration > Report Settings > SNMP > New Community: Enter the
following settings, then click OK:
Network > Interfaces > Edit (for ethernet1): Enter the following settings, then
click OK:
Service Options:
Management Services: SNMP
CLI
set snmp contact [email protected]
set snmp location 3-15-2
set snmp auth-trap enable
set snmp community MAge11 read-write trap-on version any
set snmp host Mage 1.1.1.5/32 trap v1
set snmp host Mage 1.1.1.6/32 trap v2
set interface ethernet1 manage snmp
save
Juniper Networks security devices support two types of VPN tunnel configurations:
Route-Based VPNs: The security device uses route table entries to direct traffic
to tunnel interfaces, which are bound to VPN tunnels.
Policy-Based VPNs: The security device uses the VPN tunnel names specifically
referenced in policies to direct traffic through VPN tunnels.
If either the remote gateway or the end entity has a dynamically assigned IP
address, then the security device cannot initiate the formation of a VPN tunnel
because these addresses cannot be predetermined, and thus you cannot define
routes to them. In such cases, the remote host must initiate the VPN connection.
After either a policy-based or route-based VPN tunnel is established, both ends of
the tunnel can initiate traffic if policies permit it. Also, for a route-based VPN, there
must be a route to the end entity through a tunnel interface bound to the VPN
tunnel—either because you manually entered the route or because the local
security device received the route through the exchange of dynamic routing
messages after a tunnel was established. (For information about dynamic routing
protocols, see Volume 7: Routing.) You can also use VPN monitoring with the rekey
option or IKE heartbeats to ensure that once the tunnel is established, it remains up
regardless of VPN activity. (For more information about these options, see “VPN
Monitoring” on page 5 -252 and “Monitoring Mechanisms” on page 5 -303.)
For each VPN tunnel configuration type, you can use any of the following types of
VPN tunnel:
Manual Key: You manually set the three elements that define a Security
Association (SA) at both ends of the tunnel: a Security Parameters Index (SPI),
an encryption key, and an authentication key. To change any element in the
SA, you must manually enter it at both ends of the tunnel.
AutoKey IKE with Pre-shared Key: One or two pre-shared secrets—one for
authentication and one for encryption—function as seed values. Using them,
the IKE protocol generates a set of symmetrical keys at both ends of the tunnel;
that is, the same key is used to encrypt and decrypt. At predetermined
intervals, these keys are automatically regenerated.
AutoKey IKE with Certificates: Using the Public Key Infrastructure (PKI), the
participants at both ends of the tunnel use a digital certificate (for
authentication) and an RSA public/private key pair (for encryption). The
encryption is asymmetrical; that is, one key in a pair is used to encrypt and the
other to decrypt.
NOTE: For a complete description of VPN tunnels, see Volume 5: Virtual Private Networks.
For more information on NetScreen-Remote, refer to the NetScreen-Remote VPN
Client Administrator Guide.
Device-A Device-B
Local IP 10.1.1.1/32 Local IP 10.2.2.2/32
Remote IP 10.2.2.2/32 Remote IP 10.1.1.1/32
Service Any Service Any
You bind ethernet1 to the Trust zone and ethernet3 to the Untrust zone. The default
gateway IP address is 1.1.1.250. All zones are in the trust-vr routing domain.
Untrust Zone
Local
Trust Zone Site
Device-A Internet
LAN LAN
10.1.1.0/24 10.2.2.0/24
TUNNEL: VPN1 Device-B
gateway, 2.2.2.250
ethernet3, 2.2.2.2/24 ethernet1
10.2.2.1/24
tunnel.1, Unnumbered NAT
Remote
Untrust Zone Site Trust Zone
The remote admin for Device-B uses similar settings to define that end of the
AutoKey IKE VPN tunnel so that the pre-shared key, proposals, and proxy IDs
match.
NOTE: This example assumes that the remote admin has already set up the syslog server
and SNMP manager application that supports SNMPv1. When the remote admin
sets up the VPN tunnel on his security device, he uses 1.1.1.1 as the remote
gateway and 10.1.1.1 as the destination address.
WebUI (Device-A)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
NOTE: By default, any interface that you bind to the Trust zone is in NAT mode.
Consequently, this option is already enabled for interfaces bound to the Trust
zone.
When the remote admin configures the SNMP manager, he must enter 10.1.1.1 in
the Remote SNMP Agent field. This is the address to which the SNMP manager
sends queries.
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Configuration > Report Settings > SNMP > New Community: Enter the
following, then click OK:
3. VPN
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
CLI (Device-A)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface ethernet3 manage snmp
set interface tunnel.1 zone untrust
set interface tunnel.1 ip unnumbered interface ethernet1
NOTE: When the remote admin configures the SNMP manager, he must enter 10.1.1.1 in
the Remote SNMP Agent field. This is the address to which the SNMP manager
sends queries.
By default, any interface that you bind to the Trust zone is in NAT mode.
Consequently, this option is already enabled for interfaces bound to the Trust
zone.
2. VPN
set ike gateway to_admin address 2.2.2.2 outgoing-interface ethernet3 preshare
Ci5y0a1aAG sec-level compatible
set vpn vpn1 gateway to_admin sec-level compatible
set vpn vpn1 bind interface tunnel.1
set vpn vpn1 proxy-id local-ip 10.1.1.1/32 remote-ip 10.2.2.2/32 any
3. Syslog and SNMP
set syslog config 10.2.2.2 auth/sec local0
set syslog enable
set snmp community remote_admin read-write trap-on version v1
set snmp host remote_admin 10.2.2.2/32
4. Routes
set vrouter trust-vr route 10.2.2.2/32 interface tunnel.1
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
save
WebUI (Device-B)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Policy > Policy Elements > Addresses > Lists > New: Enter the following,
then click OK:
Select Syslog and use the << button to move the service from the
Available Members column to the Group Members column.
Select SNMP and use the << button to move the service from the
Available Members column to the Group Members column.
4. VPN
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Network Address/Netmask:10.1.1.1/32
Gateway: (select)
Interface: tunnel.1
Gateway IP Address: 0.0.0.0
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
6. Policies
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), addr1
Destination Address:
Address Book Entry: (select), ns-a
Service: s-grp1
Action: Permit
Position at Top: (select)
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), ns-a
Destination Address:
Address Book Entry: (select), addr1
Service: s-grp1
Action: Permit
Position at Top: (select)
CLI (Device-B)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.2.2.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 2.2.2.2/24
set interface tunnel.1 zone untrust
set interface tunnel.1 ip unnumbered interface ethernet1
2. Addresses
set address trust addr1 10.2.2.2/32
set address untrust ns-a 10.1.1.1/32
3. Service Group
set group service s-grp1
set group service s-grp1 add syslog
set group service s-grp1 add snmp
4. VPN
set ike gateway to_admin address 1.1.1.1 outgoing-interface ethernet3 preshare
Ci5y0a1aAG sec-level compatible
set vpn vpn1 gateway to_admin sec-level compatible
set vpn vpn1 bind interface tunnel.1
set vpn vpn1 proxy-id local-ip 10.2.2.2/32 remote-ip 10.1.1.1/32 any
5. Routes
set vrouter trust-vr route 10.1.1.1/32 interface tunnel.1
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 2.2.2.250
6. Policies
set policy top from trust to untrust addr1 ns-a s-grp1 permit
set policy top from untrust to trust ns-a addr1 s-grp1 permit
save
NOTE: This example assumes that the remote admin has already set up the syslog server
and an SNMP manager application that supports SNMPv2c. When the remote
admin sets up the VPN tunnel on his security device, he uses 1.1.1.1 as the
remote gateway and 10.1.1.1 as the destination address.
Both you and the remote admin bind ethernet1 to the Trust zone, and ethernet3 to
the Untrust zone on Device-A and Device-B. The default gateway IP address for
Device-A is 1.1.1.250. The default gateway IP address for Device-B is 2.2.2.250. All
zones are in the trust-vr routing domain.
SNMP Manager
ethernet1 and Syslog
10.1.1.1/24 ethernet3, 1.1.1.1/24 Server 10.2.2.2
NAT
gateway, 1.1.1.250
Device-A Internet
LAN LAN
10.1.1.0/24 10.2.2.0/24
TUNNEL: VPN1 Device-B
gateway, 2.2.2.250
ethernet3, 2.2.2.2/24 ethernet1
10.2.2.1/24
NAT
The inbound and outbound policies on Device-A match the outbound and inbound
policies on Device-B. The addresses and service used in the policies are as follows:
10.2.2.2/32, the address of the host for the SNMP community member and
syslog server
Service group named “s-grp1,” which contains SNMP and syslog services
From the policies that you and the admin for Device-B create, the two security
devices derive the following proxy IDs for vpn1:
Device-A Device-B
Local IP 10.1.1.1/32 Local IP 10.2.2.2/32
Remote IP 10.2.2.2/32 Remote IP 10.1.1.1/32
Service Any Service Any
NOTE: The security device treats a service group as “any” in proxy IDs.
WebUI (Device-A)
1. Interfaces—Security Zones
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
OK:
NOTE: When the remote admin configures the SNMP manager, he must enter 10.1.1.1 in
the Remote SNMP Agent field. This is the address to which the SNMP manager
sends queries.
By default, any interface that you bind to the Trust zone is in NAT mode.
Consequently, this option is already enabled for interfaces bound to the Trust
zone.
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > Lists > New: Enter the following,
then click OK:
Select SNMP and use the << button to move the service from the
Available Members column to the Group Members column.
4. VPN
VPNs > AutoKey IKE > New: Enter the following, then click OK:
Configuration > Report Settings > SNMP > New Community: Enter the
following, then click OK:
Source Address:
Address Book Entry: (select), trust_int
Destination Address:
Address Book Entry: (select), remote_admin
Service: s-grp1
Action: Tunnel
Tunnel VPN: vpn1
Modify matching outgoing VPN policy: (select)
Position at Top: (select)
CLI (Device-A)
1. Interfaces—Security Zones
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface ethernet3 manage snmp
NOTE: By default, any interface that you bind to the Trust zone is in NAT mode.
Consequently, this option is already enabled for interfaces bound to the Trust
zone.
2. Addresses
set address trust trust_int 10.1.1.1/32
set address untrust remote_admin 10.2.2.2/32
3. Service Group
set group service s-grp1
set group service s-grp1 add syslog
set group service s-grp1 add snmp
4. VPN
set ike gateway to_admin address 2.2.2.2 outgoing-interface ethernet3 preshare
Ci5y0a1aAG sec-level compatible
set vpn vpn1 gateway to_admin sec-level compatible
WebUI (Device-B)
1. Interfaces—Security Zones
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > Lists > New: Enter the following,
then click OK:
3. Service Groups
Policy > Policy Elements > Services > Group: Enter the following group
name, move the following services, then click OK:
Select Syslog and use the << button to move the service from the
Available Members column to the Group Members column.
Select SNMP and use the << button to move the service from the
Available Members column to the Group Members column.
4. VPN
VPNs > AutoKey IKE > New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), addr1
Destination Address:
Address Book Entry: (select), ns-a
Service: s-grp1
Action: Tunnel
Tunnel VPN: vpn1
Modify matching outgoing VPN policy: (select)
Position at Top: (select)
CLI (Device-B)
1. Interfaces—Security Zones
set interface ethernet1 zone trust
set interface ethernet1 ip 10.2.2.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 2.2.2.2/24
2. Addresses
set address trust addr1 10.2.2.2/32
set address untrust ns-a 10.1.1.1/32
3. Service Group
set group service s-grp1
set group service s-grp1 add syslog
set group service s-grp1 add snmp
4. VPN
set ike gateway to_admin address 1.1.1.1 outgoing-interface ethernet3 preshare
Ci5y0a1sec-level compatible
set vpn vpn1 gateway to_admin sec-level compatible
5. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 2.2.2.250
6. Policies
set policy top from trust to untrust addr1 ns-a s-grp1 tunnel vpn vpn1
set policy top from untrust to trust ns-a addr1 s-grp1 tunnel vpn vpn1
save
Table 5 shows the screen counters for monitoring general firewall behavior and for
viewing the amount of traffic affected by specified policies.
Counter Description
Bad IP Option Protection Number of frames discarded because of malformed or incomplete IP options
Dst IP-based session limiting Number of sessions dropped after the session threshold was reached
FIN bit with no ACK bit Number of packets detected and dropped with an illegal combination of flags
Fragmented packet protection Number of blocked IP packet fragments
HTTP Component Blocked Number of blocked packets with HTTP components
HTTP Component Blocking for ActiveX Number of ActiveX components blocked
controls
HTTP Component Blocking for .exe files Number of blocked HTTP packets with .exe files
HTTP Component Blocking for Java Number of blocked Java components
applets
HTTP Component Blocking for .zip files Number of blocked HTTP packets with .zip files
ICMP Flood Protection Number of ICMP packets blocked as part of an ICMP flood
ICMP Fragment Number of ICMP frames with the More Fragments flag set, or with offset
indicated in the Offset field
IP Spoofing Attack Protection Number of IP addresses blocked as part of an IP spoofing attack
IP Sweep Protection Number of IP sweep attack packets detected and blocked
Counter Description
Land Attack Protection Number of packets blocked as part of a suspected land attack
Large ICMP Packet Number of ICMP frames detected with an IP length greater than 1024
Limit Session Number of undeliverable packets because the session limit had been reached
Loose Src Route IP Option Number of IP packets detected with the Loose Source Route option enabled
Malicious URL Protection Number of suspected malicious URLs blocked
Ping-of-Death Protection Number of suspected and rejected ICMP packets that are oversized or of an
irregular size
Port Scan Protection Number of port scans detected and blocked
Record Route IP Option Number of frames detected with the Record Route option enabled
Security IP Option Number of frames discarded with the IP Security option set
Src IP-based session limiting Number of sessions dropped after the session threshold was reached
Source Route IP Option Filter Number of IP source routes filtered
Stream IP Option Number of packets discarded with the IP Stream identifier set
Strict Src Route IP Option Number of packets detected with the Strict Source Route option enabled
SYN-ACK-ACK-Proxy DoS Number of blocked packets because of the SYN-ACK-ACK-proxy DoS SCREEN
option
SYN and FIN bits set Number of packets detected with an illegal combination of flags
SYN Flood Protection Number of SYN packets detected as part of a suspected SYN flood
SYN Fragment Detection Number of packet fragments dropped as part of a suspected SYN fragments
attack
Timestamp IP Option Number of IP packets discarded with the Internet Timestamp option set
TCP Packet without Flag Number of illegal packets dropped with missing or malformed flags field
Teardrop Attack Protection Number of packets blocked as part of a Teardrop attack
UDP Flood Protection Number of UDP packets dropped as part of a suspected UDP flood
Unknown Protocol Protection Number of packets blocked as part of an unknown protocol
WinNuke Attack Protection Number of packets detected as part of a suspected WinNuke attack
Table 6 shows the hardware counters for monitoring hardware performance and
packets with errors.
Counter Description
drop vlan Number of packets dropped because of missing VLAN tags, an undefined sub-interface, or because
VLAN trunking was not enabled when the security device was in Transparent mode
early frame Number of counters used in an Ethernet driver buffer descriptor management
in align err Number of incoming packets with an alignment error in the bit stream
in bytes Number of bytes received
in coll err Number of incoming collision packets
in crc err Number of incoming packets with a cyclic redundancy check (CRC) error
in dma err Number of incoming packets with a Direct Memory Access (DMA) error
Counter Description
in misc err Number of incoming packets with a miscellaneous error
in no buffer Number of unreceived packets because of unavailable buffers
in overrun Number of transmitted overrun packets
in packets Number of packets received
in short frame Number of incoming packets with an Ethernet frame shorter than 64 bytes (including the frame
checksum)
in underrun Number of transmitted underrun packets
late frame Number of counters used in an Ethernet driver buffer descriptor management
out bs pak Number of packets held in back store while searching for an unknown MAC address
When the security device forwards a packet, it first checks if the destination MAC address is in the
ARP table. If it cannot find the destination MAC in the ARP table, the security device sends an ARP
request to the network. If the security device receives another packet with the same destination MAC
address before it receives a reply to the first ARP request, it increases the out bs pak counter by one.
out bytes Number of bytes sent
out coll err Number of outgoing collision packets
out cs lost Number of dropped outgoing packets because the Carrier Sense Multiple Access/Collision Detect
(CSMA/CD) protocol lost the signal
out defer Number of deferred outgoing packets
out discard Number of discarded outgoing packets
out heartbeat Number of outgoing heartbeat packets
out misc err Number of outgoing packets with a miscellaneous error
out no buffer Number of unsent packets because of unavailable buffers
out packets Number of packets sent
re xmt limit Number of dropped packets when the retransmission limit was exceeded while an interface was
operating at half-duplex
Table 7 shows the flow counters for monitoring the number of packets inspected at
the flow level.
Counter Description
address spoof Number of suspected address spoofing attack packets received
auth deny Number of times user authentication was denied
auth fail Number of times user authentication failed
big bkstr Number of packets that are too big to buffer in the ARP back store while waiting for MAC-to-IP
address resolution
connections Number of sessions established since the last boot
encrypt fail Number of failed Point-to-Point Tunneling Protocol (PPTP) packets
*icmp broadcast Number of ICMP broadcasts received
icmp flood Number of ICMP packets that are counted toward the ICMP flood threshold
illegal pak Number of packets dropped because they do not conform to the protocol standards
Counter Description
in arp req Number of incoming arp request packets
in arp resp Number of outgoing arp request packets
in bytes Number of bytes received
in icmp Number of Internet Control Message Protocol (ICMP) packets received
in other Number of incoming packets that are of a different Ethernet type
in packets Number of packets received
in self Number of packets addressed to the Management IP address
*in un auth Number of unauthorized incoming TCP, UDP, and ICMP packets
*in unk prot Number of incoming packets using an unknown Ethernet protocol
in vlan Number of incoming vlan packets
in vpn Number of IPSec packets received
invalid zone Number of packets destined for an invalid security zone
ip sweep Number of packets received and discarded beyond the specified ip sweep threshold
land attack Number of suspected land attack packets received
loopback drop Number of packets dropped because they cannot be looped back through the security device. An
example of a loopback session is when a host in the Trust zone sends traffic to a MIP or VIP address
that is mapped to a server that is also in the Trust zone. The security device creates a loopback
session that directs such traffic from the host to the MIP or VIP server.
mac relearn Number of times that the MAC address learning table had to relearn the interface associated with a
MAC address because the location of the MAC address changed
mac tbl full Number of times that the MAC address learning table completely filled up
mal url Number of blocked packets destined for a URL determined to be malicious
*misc prot Number of packets using a protocol other than TCP, UDP, or ICMP
mp fail Number of times a problem occurred when sending a PCI message between the master processor
module and the processor module
no conn Number of packets dropped because of unavailable Network Address Translation (NAT) connections
no dip Number of packets dropped because of unavailable dynamic IP (DIP) addresses
no frag netpak Number of times that the available space in the netpak buffer fell below 70%
*no frag sess The number of times that fragmented sessions were greater than half of the maximum number of
NAT sessions
no g-parent Number of packets dropped because the parent connection could not be found
no gate Number of packets dropped because no gate was available
no gate sess Number of terminated sessions because there were no gates in the firewall for them
no map Number of packets dropped because there was no map to the trusted side
no nat vector Number of packets dropped because the Network Address Translation (NAT) connection was
unavailable for the gate
*no nsp tunnel Number of dropped packets sent to a tunnel interface to which no VPN tunnel is bound
no route Number of unroutable packets received
no sa The number of packets dropped because no Security Associations (SA) was defined
no sa policy Number of packets dropped because no policy was associated with an SA
*no xmit vpnf Number of dropped VPN packets due to fragmentation
Counter Description
null zone Number of dropped packets erroneously sent to an interface bound to the Null zone
nvec err Number of packets dropped because of NAT vector error
out bytes Number of bytes sent
out packets Number of packets sent
out vlan Number of outgoing vlan packets
ping of death Number of suspected Ping of Death attack packets received
policy deny Number of packets denied by a defined policy
port scan Number of packets that are counted as a port scan attempt
proc sess Number of times that the total number of sessions on a processor module exceeded the maximum
threshold
sa inactive Number of packets dropped because of an inactive SA
sa policy deny Number of packets denied by an SA policy
sessn thresh the threshold for the maximum number of sessions
*slow mac Number of frames whose MAC addresses were slow to resolve
src route Number of packets dropped because of the filter source route option
syn frag Number of dropped SYN packets because of a fragmentation
tcp out of seq Number of TCP segments received whose sequence number is outside the acceptable range
tcp proxy Number of packets dropped from using a TCP proxy such as the SYN flood protection option or user
authentication
teardrop Number of packets blocked as part of a suspected Teardrop attack
tiny frag Number of tiny fragmented packets received
trmn drop Number of packets dropped by traffic management
trmng queue Number of packets waiting in the queue
udp flood Number of UDP packets that are counted toward the UDP flood threshold
url block Number of HTTP requests that were blocked
winnuke Number of WinNuke attack packets received
wrong intf Number of session creation messages sent from a processor module to the master processor module
wrong slot Number of packets erroneously sent to the wrong processor module
NOTE: For more information about the Carrier Sense Multiple Access/Collision Detect
(CSMA/CD) protocol, refer to the IEEE 802.3 standard available at
http://standards.ieee.org.
In this example, you view the device screen counters for the Trust zone.
WebUI
Reports > Counters > Zone Screen: Select Trust from the Zone drop-down
list.
CLI
get counter screen zone trust
Index IX-I
Concepts & Examples ScreenOS Reference Guide
IX-II Index
Index
T
TCP proxy .......................................................................96
Telnet ................................................................................9
Telnet management options ........................................28
Telnet, logging in via .....................................................10
traffic alarms .........................................................68 to 71
Transparent mode, management options ..................29
U
USB ..................................................................................56
users, multiple administrative ......................................33
V
virtual private networks
See VPNs
virtual systems
admins ......................................................................34
read-only admins ....................................................34
VLAN1, management options ......................................29
VPNs
AutoKey IKE.......................................................43, 79
for administrative traffic ........................................78
manual key ..............................................................79
Index IX-III
Concepts & Examples ScreenOS Reference Guide
IX-IV Index
Concepts & Examples
ScreenOS Reference Guide
Volume 4:
Attack Detection and Defense Mechanisms
Juniper Networks, the Juniper Networks logo, JUNOS, NetScreen, ScreenOS, and Steel-Belted Radius are registered trademarks of Juniper Networks, Inc.
in the United States and other countries. JUNOSe is a trademark of Juniper Networks, Inc. All other trademarks, service marks, registered trademarks, or
registered service marks are the property of their respective owners.
All specifications are subject to change without notice. Juniper Networks assumes no responsibility for any inaccuracies in this document or for any
obligation to update information in this document. Juniper Networks reserves the right to change, modify, transfer, or otherwise revise this publication
without notice.
FCC Statement
The following information is for FCC compliance of Class A devices: This equipment has been tested and found to comply with the limits for a Class A
digital device, pursuant to part 15 of the FCC rules. These limits are designed to provide reasonable protection against harmful interference when the
equipment is operated in a commercial environment. The equipment generates, uses, and can radiate radio-frequency energy and, if not installed and
used in accordance with the instruction manual, may cause harmful interference to radio communications. Operation of this equipment in a residential
area is likely to cause harmful interference, in which case users will be required to correct the interference at their own expense.
The following information is for FCC compliance of Class B devices: The equipment described in this manual generates and may radiate radio-frequency
energy. If it is not installed in accordance with Juniper Networks’ installation instructions, it may cause interference with radio and television reception.
This equipment has been tested and found to comply with the limits for a Class B digital device in accordance with the specifications in part 15 of the FCC
rules. These specifications are designed to provide reasonable protection against such interference in a residential installation. However, there is no
guarantee that interference will not occur in a particular installation.
If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user
is encouraged to try to correct the interference by one or more of the following measures:
Connect the equipment to an outlet on a circuit different from that to which the receiver is connected.
Caution: Changes or modifications to this product could void the user's warranty and authority to operate this device.
Disclaimer
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED
WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED
WARRANTY, CONTACT YOUR JUNIPER NETWORKS REPRESENTATIVE FOR A COPY.
ii
Table of Contents
About This Volume ix
Document Conventions.................................................................................... x
Web User Interface Conventions .............................................................. x
Command Line Interface Conventions ...................................................... x
Naming Conventions and Character Types .............................................. xi
Illustration Conventions .......................................................................... xii
Requesting Technical Support ........................................................................ xii
Self-Help Online Tools and Resources..................................................... xiii
Opening a Case with JTAC ...................................................................... xiii
Document Feedback ..................................................................................... xiii
Example............................................................................................ 34
Prioritizing Critical Traffic .................................................................35
SYN-ACK-ACK Proxy Flood ...................................................................... 36
Network DoS Attacks ..................................................................................... 38
SYN Flood................................................................................................ 38
SYN Cookie..............................................................................................48
ICMP Flood ..............................................................................................50
UDP Flood ............................................................................................... 51
Land Attack ............................................................................................. 52
OS-Specific DoS Attacks ................................................................................. 53
Ping of Death........................................................................................... 53
Teardrop Attack....................................................................................... 54
WinNuke ................................................................................................. 55
iv Table of Contents
Table of Contents
Table of Contents v
Concepts & Examples ScreenOS Reference Guide
vi Table of Contents
Table of Contents
Index..........................................................................................................................IX-I
Volume 4: Attack Detection and Defense Mechanisms describes the Juniper Networks
security options available in ScreenOS. You can enable many of these options at the
security zone level. These options apply to traffic reaching the Juniper Networks
security device through any interface bound to a zone for which you have enabled
such options. These options offer protection against IP address and port scans,
denial of service (DoS) attacks, and other kinds of malicious activity. You can apply
other network security options, such as Web filtering, antivirus checking, and
intrusion detection and prevention (IDP), at the policy level. These options only
apply to traffic under the jurisdiction of the policies in which they are enabled.
NOTE: The subject of policies is presented only peripherally in this volume, as it applies to
the network security options that you can enable at the policy level. For a
complete examination of policies, see “Policies” on page 2-159.
ix
Concepts & Examples ScreenOS Reference Guide
Document Conventions
This document uses the conventions described in the following sections:
The following example shows the WebUI path and parameters for defining an
address:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
To open Online Help for configuration settings, click the question mark (?) in the
upper left of the screen.
The navigation tree also provides a Help > Config Guide configuration page to help
you configure security policies and Internet Protocol Security (IPSec). Select an
option from the list, and follow the instructions on the page. Click the ? character in
the upper left for Online Help on the Config Guide.
In text, commands are in boldface type and variables are in italic type.
In examples:
x Document Conventions
About This Volume
If there is more than one choice, each choice is separated by a pipe ( | ). For
example, the following command means “set the management options for the
ethernet1, the ethernet2, or the ethernet3 interface”:
NOTE: When entering a keyword, you only have to type enough letters to identify the
word uniquely. Typing set adm u whee j12fmt54 will enter the command set
admin user wheezer j12fmt54. However, all the commands documented in this
guide are presented in their entirety.
If a name string includes one or more spaces, the entire string must be
enclosed within double quotes; for example:
Any leading spaces or trailing text within a set of double quotes are trimmed;
for example, “ local LAN ” becomes “local LAN”.
NOTE: A console connection only supports SBCS. The WebUI supports both SBCS and
MBCS, depending on the character sets that your browser supports.
Document Conventions xi
Concepts & Examples ScreenOS Reference Guide
Illustration Conventions
Figure 1 shows the basic set of images used in illustrations throughout this volume.
Policy Engine
Security Zone Interfaces:
White = Protected Zone Interface
(example = Trust Zone)
Black = Outside Zone Interface
(example = Untrust Zone)
Generic Network Device
Tunnel Interface
Server
VPN Tunnel
Router
Juniper Networks
Switch Security Devices
Hub
Download the latest versions of software and review your release notes—
http://www.juniper.net/customers/csc/software/
To verify service entitlement by product serial number, use our Serial Number
Entitlement (SNE) Tool—
https://tools.juniper.net/SerialNumberEntitlementSearch/
Document Feedback
If you find any errors or omissions in this document, contact Juniper Networks at
[email protected].
There can be many reasons for invading a protected network. The following list
contains some common objectives:
Topology
ScreenOS provides detective and defensive tools for uncovering and thwarting the
efforts of attackers to achieve the above objectives when they attempt to target a
network protected by a Juniper Networks security device.
This chapter presents an overview of the main stages of an attack and the various
defense mechanisms that you can employ to thwart an attack at each stage:
1
Concepts & Examples ScreenOS Reference Guide
Stages of an Attack
Each attack typically progresses in two major stages. In the first stage, the attacker
gathers information, and in the second stage he or she launches the attack.
1. Perform reconnaissance.
a. Map the network and determine which hosts are active (IP address sweep).
b. Discern which ports are active (port scans) on the hosts discovered by the
IP address sweep.
Firewall policies at the inter-, intra-, and super-zone policy levels (super-zone
here means in global policies, where no security zones are referenced).
NOTE: Although the VLAN and MGT zones are function zones and not security zones, you
can set SCREEN options for them. The VLAN zone supports the same set of
SCREEN options as a Layer 3 security zone. (Layer 2 security zones support an
additional SYN flood option that Layer 3 zones do not: Drop Unknown MAC).
Because the following SCREEN options do not apply to the MGT zone, they are not
available for that zone: SYN flood protection, SYN-ACK-ACK proxy flood
protection, HTTP component blocking, and WinNuke attack protection.
2 Stages of an Attack
Chapter 1: Protecting a Network
To secure all connection attempts, Juniper Networks security devices use a dynamic
packet-filtering method known as stateful inspection. Using this method, the
security device notes various components in the IP packet and TCP segment
headers— source and destination IP addresses, source and destination port
numbers, and packet sequence numbers—and maintains the state of each TCP
session and pseudo UDP session traversing the firewall. (The device also modifies
session states based on changing elements such as dynamic port changes or
session termination.) When a responding TCP packet arrives, the device compares
the information reported in its header with the state of its associated session stored
in the inspection table. If they match, the responding packet is allowed to pass the
firewall. If the two do not match, the packet is dropped.
Reconnaissance deterrence
IP address sweep
Port scanning
Evasion techniques
Fragment reassembly
Antivirus scanning
Anti-spam filtering
Web filtering
Deep inspection
Stateful signatures
Protocol anomalies
SYN flood
ICMP flood
UDP flood
Ping of death
Teardrop attack
WinNuke
ICMP fragments
Bad IP options
Unknown protocols
IP packet fragments
SYN fragments
Exploit Monitoring
Although you typically want the security device to block exploits, there might be
times when you want to gather intelligence about them. You might want to learn
specifically about a particular exploit—to discover its intention, its sophistication,
and possibly (if the attacker is careless or unsophisticated) its source.
If you want to gather information about an exploit, you can let it occur, monitor it,
analyze it, perform forensics, and then respond according to a previously prepared
incident response plan. You can instruct the security device to notify you of an
exploit, but then, instead of taking action, you can have the device allow the exploit
to transpire. You can then study what occurred and try to understand the attacker’s
methods, strategies, and objectives. Increased understanding of the threat to the
network can then allow you to better fortify your defenses. Although a smart
attacker can conceal his or her location and identity, you might be able to gather
enough information to discover where the attack originated. You also might be able
to estimate the attacker’s capabilities. Gathering and analyzing this kind of
information allows you to determine your response.
WebUI
Screening > Screen (Zone: Untrust): Enter the following, then click Apply:
CLI
set zone untrust screen alarm-without-drop
set zone untrust screen ip-spoofing
save
Exploit Monitoring 5
Concepts & Examples ScreenOS Reference Guide
If this option is set, the device does not generate alarms and pass the packets.
Instead, it drops or forwards the packet based on the inspection results.
6 Exploit Monitoring
Chapter 2
Reconnaissance Deterrence
Attackers can better plan their attack when they first know the layout of the
targeted network (which IP addresses have active hosts), the possible entry points
(which port numbers are active on the active hosts), and the constitution of their
victims (which operating system the active hosts are running). To gain this
information, attackers must perform reconnaissance. Juniper Networks provides
several SCREEN options to deter attackers’ reconnaissance efforts and thereby
hinder them from obtaining valuable information about the protected network and
network resources.
7
Concepts & Examples ScreenOS Reference Guide
IP Address Sweep
An address sweep occurs when one source IP address sends 10 ICMP packets to
different hosts within a defined interval (5000 microseconds is the default). The
purpose of this scheme is to send ICMP packets—typically echo requests—to
various hosts in the hopes that at least one replies, thus uncovering an address to
target. The security device internally logs the number of ICMP packets to different
addresses from one remote source. Using the default settings, if a remote host
sends ICMP traffic to 10 addresses in 0.005 seconds (5000 microseconds), the
security device flags this as an address sweep attack, and rejects all further ICMP
echo requests from that host for the remainder of the specified threshold time
period. The device detects and drops the tenth packet that meets the address sweep
attack criterion. This is illustrated in Figure 2.
In Figure 2, the security device makes an entry in its session table for the first 10
ICMP packets from 2.2.2.5 and does a route lookup and policy lookup for these. If
no policy permits these packets, the device tags these as invalid and removes them
from the session table in the next “garbage sweep,” which occurs every two
seconds. After the tenth packet, the device rejects all further ICMP traffic from
2.2.2.5.
Source: 2.2.2.5
(Most likely a spoofed
address or zombie agent) ethernet0/3 ethernet0/2
1.1.1.1/24 1.2.2.1/24
Untrust DMZ
ICMP Packets
Src addr Dst addr
11 ICMP packets 2.2.2.5 1.2.2.5
within 0.005 seconds 2.2.2.5 1.2.2.160
2.2.2.5 1.2.2.84
Note: After 10 ICMP packets are 2.2.2.5 1.2.2.211
received, the security device logs 2.2.2.5 1.2.2.10
this as an IP address sweep and 2.2.2.5 1.2.2.20
rejects the eleventh packet. 2.2.2.5 1.2.2.21
2.2.2.5 1.2.2.240
2.2.2.5 1.2.2.17
2.2.2.5 1.2.2.123
Rejected 2.2.2.5 1.2.2.6
Consider enabling this SCREEN option for a security zone only if there is a policy
permitting ICMP traffic from that zone. Otherwise, you do not need to enable it. The
lack of such a policy denies all ICMP traffic from that zone, precluding an attacker
from successfully performing an IP address sweep anyway.
WebUI
Screening > Screen (Zone: select a zone name): Enter the following, then click
Apply:
8 IP Address Sweep
Chapter 2: Reconnaissance Deterrence
NOTE: The value unit is microseconds. The default value is 5000 microseconds.
CLI
set zone zone screen ip-sweep threshold number
set zone zone screen ip-sweep
Port Scanning
A port scan occurs when one source IP address sends IP packets containing TCP
SYN segments to 10 different ports at the same destination IP address within a
defined interval (5000 microseconds is the default). The purpose of this scheme is
to scan the available services in the hopes that at least one port will respond, thus
identifying a service to target. The security device internally logs the number of
different ports scanned from one remote source. Using the default settings, if a
remote host scans 10 ports in 0.005 seconds (5000 microseconds), the device flags
this as a port scan attack and rejects all further packets from the remote source for
the remainder of the specified timeout period. The device detects and drops the
tenth packet that meets the port scan attack criterion. This is illustrated in Figure 3.
In Figure 3, the security device makes an entry in its session table for the first 10
connection attempts from 2.2.2.5 to 1.2.2.5 and does a route lookup and policy
lookup for these. If no policy permits these connection attempts, the device tags
these as invalid and removes them from the session table in the next “garbage
sweep,” which occurs every two seconds. After the tenth attempt, the device rejects
all further connection attempts.
Source: 2.2.2.5
(Most likely a spoofed
address or zombie agent) ethernet3 ethernet2
1.1.1.1/24 1.2.2.1/24
Untrust DMZ
destination: 1.2.2.5
Port Scanning 9
Concepts & Examples ScreenOS Reference Guide
WebUI
Screening > Screen (Zone: select a zone name): Enter the following, then click
Apply:
NOTE: The value unit is microseconds. The default value is 5000 microseconds.
CLI
set zone zone screen port-scan threshold number
set zone zone screen port-scan
Source Address
Destination Address
Options
Payload
RFC 791 states that these options are “unnecessary for the most common
communications” and, in reality, they rarely appear in IP packet headers. When
they do appear, they are frequently being put to some illegitimate use. Table 1 lists
the IP options and their accompanying attributes.
1.The class of options identified as “0” was designed to provide extra packet or network control.
2.The class of options identified as “2” was designed diagnostics, debugging, and measurement.
3.The timestamp uses the number of milliseconds since midnight Universal Time (UT). UT is also known as Greenwich Mean
Time (GMT), which is the basis for the international time standard.
The following SCREEN options detect IP options that an attacker can use for
reconnaissance or for some unknown but suspect purpose:
Record Route: The security device detects packets where the IP option is 7
(Record Route) and records the event in the SCREEN counters list for the
ingress interface.
Timestamp: The security device detects packets where the IP option list
includes option 4 (Internet Timestamp) and records the event in the SCREEN
counters list for the ingress interface.
Security: The security device detects packets where the IP option is 2 (security)
and records the event in the SCREEN counters list for the ingress interface.
Stream ID: The security device detects packets where the IP option is 8 (Stream
ID) and records the event in the SCREEN counters list for the ingress interface.
To detect packets with the above IP options set, do either of the following, where
the specified security zone is the one from which the packets originate:
WebUI
Screening > Screen (Zone: select a zone name): Enter the following, then click
Apply:
CLI
set zone zone screen ip-record-route
set zone zone screen ip-timestamp-opt
set zone zone screen ip-security-opt
set zone zone screen ip-stream-opt
TCP Header 16-bit Source Port Number 16-bit Destination Port Number
An attacker can send a segment with both flags set to see what kind of system reply
is returned and thereby determine what kind of OS is on the receiving end. The
attacker can then use any known system vulnerabilities for further attacks.
When you enable this SCREEN option, the security device checks if the SYN and
FIN flags are set in TCP headers. If it discovers such a header, it drops the packet.
To block packets with both the SYN and FIN flags set, do either of the following,
where the specified security zone is the one from which the packets originate:
WebUI
Screening > Screen (Zone: select a zone name): Select SYN and FIN Bits Set
Protection, then click Apply.
CLI
set zone zone screen syn-fin
NOTE: Vendors have interpreted RFC 793, Transmission Control Protocol, variously when
designing their TCP/IP implementations. When a TCP segment arrives with the
FIN flag set but not the ACK flag, some implementations send RST segments.
Some drop the packet without sending an RST.
TCP Header 16-bit Source Port Number 16-bit Destination Port Number
When you enable this SCREEN option, the security device checks if the FIN flag is
set but not the ACK flag in TCP headers. If it discovers a packet with such a header,
it drops the packet.
To block packets with the FIN flag set but not the ACK flag, do either of the
following, where the specified security zone is the one from which the packets
originate:
WebUI
Screening > Screen (Zone: select a zone name): Select FIN Bit with No ACK Bit
in Flags Protection, then click Apply.
CLI
set zone zone screen fin-no-ack
When you enable the security device to detect TCP segment headers with no flags
set, the device drops all TCP packets with a missing or malformed flags field.
To block packets with no flags set, do either of the following, where the specified
security zone is the one from which the packets originate:
WebUI
Screening > Screen (Zone: select a zone name): Select TCP Packet without
Flag Protection, then click Apply.
CLI
set zone zone screen tcp-no-flag
Evasion Techniques
Whether gathering information or launching an attack, it is generally expected that
the attacker avoids detection. Although some IP address and port scans are blatant
and easily detectable, more wily attackers use a variety of means to conceal their
activity. Such techniques as using FIN scans instead of SYN scans—which attackers
know most firewalls and intrusion detection programs detect—indicate an
evolution of reconnaissance and exploit techniques to evade detection and
successfully accomplish their tasks.
FIN Scan
A FIN scan sends TCP segments with the FIN flag set in an attempt to provoke a
response (a TCP segment with the RST flag set) and thereby discover an active host
or an active port on a host. An attacker might use this approach rather than perform
an address sweep with ICMP echo requests or an address scan with SYN segments
because he or she knows that many firewalls typically guard against the latter two
approaches—but not necessarily against FIN segments. The use of TCP segments
with the FIN flag set might evade detection and thereby help the attacker succeed in
his or her reconnaissance efforts.
Enable the SCREEN option that specifically blocks TCP segments with the FIN
flag set but not the ACK flag, which is anomalous for a TCP segment:
WebUI: Screening > Screen: Select the zone to which you want to apply
this SCREEN option from the Zone drop-down list, then select FIN Bit With
No ACK Bit in Flags Protection.
CLI: Enter set zone name screen fin-no-ack, in which name is the name of
the zone to which you want to apply this SCREEN option.
Change the packet processing behavior to reject all non-SYN packets that do
not belong to an existing session by entering the CLI command: set flow
tcp-syn-check. (For more information about SYN flag checking, see “Non-SYN
Flags” on page 15.)
NOTE: Changing the packet flow to check that the SYN flag is set for packets that do not
belong to existing sessions also thwarts other types of non-SYN scans, such as a
null scan (when no TCP flags are set).
Non-SYN Flags
By default, the security device checks for SYN flags in the first packet of a session
and rejects any TCP segments with non-SYN flags attempting to initiate a session.
You can leave this packet flow as is or change it to so that the device does not
enforce SYN flag checking before creating a session. Figure 8 on page 16 illustrates
packet flow sequences when SYN flag checking is enabled and when it is disabled.
Evasion Techniques 15
Concepts & Examples ScreenOS Reference Guide
NOTE: By default, checking for the TCP SYN flag in the initial packet of a session is
enabled when you install a Juniper Networks security device running ScreenOS
5.1.0 or higher. If you upgrade from a release prior to ScreenOS 5.1.0, SYN
checking remains disabled by default—unless you have previously changed the
default behavior.
These packet flows are the same whether the ingress interface is operating at
Layer 3 (Route or NAT mode) or at Layer 2 (Transparent mode).
In In
session session
Session Session Session Session FORWARD
Lookup Update FORWARD Lookup Update
Not in Not in
session session
Deny No Deny
When the security device with SYN flag checking enabled receives a non-SYN TCP
segment that does not belong to an existing session, it drops the packet and sends
the source host to a TCP RST—unless the code bit of the initial non-SYN TCP packet
is also RST. In that case, the security device simply drops the packet.
You can enable and disable SYN checking with the following CLI commands:
Not checking for the SYN flag in the first packets offers the following advantages:
16 Evasion Techniques
Chapter 2: Reconnaissance Deterrence
NOTE: A solution to this scenario is to install the security device with SYN checking
disabled initially. Then, after a few hours—when established sessions are running
through the device—enable SYN checking.
The core section in a policy contains the following main components: source and
destination zones, source and destination addresses, one or more services, and an
action.
However, note that the above advantages exact the following security sacrifices:
By enabling SYN flag checking, the security device drops TCP segments without
a SYN flag if they do not belong to an existing session. It does not return a TCP
RST segment. Consequently, the scanner gets no replies regardless of the policy
set or whether the port is open or closed on the targeted host.
Session Table Floods: If SYN checking is disabled, an attacker can bypass the
ScreenOS SYN flood protection feature by flooding a protected network with a
barrage of TCP segments that have non-SYN flags set. Although the targeted
hosts drop the packets—and possibly send TCP RST segments in reply—such a
flood can fill up the session table of the security device. When the session table
is full, the device cannot process new sessions for legitimate traffic.
By enabling SYN checking and SYN flood protection, you can thwart this kind
of attack. Checking that the SYN flag is set on the initial packet in a session
forces all new sessions to begin with a TCP segment that has the SYN flag set.
SYN flood protection then limits the number of TCP SYN segments per second
so that the session table does not become overwhelmed.
Evasion Techniques 17
Concepts & Examples ScreenOS Reference Guide
NOTE: For information about session table floods, see “Session Table Flood” on page 28.
For information about SYN floods, see “SYN Flood” on page 38.
IP Spoofing
One method of attempting to gain access to a restricted area of the network is to
insert a bogus source address in the packet header to make the packet appear to
come from a trusted source. This technique is called IP spoofing. ScreenOS has two
IP spoofing detection methods, both of which accomplish the same task:
determining that the packet came from a location other than that indicated in its
header. The method that a Juniper Networks security device uses depends on
whether it is operating at Layer 3 or Layer 2 in the OSI Model.
Layer 3—When interfaces on the security device are operating in Route or NAT
mode, the mechanism to detect IP spoofing relies on route table entries. If, for
example, a packet with source IP address 10.1.1.6 arrives at ethernet3, but the
security device has a route to 10.1.1.0/24 through ethernet1, IP spoof checking
notes that this address arrived at an invalid interface—as defined in the route
table, a valid packet from 10.1.1.6 can only arrive via ethernet1, not ethernet3.
Therefore, the device concludes that the packet has a spoofed source IP address
and discards it.
ethernet3
1.1.1.1/24
X Route Table
3. When the route table lookup reveals ID IP-Prefix Interface Gateway P
that 10.1.1.6 is not a valid source IP
address for a packet arriving on 1 10.1.10/24 eth 1 0.0.0.0 C
ethernet3, the device rejects the
packet. ethernet1
Trust Zone
10.1.1.1/24
Subnet: 10.1.1.0/24
18 Evasion Techniques
Chapter 2: Reconnaissance Deterrence
If the source IP address in a packet does not appear in the route table, by
default the security device allows that packet to pass (assuming that a policy
exists permitting it). Using the following CLI command—where the specified
security zone is the one from which the packets originate—you can instruct the
security device to drop any packet whose source IP address is not in the route
table:
ethernet3
0.0.0.0/0
V1-DMZ Zone
Be careful when defining addresses for the subnet that straddles multiple
security zones. In Figure 10, 1.2.2.0/24 belongs to both the V1-Untrust and
V1-DMZ zones. If you configure the security device as follows, the device will
block traffic from the V1-DMZ zone that you want it to permit:
You have a policy permitting traffic from any address in the V1-DMZ zone
to any address in the V1-Untrust zone (set policy from v1-dmz to
v1-untrust any any any permit).
Because addresses in the V1-DMZ zone are also in the 1.2.2.0/24 subnet, when
traffic from these addresses reaches ethernet2, the IP spoof check refers to the
address book and finds 1.2.2.0/24 in the V1-Untrust zone. Consequently, the
security device blocks the traffic.
Evasion Techniques 19
Concepts & Examples ScreenOS Reference Guide
If you enable the IP spoof protection SCREEN option but do not enter the above
three routes, the device drops all traffic from the addresses in the “Destination”
column and enters alarms in the event log. For example, if a packet with the source
address 10.1.2.5 arrives at ethernet1 and there is no route to the 10.1.2.0/24 subnet
via ethernet1, the device determines that packet has arrived at an invalid interface
and drops it.
All the security zones in this example are in the trust-vr routing domain.
ethernet2
1.2.2.1/24
1.2.3.0/24
DMZ
Zone
Router
1.2.2.250
20 Evasion Techniques
Chapter 2: Reconnaissance Deterrence
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Evasion Techniques 21
Concepts & Examples ScreenOS Reference Guide
3. IP Spoof Protection
Screening > Screen (Zone: Trust): Select IP Address Spoof Protection, then
click Apply.
Screening > Screen (Zone: DMZ): Select IP Address Spoof Protection, then
click Apply.
Screening > Screen (Zone: Untrust): Select IP Address Spoof Protection, then
click Apply.
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet2 zone dmz
set interface ethernet2 ip 1.2.2.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Routes
set vrouter trust-vr route 10.1.2.0/24 interface ethernet1 gateway 10.1.1.250
set vrouter trust-vr route 1.2.3.0/24 interface ethernet2 gateway 1.2.2.250
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
3. IP Spoof Protection
set zone trust screen ip-spoofing
set zone dmz screen ip-spoofing
set zone untrust screen ip-spoofing
save
servA: 1.2.2.10
servB: 1.2.2.20
servC: 1.2.2.30
If an attacker in the V1-Untrust zone attempts to spoof the source IP address using
any of the three addresses in the V1-DMZ zone, the security device checks the
address against those in the address books. When it finds that the source IP address
on a packet coming from the V1-Untrust zone belongs to a defined address in the
V1-DMZ zone, the device rejects the packet.
22 Evasion Techniques
Chapter 2: Reconnaissance Deterrence
WebUI
1. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
CLI
1. Addresses
set address v1-dmz servA 1.2.2.10/32
set address v1-dmz servB 1.2.2.20/32
set address v1-dmz servC 1.2.2.30/32
2. IP Spoof Protection
set zone v1-untrust screen ip-spoofing
save
Evasion Techniques 23
Concepts & Examples ScreenOS Reference Guide
changing router addresses to alter the path and sending several packets along
different paths, you can note changes that either improve or lessen the success rate.
Through analysis and the process of elimination, you might be able to deduce
where the trouble lies.
1 3
A B
Using IP source routing, A sends traffic
through routers 2 and 3. Transmission from A
2 4 to B remains successful only 50% of the time.
1 3
A B Using IP source routing, A sends traffic
through routers 1 and 4. Transmission
from A to B is successful 100% of the time.
2 4 Therefore, we can conclude that the
trouble lies in router #3.
Although the uses of IP source route options were originally benign, attackers have
learned to put them to more devious uses. They can use IP source route options to
hide their true address and access restricted areas of a network by specifying a
different path. For an example showing how an attacker can put both deceptions to
use, consider the following scenario as illustrated in Figure 13.
2.2.2.0/24 10.1.1.0/24
2 4
24 Evasion Techniques
Chapter 2: Reconnaissance Deterrence
The Juniper Networks security device only allows traffic 2.2.2.0/24 if it comes
through ethernet3, an interface bound to the Untrust zone. Routers 3 and 4 enforce
access controls but routers 1 and 2 do not. Furthermore, router 2 does not check for
IP spoofing. The attacker spoofs the source address, and by using the loose source
route option, directs the packet through router 2 to the 2.2.2.0/24 network and
from there out router 1. Router 1 forwards it to router 3, which forwards it to the
security device. Because the packet came from the 2.2.2.0/24 subnet and has a
source address from that subnet, it seems to be valid. However, one remnant of the
earlier chicanery remains: the loose source route option. In this example, you have
enabled the “Deny IP Source Route Option” SCREEN option for the Untrust zone.
When the packet arrives at ethernet3, the device rejects it.
You can enable the security device to either block any packets with loose or strict
source route options set or detect such packets and then record the event in the
counters list for the ingress interface. The SCREEN options are as follows:
Deny IP Source Route Option: Enable this option to block all IP traffic that
employs the loose or strict source route option. Source route options can allow
an attacker to enter a network with a false IP address.
Detect IP Loose Source Route Option: The security device detects packets
where the IP option is 3 (Loose Source Routing) and records the event in the
SCREEN counters list for the ingress interface. This option specifies a partial
route list for a packet to take on its journey from source to destination. The
packet must proceed in the order of addresses specified, but it is allowed to
pass through other routers in between those specified.
Detect IP Strict Source Route Option: The security device detects packets
where the IP option is 9 (Strict Source Routing) and records the event in the
SCREEN counters list for the ingress interface. This option specifies the
complete route list for a packet to take on its journey from source to
destination. The last address in the list replaces the address in the destination
field.
(For more information about all the IP options, see “Network Reconnaissance
Using IP Options” on page 10.)
To block packets with either a loose or strict source route option set, do either of the
following, where the specified security zone is the one from which the packets
originate:
WebUI
Screening > Screen (Zone: select a zone name): Select IP Source Route Option
Filter, then click Apply.
CLI
set zone zone screen ip-filter-src
Evasion Techniques 25
Concepts & Examples ScreenOS Reference Guide
To detect and record (but not block) packets with a loose or strict source route
option set, do either of the following, where the specified security zone is the one
from which the packets originate:
WebUI
Screening > Screen (Zone: select a zone name): Enter the following, then click
Apply:
CLI
set zone zone screen ip-loose-src-route
set zone zone screen ip-strict-src-route
26 Evasion Techniques
Chapter 3
Denial of Service Attack Defenses
The intent of a denial of service (DoS) attack is to overwhelm the targeted victim
with a tremendous amount of bogus traffic so that the victim becomes so
preoccupied processing the bogus traffic that it is unable to process legitimate
traffic. The target can be the security device, the network resources to which the
device controls access, or the specific hardware platform or operating system (OS)
of an individual host.
The security device can defend itself and the resources it protects from DoS and
DDoS attacks. The following sections describe the various defense options available:
“WinNuke” on page 55
27
Concepts & Examples ScreenOS Reference Guide
Aggressive Aging
A webserver is infected with the Nimda After the number of concurrent sessions
virus/worm hybrid, which causes the server from the infected server reaches the
to generate excessive amounts of traffic. DMZ … maximum limit, the security device
begins blocking all further connection
Zone Infected attempts from that server.
Server
Nonexistent host
Src IP: 6.6.6.6 Zombie
agents
Untrust Zone Untrust
Zone
DMZ DMZ
Webserver Webserver
When the number of concurrent sessions from 6.6.6.6 When the number of concurrent sessions to the webserver
surpasses the maximum limit, the security device begins surpasses the maximum limit, the security device begins
blocking further connection attempts from that IP address. blocking further connection attempts to that IP address.
The default maximum for both source- and destination-based session limits is 128
concurrent sessions, a value that might need adjustment to suit the needs of your
network environment and the platform.
WebUI
Screening > Screen (Zone: DMZ): Enter the following, then click OK:
Screening > Screen (Zone: Trust): Enter the following, then click OK:
CLI
set zone dmz screen limit-session source-ip-based 1
set zone dmz screen limit-session source-ip-based
set zone trust screen limit-session source-ip-based 80
set zone trust screen limit-session source-ip-based
save
WebUI
Screening > Screen (Zone: Untrust): Enter the following, then click OK:
CLI
set zone untrust screen limit-session destination-ip-based 4000
set zone untrust screen limit-session destination-ip-based
save
Aggressive Aging
By default, an initial TCP session 3-way handshake takes 20 seconds to time out
(that is, to expire because of inactivity). After a TCP session has been established,
the timeout value changes to 30 minutes. For HTTP and UDP sessions, the session
timeouts are 5 minutes and 1 minute, respectively. The session timeout counter
begins when a session starts and is refreshed every 10 seconds if the session is
active. If a session becomes idle for more than 10 seconds, the timeout counter
begins to decrement.
When the number of sessions dips below a specified low-watermark threshold, the
timeout process returns to normal. During the period when the aggressive aging out
process is in effect, a security device ages out the oldest sessions first, using the
aging out rate that you specify. These aged-out sessions are tagged as invalid and
are removed in the next “garbage sweep,” which occurs every 2 seconds.
The aggressive ageout option shortens default session timeouts by the amount you
enter. When you set and enable the aggressive ageout option, the normal session
timeout value displayed in the configuration remains unchanged—1800 seconds for
TCP, 300 seconds for HTTP, and 60 seconds for UDP sessions. However, when the
aggressive ageout period is in effect, these sessions time out earlier—by the
amount you specify for early ageout—instead of counting down all the way to zero.
The aggressive ageout value can be between 2 and 10 units, where each unit
represents a 10-second interval (that is, the aggressive ageout setting can be
between 20 and 100 seconds). The default setting is 2 units, or 20 seconds. If you
define the aggressive ageout setting at 100 seconds, for example, you shorten the
TCP and HTTP session timeouts as follows:
TCP: The session timeout value shortens from 1800 seconds (30 minutes) to
1700 seconds (28:20 minutes) during the time when the aggressive aging
process is in effect. During that period, the security device automatically
deletes all TCP sessions whose timeout value has passed 1700 seconds,
beginning with the oldest sessions first.
HTTP: The session timeout value shortens from 300 seconds (5 minutes) to 200
seconds (3:20 minutes) during the time when the aggressive aging process is in
effect. During that period, the security device automatically deletes all HTTP
sessions whose timeout value has passed 200 seconds, beginning with the
oldest sessions first.
UDP: Because the default UDP session timeout is 60 seconds, defining an early
ageout setting at 100 seconds causes all UDP sessions to ageout and be marked
for deletion in the next garbage sweep.
100%
When the number of sessions exceeds 80% capacity,
the aggressive aging mechanism commences.
80% High-Watermark
Aggressive Aging
(- 40-sec age out)
70% Low-Watermark
Sessions aggressively age out until their
number drops below 70%. At that point, the
Sessions aggressive aging mechanism ceases.
0%
WebUI
NOTE: You must use the CLI to configure the aggressive age-out settings.
CLI
set flow aging low-watermark 70
set flow aging high-watermark 80
set flow aging early-ageout 4
save
NOTE: The blacklist protection feature is not available for the following traffic conditions:
IPV6 traffic
When a packet reaches the device, the packet processing hardware checks the
packet against the list of blacklist entries. If a match occurs, the device drops that
packet. If the packet does not match any blacklist entry, the device passes the
packet to the next stage that prioritizes the packet. For each entry in the blacklist,
the security device maintains a drop counter to record the number of packets
dropped against that entry.
The blacklist protection mechanism applies to the entire security device and is not
limited to specific virtual systems that you may have created on the security device.
In security devices that support virtual systems but do not support blacklist
creation, CPU protection features such as rate limiting apply.
Creating a Blacklist
To implement blacklisting of DoS attack traffic, you create a blacklist. The security
device CPU screens the traffic that reaches it and determines if a flow matches a
DoS attack pattern. If a packet matches the blacklist entry, the device drops the
packet.
You can set the timeout value for each of the blacklist entries. To permanently block
specific traffic that has been identified as DoS attack traffic, set the timeout value
for that blacklist entry to 0.
Field Description
Source IP Address The source IP address from which the DoS attack traffic originated
Destination IP Address The destination IP address.
Source Port The source port in a TCP or UDP session. Setting this to 0 matches all
ports
Destination Port The destination port in a TCP or UDP session. Setting this to 0 matches
all ports.
Protocol Set this to 0 to match any protocol. The source port and destination port
are valid only when you have set the protocol as UDP or TCP
Source IP Address Range is 0–32. Setting this to 0 matches all source IP addresses.
Mask
Destination IP Mask Range is 0–32. Setting this to 0 matches all destination IP addresses.
Blacklist ID The ID of the blacklists. Range is 0–31.
Timeout The time out for the blacklist entry in the range 0 to 600 minutes. If you
set the timeout for a blacklist entry to 0, the security device never times
out that entry. The security device saves only the permanent entries in
the blacklist configuration.
Example
In this example, you create a blacklist entry that times out after 90 minutes.
WebUI
Configuration > CPU Protection > Black List > New: Enter the following, then click
OK:
ID: 1
Source IP/Netmask: 1.1.1.0/24
Source Port: 5
Destination IP/Netmask : 2.2.2.0/24
Destination Port: 7
Protocol: 17
Timeout: 90
CLI
set cpu-protection blacklist id 1 1.1.1.0/24 2.2.2.0/24 protocol 17 src-port 5
dst-port 7 timeout 90
save
NOTE: You cannot create a blacklist entry with the source IP address mask, the
destination IP address mask, and the protocol values set to 0.
.
Type Class Protocol
Critical 1 TELNET—device management
SSH—device management
HTTP/HTTPS—device management
BGP—routing protocol updates
OSPF—routing protocol updates
RIP—routing protocol updates
RIPNG—routing protocol updates
PIM—multicast routing protocol updates
NSRP—NSRP updates
IKE/VPN Monitor—tunnel setup and VPN Monitor packets
ARP—ARP responses, so that the device can move the session to
hardware
RADIUS—authentication protocol
LDAP—authentication protocol
SNMP/SNMP traps—SNMP updates
NSM—communication with the NetScreen-Security Manager application
TFTP—Trivial File Transfer Protocol
ICMP—Internet Control Message Protocol
Noncritical 2 Broadcast
3 Non-first packet
4 First packet
5 Other
WebUI
Configuration > CPU Protection > General Settings: Enter the CPU Protection
Threshold, then click Apply:
CLI
set cpu-protection threshold number
save
The following table shows the traffic statistics of the get cpu-protection command
when the threshold is set to 70 percent.
4. The security device prompts the client (auth user) to log in.
5. The client ignores the login prompt and keeps repeating steps 1—4 until the
session table is full.
6. Because the session table is full, the security device must reject all further
connection requests.
SYN
Name: ?
Password: ?
SYN
SYN/ACK
ACK The session table is filling up.
Name: ?
Password: ?
.
.
.
SYN The session table is full.
To prevent such an attack, you can enable the SYN-ACK-ACK proxy protection
SCREEN option. After the number of connections from the same IP address reaches
the SYN-ACK-ACK proxy threshold, the security device rejects further connection
requests from that IP address. By default, the threshold is 512 connections from any
single IP address. You can change this threshold (to any number between 1 and
250,000) to better suit the requirements of your network environment.
NOTE: The alarm-without-drop option does not apply to this SCREEN option. For more
information about this option, see “Exploit Monitoring” on page 5.
WebUI
Screening > Screen (Zone: select a zone name): Enter the following, then click
Apply:
NOTE: The value unit is connections per source address. The default value is 512
connections from any single address.
CLI
set zone zone screen syn-ack-ack-proxy threshold number
set zone zone screen syn-ack-ack-proxy
SYN Flood
A SYN flood occurs when a host becomes so overwhelmed by SYN segments
initiating incomplete connection requests that it can no longer process legitimate
connection requests.
Two hosts establish a TCP connection with a triple exchange of packets known as a
three-way handshake: A sends a SYN segment to B; B responds with a SYN/ACK
segment; and A responds with an ACK segment. A SYN flood attack inundates a site
with SYN segments containing forged (spoofed) IP source addresses with
nonexistent or unreachable addresses. B responds with SYN/ACK segments to these
addresses and then waits for responding ACK segments. Because the SYN/ACK
segments are sent to nonexistent or unreachable IP addresses, they never elicit
responses and eventually time out.
SYN/ACK
5.5.5.10
SYN The memory buffer
in the victim begins
SYN/ACK filling up.
6.6.6.3
SYN
SYN/ACK
By flooding a host with incomplete TCP connections, the attacker eventually fills the
memory buffer of the victim. Once this buffer is full, the host can no longer process
new TCP connection requests. The flood might even damage the victim’s operating
system. Either way, the attack disables the victim and its normal operations.
8.8.8.8 SYN
SYN/ACK
The memory buffer in the
9.9.9.22 victim stops filling up.
— SYN Attack Threshold —
2.2.2.4
SYN
When the number of SYN
SYN/ACK segments from the same source
address or to the same
3.3.3.25 SYN destination address reaches a The proxied connection
specified threshold, the security queue in the security
SYN/ACK device begins intercepting the device begins filling up.
connection requests and proxying
. the SYN/ACK segments.
.
.
In Figure 22, the proxied connection queue has completely filled up, and the
security device is rejecting new incoming SYN segments. This action shields hosts
on the protected network from the bombardment of incomplete three-way
handshakes.
SYN
The security device intercepts the The memory buffer in the
SYN/ACK SYN segments and proxies the victim returns to normal.
SYN/ACK responses until the
proxied connection queue fills up.
SYN
The proxied connection
SYN/ACK queue in the security
device is full.
— Alarm Threshold —
The security device starts receiving new SYN packets when the proxy queue drops
below the maximum limit.
NOTE: The procedure of proxying incomplete SYN connections above a set threshold
pertains only to traffic permitted by existing policies. Any traffic for which a policy
does not exist is automatically dropped.
By default, the SYN Flood protection SCREEN option is enabled on the Untrust
zone. To enable the SYN Flood protection SCREEN option and define its parameters,
do either of the following, where the specified zone is that in which a SYN flood
might originate:
WebUI
Screening > Screen (Zone: select a zone name): Enter the following, then click
Apply:
Source Threshold: (enter the number of SYN packets per second from a
single IP address required for the security device to begin rejecting new
connection requests from that source)
Destination Threshold: (enter the number of SYN packets per second to a
single IP address required for the security device to begin rejecting new
connection requests to that destination)
Timeout Value: (enter the length of time in seconds that the security
device holds an incomplete TCP connection attempt in the proxied
connection queue)
Queue Size: (enter the number of proxied TCP connection requests held in
the proxied connection queue before the security device starts rejecting
new connection requests)
NOTE: For more details about each of these parameters, see the descriptions in the
following CLI section.
CLI
To enable SYN Flood protection:
You can set the following parameters for proxying uncompleted TCP connection
requests:
Attack Threshold: The number of SYN segments (that is, TCP segments with
the SYN flag set) to the same destination address and port number per second
required to activate the SYN proxying mechanism. Although you can set the
threshold at any number, you need to know the normal traffic patterns at your
site to set an appropriate threshold for it. For example, if it is an e-business site
that normally gets 2000 SYN segments per second, you might want to set the
threshold at 3000/second. If a smaller site normally gets 20 SYN
segments/second, you might consider setting the threshold at 40.
1. The firewall passes the first 2000 SYN segments per second that meet
policy requirements.
2. The firewall proxies the next 1000 SYN segments in the same second.
For each SYN segment to the same destination address and port number in
excess of the alarm threshold, the attack detection module generates a
message. At the end of the second, the logging module compresses all similar
messages into a single log entry that indicates how many SYN segments to the
same destination address and port number arrived after exceeding the alarm
threshold. If the attack persists beyond the first second, the event log enters an
alarm every second until the attack stops.
Source Threshold: This option allows you to specify the number of SYN
segments received per second from a single source IP address—regardless of
the destination IP address and port number—before the security device begins
dropping connection requests from that source.
Destination Threshold: This option allows you to specify the number of SYN
segments received per second for a single destination IP address before the
security device begins dropping connection requests to that destination. If a
protected host runs multiple services, you might want to set a threshold based
on destination IP address only—regardless of the destination port number.
When you set a SYN attack threshold and a destination threshold, you put both
the basic SYN flood protection mechanism and the destination-based SYN flood
tracking mechanism in effect.
Queue size: The number of proxied connection requests held in the proxied
connection queue before the security device starts rejecting new connection
requests. The longer the queue size, the longer the device needs to scan the
queue to match a valid ACK response to a proxied connection request. This can
slightly slow the initial connection establishment; however, because the time to
begin data transfer is normally far greater than any minor delays in initial
connection setup, users would not see a noticeable difference.
Drop Unknown MAC: When a security device detects a SYN attack, it proxies
all TCP connection requests. However, a device in Transparent mode cannot
proxy a TCP connection request if the destination MAC address is not in its MAC
learning table. By default, a device in Transparent mode that has detected a
SYN attack passes SYN packets containing unknown MAC addresses. You can
use this option to instruct the device to drop SYN packets containing unknown
destination MAC addresses instead of letting them pass.
NOTE: We recommend that you augment the SYN flood protection that the security
device provides with device-level SYN flood protection on each of the webservers.
In this example, the webservers are running UNIX, which also provides some SYN
flood defenses, such as adjusting the length of the connection request queue and
changing the timeout period for incomplete connection requests.
To configure the SYN flood protection parameters with appropriate values for your
network, you must first establish a baseline of typical traffic flows. For one week,
you run a sniffer on ethernet3—the interface bound to the Untrust zone—to
monitor the number of new TCP connection requests arriving every second for the
four webservers in the DMZ. Your analysis of the data accumulated from one week
of monitoring produces the following statistics:
You might want to continue running the sniffer at regular intervals to see if there
are traffic patterns based on the time of day, days of the week, the time of month,
or the season of the year. For example, in some organizations, traffic might
increase dramatically during a critical event. Significant changes probably warrant
adjusting the various thresholds.
Based on this information, you set the following SYN flood protection parameters
for the Untrust zone, as shown in Table 2.
1.Half-completed connection requests are incomplete three-way handshakes. A three-way handshake is the initial phase of a
TCP connection. It consists of a TCP segment with the SYN flag set, a response with the SYN and ACK flags set, and a response
to that with the ACK flag set.
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > Groups > (for Zone: DMZ) New:
Enter the following group name, move the following addresses, then click OK:
Select ws1 and use the << button to move the address from the Available
Members column to the Group Members column.
Select ws2 and use the << button to move the address from the Available
Members column to the Group Members column.
Select ws3 and use the << button to move the address from the Available
Members column to the Group Members column.
Select ws4 and use the << button to move the address from the Available
Members column to the Group Members column.
3. Policy
Policies > (From: Untrust, To: DMZ) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), web_servers
Service: HTTP
Action: Permit
4. Screen
Screening > Screen (Zone: Untrust): Enter the following, then click Apply:
NOTE: Because 20 seconds is the default setting, you do not have to set the timeout to 20
seconds unless you have previously set it to another value.
CLI
1. Interfaces
set interface ethernet2 zone dmz
set interface ethernet2 ip 1.2.2.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Addresses
set address dmz ws1 1.2.2.10/32
set address dmz ws2 1.2.2.20/32
set address dmz ws3 1.2.2.30/32
set address dmz ws4 1.2.2.40/32
set group address dmz web_servers add ws1
set group address dmz web_servers add ws2
set group address dmz web_servers add ws3
set group address dmz web_servers add ws4
3. Policy
set policy from untrust to dmz any web_servers HTTP permit
4. Screen
set zone untrust screen syn-flood attack-threshold 625
set zone untrust screen syn-flood alarm-threshold 250
set zone untrust screen syn-flood source-threshold 25
set zone untrust screen syn-flood timeout 20
set zone untrust screen syn-flood queue-size 1000
set zone untrust screen syn-flood
save
NOTE: Because 20 seconds is the default setting, you do not have to set the timeout to 20
seconds unless you have previously set it to another value.
SYN Cookie
SYN Cookie is a stateless SYN Proxy mechanism you can use in conjunction with
the defenses against a SYN Flood attack described in “SYN Flood” on page 38. Like
traditional SYN proxying, SYN Cookie is activated when the SYN Flood attack
threshold is exceeded, but because SYN Cookie is stateless, it does not set up a
session or do policy and route lookups upon receipt of a SYN segment, and
maintains no connection request queues. This dramatically reduces CPU and
memory usage and is the primary advantage of using SYN Cookie over the
traditional SYN proxying mechanism.
When SYN Cookie is enabled on the security device and becomes the
TCP-negotiating proxy for the destination server, it replies to each incoming SYN
segment with a SYN/ACK containing an encrypted cookie as its Initial Sequence
Number (ISN). The cookie is a MD5 hash of the original source address and port
number, destination address and port number, and ISN from the original SYN
packet. After sending the cookie, the device drops the original SYN packet and
deletes the calculated cookie from memory. If there is no response to the packet
containing the cookie, the attack is noted as an active SYN attack and is effectively
stopped.
If the initiating host responds with a TCP packet containing the cookie +1 in the
TCP ACK field, the device extracts the cookie, subtracts 1 from the value, and
recomputes the cookie to validate that it is a legitimate ACK. If it is legitimate, the
device starts the TCP proxy process by setting up a session and sending a SYN to
the server containing the source information from the original SYN. When the
device receives a SYN/ACK from the server, it sends ACKs to the sever and to the
initiation host. At this point the connection is established and the host and server
are able to communicate directly.
1 SYN
1. Session lookup -- No session match
2. SYN Cookie triggered
3. Calculate ISN
4. Send SYN/ACK back to host
2 SYN/ACK
Send ACK
3 ACK
1. Session lookup -- No session match
2. SYS Cookie validated
3. Restore MSS
4. First packet passed--routing,
policy lookup, session setup
5. Send SYN to the server
4 SYN
1. Accept connection
2. Send SYN/ACK
55 SYN/ACK
7 ACK 6 ACK
Connected
8 Data/ACK
Data/ACK
9
To enable SYN Cookie, set a SYN flood attack threshold (as described in “SYN
Flood” on page 38), and do one of the following:
WebUI
Configuration > Advanced > Flow: Enter the following, then click Apply:
CLI
set flow syn-proxy syn-cookie
ICMP Flood
An ICMP flood typically occurs when ICMP echo requests overload its victim with so
many requests that it expends all its resources responding until it can no longer
process valid network traffic. When enabling the ICMP flood protection feature, you
can set a threshold that once exceeded invokes the ICMP flood attack protection
feature. (The default threshold value is 1000 packets per second.) If the threshold is
exceeded, the security device ignores further ICMP echo requests for the remainder
of that second plus the next second as well.
NOTE: An ICMP flood can consist of any type of ICMP message. Therefore, a Juniper
Networks security device monitors all ICMP message types, not just echo requests.
The attacker sends ICMP echo requests The security device passes the echo
with spoofed source addresses. requests only if a policy permits them.
Echo Request
Echo Reply
.
.
.
— Maximum Limit of ICMP Echo Requests per Second —
To enable ICMP flood protection, do either of the following, where the specified
zone is that in which a flood might originate:
WebUI
Screening > Screen (Zone: select a zone name): Enter the following, then click
Apply:
NOTE: The value unit is ICMP packets per second. The default value is 1000 packets per
second.
CLI
set zone zone screen icmp-flood threshold number
set zone zone screen icmp-flood
UDP Flood
Similar to the ICMP flood, UDP flooding occurs when an attacker sends IP packets
containing UDP datagrams with the purpose of slowing down the victim to the
point that it can no longer handle valid connections. After enabling the UDP flood
protection feature, you can set a threshold that, once exceeded, invokes the UDP
flood attack protection feature. (The default threshold value is 1000 packets per
second.) If the number of UDP datagrams from one or more sources to a single
destination exceeds this threshold, the security device ignores further UDP
datagrams to that destination for the remainder of that second plus the next second
as well.
Protected LAN
UDP Datagram DNS Server
UDP datagrams The datagrams are IP: 1.2.2.5
inside IP packets targeting a DNS
from a variety of Port: 53 (UDP)
server at 1.2.2.5:53.
spoofed IP UDP Datagram
addresses
UDP Datagram
To enable UDP flood protection, do either of the following, where the specified zone
is that in which a flood might originate:
WebUI
Screening > Screen (Zone: select a zone name): Enter the following, then click
Apply:
NOTE: The value unit is UDP packets per second. The default value is 1000 packets per
second.
CLI
set zone zone screen udp-flood threshold number
set zone zone screen udp-flood
Land Attack
Combining a SYN attack with IP spoofing, a land attack occurs when an attacker
sends spoofed SYN packets containing the IP address of the victim as both the
destination and source IP address. The receiving system responds by sending the
SYN-ACK packet to itself, creating an empty connection that lasts until the idle
timeout value is reached. Flooding a system with such empty connections can
overwhelm the system, causing a denial of service.
The victim’s
Source Destination available resources
The empty
connections are
consuming the
Source Destination victim’s resources.
When you enable the SCREEN option to block land attacks, the security device
combines elements of the SYN flood defense and IP spoofing protection to detect
and block any attempts of this nature.
To enable protection against a land attack, do either of the following, where the
specified zone is that in which the attack originates:
WebUI
Screening > Screen (Zone: select a zone name): Select Land Attack Protection,
then click Apply.
CLI
set zone zone screen land
Ping of Death
The maximum allowable IP packet size is 65,535 bytes, including the packet
header, which is typically 20 bytes long. An ICMP echo request is an IP packet with
a pseudo header, which is 8 bytes long. Therefore, the maximum allowable size of
the data area of an ICMP echo request is 65,507 bytes (65,535 - 20 - 8 = 65,507).
However, many ping implementations allow the user to specify a packet size larger
than 65,507 bytes. A grossly oversized ICMP packet can trigger a range of adverse
system reactions such as denial of service (DoS), crashing, freezing, and rebooting.
When you enable the Ping of Death SCREEN option, the security device detects and
rejects such oversized and irregular packet sizes even when the attacker hides the
total packet size by purposefully fragmenting it.
NOTE: For information about IP specifications, refer to RFC 791, Internet Protocol.
For information about ICMP specifications, refer to RFC 792, Internet Control
Message Protocol.
The size of this packet is 65,538 bytes. It exceeds the size limit prescribed by RFC 791, Internet
Protocol, which is 65,535 bytes. As the packet is transmitted, it becomes broken into numerous
fragments. The reassembly process might cause the receiving system to crash.
WebUI
Screening > Screen (Zone: select a zone name): Select Ping of Death Attack
Protection, then click Apply.
CLI
set zone zone screen ping-death
Teardrop Attack
Teardrop attacks exploit the reassembly of fragmented IP packets. In the IP header,
one of the fields is the fragment offset field, which indicates the starting position, or
offset, of the data contained in a fragmented packet relative to the data of the
original unfragmented packet.
Header
Version Type of Service Total Packet Length (in Bytes)
Length
Identification x D M Fragment Offset
20
Time to Live (TTL) Protocol Header Checksum Bytes
Source Address
Destination Address
Payload
When the sum of the offset and size of one fragmented packet differ from that of
the next fragmented packet, the packets overlap, and the server attempting to
reassemble the packet can crash, especially if it is running an older operating
system that has this vulnerability.
After you enable the Teardrop Attack SCREEN option, whenever the device detects
this discrepancy in a fragmented packet, it drops it.
To enable protection against a Teardrop attack, do either of the following, where the
specified zone is that in which the attack originates:
WebUI
Screening > Screen (Zone: select a zone name): Select Teardrop Attack
Protection, then click Apply.
CLI
set zone zone screen tear-drop
WinNuke
WinNuke is a DoS attack targeting any computer on the Internet running Windows.
The attacker sends a TCP segment—usually to NetBIOS port 139 with the urgent
(URG) flag set—to a host with an established connection. This introduces a NetBIOS
fragment overlap, which causes many machines running Windows to crash. After
rebooting the attacked machine, the following message appears, indicating that an
attack has occurred:
Press CTRL+ALT+DEL to restart your computer. You will lose any unsaved
information in all applications.
Sequence Number
Acknowledgement Number
Header U A P R S F
Reserved R C S S Y I Window Size
Length
G K H T N N
TCP Checksum Urgent Pointer
If you enable the WinNuke attack defense SCREEN option, the security device scans
any incoming Microsoft NetBIOS session service (port 139) packets. If the device
observes that the URG flag is set in one of those packets, it unsets the URG flag,
clears the URG pointer, forwards the modified packet, and makes an entry in the
event log noting that it has blocked an attempted WinNuke attack.
WebUI
Screening > Screen (Zone: select a zone name): Select WinNuke Attack
Protection, then click Apply.
CLI
set zone zone screen winnuke
Juniper Networks provides broad protection and control of network activity through
ScreenOS features and the pairing of ScreenOS with Websense, SurfControl, and
Kaspersky Lab products.
This chapter describes how to configure the device to perform segment and packet
reassembly, monitor HTTP traffic for malicious URLs, and communicate with other
devices to perform antivirus (AV) scanning and Web filtering. This chapter contains
the following sections:
57
Concepts & Examples ScreenOS Reference Guide
Fragment Reassembly
Typically, a network-forwarding device such as a router or switch does not
reassemble the fragmented packets that it receives. Usually the destination host
reconstructs the fragmented packets when they all arrive. The main function of a
forwarding device is the efficient delivery of traffic. If the forwarding device also
needs to queue, reassemble, and refragment all packets, its efficiency is adversely
affected. However, passing fragmented packets through a firewall is insecure. An
attacker can intentionally break up packets to conceal traffic strings that the firewall
otherwise would detect and block.
ScreenOS allows you to enable fragment reassembly for individual zones. This
method allows the security device to expand its ability to detect and block malicious
URL strings. Fragment reassembly occurs on Application Layer Gateway
(ALG)-enabled traffic only if a device is configured for NAT.
A resourceful attacker, realizing that the string is known and might be guarded
against, can deliberately fragment the IP packets or TCP segments to make the
pattern unrecognizable during a packet-by-packet inspection. For example, if the
malicious URL string is 120.3.4.5/level/50/exec, IP fragmentation might break up
the string into the following sections:
Individually, the fragmented strings can pass undetected through the security
device, even if you have the string defined as 120.3.4.5/level/50/exec with a length
of 20 characters. The string in the first packet—“120.”— matches the first part of
the defined pattern, but it is shorter than the required length of 20 matching
characters. The strings in the second and third packets do not match the beginning
of the defined pattern, so they would also pass without being blocked.
58 Fragment Reassembly
Chapter 4: Content Monitoring and Filtering
If the device discovers a malicious URL, it drops the packet and enters the event
in the log.
If the device cannot complete the reassembly process, a time limit is imposed
to age out and discard fragments.
If the device determines that the URL is not malicious but the reassembled
packet is too big to forward, the device fragments that packet into multiple
packets and forwards them.
If the device determines that the URL is not malicious and does not need to
fragment it, it forwards the packet.
NOTE: The device can drop or forward the packets based on the reassembly process and
subsequent inspection. When using the malicious URL protection feature, you
cannot make the device notify you about malicious traffic while allowing the
traffic to pass. The alarm-without-drop option does not apply to this feature. For
more information about this option, see “Exploit Monitoring” on page 5.
For example, there might be a policy denying FTP-Put from the Untrust to the DMZ
zone:
If the security device finds STOR filename, the client has sent a request to store the
specified file on the server, and the device blocks the packet.
NOTE: For a deny policy, FTP-Put, FTP-Get, and FTP service behave the same way by
blocking all packets.
In a permit policy, FTP-Get, FTP-Put, and FTP are all different services. For example,
there might be a policy permitting FTP-Get from the Untrust to the DMZ zone.
Fragment Reassembly 59
Concepts & Examples ScreenOS Reference Guide
If the security device reads RETR filename, the FTP client has sent a request to
retrieve the specified file from the FTP server, and the device allows the packet to
pass.
If you have two policies, one denying FTP-Put from the Untrust to the DMZ zone
and another permitting FTP-Get from the Untrust to the DMZ zone, then the device
blocks the packet.
packet 1: ST
packet 2: OR filename
When the security device inspects each packet individually, it does not find the
string STOR filename, so would consequently allow both fragments to pass.
If the device discovers an FTP-Put request, it drops the packet and enters the
event in the log.
If the device cannot complete the reassembly process, a time limit is imposed
to age out and discard fragments.
If the device discovers an FTP-Get request but the reassembled packet is too big
to forward, the device fragments that packet into multiple packets and forwards
them.
If the device discovers an FTP-Get request and does not need to fragment it, the
device then forwards the packet.
Malicious URL 1
ID: Perl
Pattern: scripts/perl.exe
Length: 14
Malicious URL 2
60 Fragment Reassembly
Chapter 4: Content Monitoring and Filtering
ID: CMF
Pattern: cgi-bin/phf
Length: 11
Malicious URL 3
ID: DLL
Pattern: 210.1.1.5/msadcs.dll
Length: 18
The values for length indicate the number of characters in the pattern that must be
present in a URL—starting from the first character—for a positive match. Note that
for 1 and 3, not every character is required.
You then enable fragment reassembly for the detection of the URLs in fragmented
HTTP traffic arriving at an Untrust zone interface.
WebUI
Security > Screening > Mal-URL (Zone: Untrust): Enter the following, then
click OK:
ID: perl
Pattern: /scripts/perl.exe
Length: 14
Security > Screening > Mal-URL (Zone: Untrust): Enter the following, then
click OK:
ID: cmf
Pattern: cgi-bin/phf
Length: 11
Security > Screening > Mal-URL (Zone: Untrust): Enter the following, then
click OK:
ID: dll
Pattern: 210.1.1.5/msadcs.dll
Length: 18
Network > Zones > Edit (for Untrust): Select the TCP/IP Reassembly for ALG
check box, then click OK.
CLI
set zone untrust screen mal-url perl “get /scripts/perl.exe” 14
set zone untrust screen mal-url cmf “get /cgi-bin/phf” 11
set zone untrust screen mal-url dll “get /210.1.1.5/msadcs.dll” 18
set zone untrust reassembly-for-alg
save
Fragment Reassembly 61
Concepts & Examples ScreenOS Reference Guide
Antivirus Scanning
A virus is executable code that infects or attaches itself to other executable code in
order to reproduce itself. Some malicious viruses erase files or lock up systems,
while other viruses merely infect files and can overwhelm the target host or
network with bogus data.
Juniper Networks supports internal and external antivirus (AV) scanning on select
security devices. See the ScreenOS Release Notes for a list of security devices and the
supported AV scan engine.
You have the following two antivirus solutions for the ISG series of products:
Use this solution for lower speeds, such as in T-3 or fractional T-3 deployments.
For more details, see “External AV Scanning” on page 62.
Use this solution for higher speeds, such as in OC-3 deployments. In this
scenario, PBR on the ISG offloads specific traffic to a high-end security device
running the embedded AV scanner (internal AV scanner). For more details on
this configuration, see “Advanced PBR Example” on page 7-138. For more
details on the embedded AV scanner, see “Internal AV Scanning” on page 64.
External AV Scanning
External AV scanning occurs when the security device redirects traffic to an external
ICAP AV scan server. The ICAP client on the security device communicates with the
external ICAP scan server to provide the following features:
Multiple security devices (firewalls) share the same ICAP scan server
Figure 32 illustrates how external AV scanning works with the security device.
62 Antivirus Scanning
Chapter 4: Content Monitoring and Filtering
Remote FTP
Server ICAP Servers
PW R A LA R M TEM
P S TA T U S H A running
Symantec scan
FA N M O 1D M O 2D M O 3D F LA S H
ISG 2000
engine 5.0
ICAP client
2. The AV profile in the security device determines if the data should be sent for
antivirus scanning.
5. The ICAP server returns the scan results with the entire content to the ICAP
client.
Scanning Modes
After the traffic undergoes AV scanning, the ICAP server running Symantec Scan
Engine 5.0 provides one of the following results:
Scan only. Denies access to the infected file but does nothing to the file.
Scan and delete. Deletes all infected files, including files that are embedded in
archive files, without attempting to repair.
Scan and repair files. Attempts to repair infected files but does nothing to files
that cannot be repaired.
Scan and repair or delete. Attempts to repair infected files and deletes any
unrecoverable files from archive files.
Refer to your ICAP server documentation for more information about scanning
behavior and results.
Antivirus Scanning 63
Concepts & Examples ScreenOS Reference Guide
A configured ICAP server can be in either an enabled or a disabled state. The status
of an enabled ICAP server can be in-service or out-of-service. When an ICAP server is
configured as disabled, then the server is not used to serve new requests.
ICAP servers are monitored through a probing mechanism. For example, if the
probe interval is set to 30, then an enabled ICAP server is automatically probed
every 30 seconds to determine its status (in-service or out-of-service).
The server goes into an out-of-service state when three consecutive probes fail.
Internal AV Scanning
Internal AV scanning is performed when the scan engine in the security device
scans traffic for viruses. The internal or embedded scan engine is a
Juniper-Kaspersky scan engine.
NOTE: The internal AV scanner requires you to install an AV license on your security
device. An AV license is not required if you are using an external AV scanner.
For example, you can set up a profile that supports scanning of executable files
(.exe) but not documentation files (.doc or .pdf).
In each profile, you can configure different decompression levels for each
protocol (HTTP/SMTP/POP3/IMAP/FTP). Based on your network environment,
for example, you might want to specify the number of embedded zip files to
unpack for each protocol.
For more information about scanning IM traffic, see “AV Scanning of IM Traffic”
on page 65.
64 Antivirus Scanning
Chapter 4: Content Monitoring and Filtering
Phishing protection. The phishing protection feature lets you block emails that
try to entice users to fake (phishing) sites that steal sensitive data.
You can change the default security level of scanning by choosing one of the
following two options:
NOTE: You must use the CLI to modify the default security level of scanning.
AV Scanning of IM Traffic
An Instant Messaging (IM) network is composed of clients and servers, along with
the protocols needed to connect them.
IM Clients
Each IM client has three major components:
A buddy list or other roster of friends with whom you wish to communicate.
A separate window that shows the text chats in progress—Users type their
messages and view their correspondents’ responses in this window.
Additional features for video and audio chats and for file transfers between
users.
Antivirus Scanning 65
Concepts & Examples ScreenOS Reference Guide
All major IM clients are moving beyond simple text chats to more integrated
and sophisticated communications, including real-time voice and video calls.
MSN Messenger
IM Server
The IM server maintains the directory of user accounts, keeps track of who is
online, and, in most cases, routes messages among users. The IM server operates in
real time, sending messages back and forth between two users as they finish typing
each line of text. The servers also pass real-time information about the availability
of various users in the directory, such as when they come online and change their
status message.
Each IM server communicates with its clients over an assigned port number across
the Internet. But IM clients however, can login using other ports when the default
port is blocked by a deny policy. Typical port numbers include those shown in the
following table:
NOTE: AV scanning is not supported for AIM or ICQ traffic communicating in encrypted
format.
66 Antivirus Scanning
Chapter 4: Content Monitoring and Filtering
IM Protocols
The IM network employs a client-server model for authentication to the service and
for communication with other clients using the protocols shown in the following
table:
Best Effort: Uses the existing protocol knowledge to process the traffic
The buddy list also leads to social engineering. Social engineering occurs when
people obtain information from legitimate users of a computer
system—specifically, information that will allow them to gain unauthorized access
to a particular system.
The file transfer service is another security risk where instant messaging
applications can send Trojans and viruses.
IM Security Issues
Instant messaging (IM) services are vulnerable to attacks such as viruses, worms,
and Trojans via the following methods:
Buddy lists
Social engineering
Antivirus Scanning 67
Concepts & Examples ScreenOS Reference Guide
File transfers
Trojans and viruses can easily spread when files are sent from one user to
another via an IM session.
NOTE: In an AOL Instant Message (AIM) session, if a group chat message includes a virus,
the drop message is sent back to the client, after which the client is unable to send
any more messages.
68 Antivirus Scanning
Chapter 4: Content Monitoring and Filtering
File Transfer/File
If File Size Is... Sharing Result
<= AV max_content_size AV scanning occurs Virus found. File content is replaced by
virus notification message.
Scanning error (AV scan error permit is
disabled). File content is replaced by
scan-error notification message.
> AV max_content_size Skips AV scanning Drops the file and forwards drop-notification
(max_content_size drop is message to original message’s destination.
enabled)
> AV max_content_size Skips AV scanning Forwards file to its destination.
(max_content_size drop is
disabled)
NOTE: This release of ScreenOS does not support instant messaging P2P traffic through
the firewall.
AV Scanning Results
AV scanning may not occur for several reasons. When your device is configured for
external scanning, the device simply redirects the traffic to the external ICAP server.
Refer to your ICAP server documentation for information about AV scanning
behavior and results.
If your device is configured for internal AV scanning, the get av stat command
displays scanning failures. In addition to the following scan-code results, this
command generates an event log that contains more information about scanning
results.
AV scan engine returns one of the following scan-errors and the corresponding
configuration drop setting is enabled.
Corrupted file.
Antivirus Scanning 69
Concepts & Examples ScreenOS Reference Guide
Out of resource.
AV scan engine returns any of the above scan-errors and fail-mode permit is
disabled.
NOTE: If the file to be sent exceeds the max-content-size and the fail mode is drop, both
ends will receive the message of File transfer error.
NOTE: If the max-decompress-layer setting is set to drop the data packets on exceeding
the decompress layer setting, a replacement file is sent to the receiver. The MSN
Server however, does not send a replacement file or an error message about the
download failure.
See the ScreenOS Message Log Reference Guide for a list of error messages generated
from AV scanning.
Policy-Based AV Scanning
AV scanning profiles increase the flexibility and granularity of AV scans.
Profile-based scanning allows you to configure a profile to scan traffic and assign
the profile to a policy. Policy-based scanning allows you to:
70 Antivirus Scanning
Chapter 4: Content Monitoring and Filtering
Protocols See
File Transfer Protocol (FTP) “Scanning FTP Traffic” on page 72
HyperText Transfer Protocol (HTTP) “Scanning HTTP Traffic” on page 74
Internet Mail Access Protocol (IMAP) “Scanning IMAP and POP3 Traffic” on page 76
Post Office Protocol, version 3 (POP3) “Scanning IMAP and POP3 Traffic” on page 76
Simple Mail Transfer Protocol (SMTP) “Scanning SMTP Traffic” on page 77
Internet Content Adaptation Protocol (ICAP) “Redirecting Traffic to ICAP AV Scan Servers” on
page 79
4. Assign the AV profile to a firewall policy. (Only one AV profile can be linked to a
policy.)
Figure 33 shows how the AV profile works with the AV scanner (internal or
external).
Remote Local
FTP Server FTP Client
AV profile determines whether the request
3 should be sent for antivirus scanning.
If virus is found, message is
6 logged and email notification is sent
If the data is configured to be scanned, then
4 data is sent to the Scan engine for scanning. based on the AV profile setting.
NOTE: You need to assess the risk and determine the best trade-off between security and
performance.
Antivirus Scanning 71
Concepts & Examples ScreenOS Reference Guide
This section discusses how to configure the following application protocols for AV
scanning:
Each of the above applications can be configured for one or more of the following:
Command Description
decompress-layer Specifies how many layers of nested compressed files the internal AV
scanner can decompress before it executes the virus scan.
extension list Specifies the extension list name (string) to include or exclude defined
extensions.
scan-mode Specifies how the scan engine scans traffic for a specific protocol.
timeout Specifies the timeout value for an AV session for a specific protocol.
http skipmime Skips the specified MIME list from AV scanning.
Note: Disabling skipmime allows the security device to scan all kinds of
HTTP traffic regardless of MIME content types.
email-notify Notifies sender or recipient of detected virus or scanning errors for IMAP,
POP3, and SMTP traffic only.
Depending on the results of the scan and how you have configured the fail-mode
behavior, the security device takes one of the following actions:
72 Antivirus Scanning
Chapter 4: Content Monitoring and Filtering
Control Channel
Remote Local
FTP Server FTP Client
Internal AV Scanner
Data Channel
1. A local FTP client opens an FTP control channel to an FTP server and requests
the transfer of some data.
2. The FTP client and server negotiate a data channel over which the server sends
the requested data. The security device intercepts the data and passes it to its
internal AV scan engine, which scans it for viruses.
3. After completing the scan, the device follows one of two courses*:
• If there is no virus, it forwards the data to the client.
• If there is a virus, it replaces the data with a drop message in the data channel
and sends a message reporting the infection in the control channel.
* If the scanned data exceeds the maximum content setting, or, if the scan cannot be
successfully completed, the device follows a different course of action depending on the
fail-mode setting.
Antivirus Scanning 73
Concepts & Examples ScreenOS Reference Guide
Depending on the results of the scan and how you have configured the fail-mode
behavior, the security device takes one of the following actions:
Remote Local
Webserver HTTP Client
Internal AV Scanner
4. A webserver responds to an HTTP request. 1. An HTTP client sends an HTTP request to a webserver.
5. The security device intercepts the HTTP response and passes 2. The security device intercepts the request and passes the data to
the data to its internal AV scan engine, which scans it for viruses. the internal AV scanner, which scans it for viruses.
6. After completing the scan, the device follows one of two 3. After completing the scan, the device follows one of two courses*:
courses*:
• If there is no virus, it forwards the request to the webserver.
• If there is no virus, it forwards the response to the HTTP client.
• If there is a virus, it drops the request and sends an HTTP
• If there is a virus, it drops the response and sends an HTTP message reporting the infection to the client.
message reporting the infection to the client.
* If the scanned data exceeds the maximum content setting, or, if the scan cannot be
successfully completed, the security device follows a different course of action
depending on the fail-mode setting.
74 Antivirus Scanning
Chapter 4: Content Monitoring and Filtering
Application/x-director
Application/pdf
Image/
Video/
Audio/
Text/css
Text/html
To improve performance, Juniper Networks security devices do not scan the above
MIME content types. Because most HTTP entities are made up of the above content
types, HTTP scanning only applies to a small subset of HTTP entities, such as
application/zip and application/exe content types, which are most likely to contain
viruses.
To change HTTP scanning behavior so that the security device scans all HTTP traffic
regardless of MIME content types, enter the following command:
Antivirus Scanning 75
Concepts & Examples ScreenOS Reference Guide
or
76 Antivirus Scanning
Chapter 4: Content Monitoring and Filtering
DMZ Zone
Local
Mail Server
Internet
1. The IMAP or POP3 client downloads an email message from the local mail server.
2. The security device intercepts the email message and passes the data to the internal AV
scanner, which scans it for viruses.
3. After completing the scan, the security device follows one of two courses*:
• If there is no virus, it forwards the message to the client.
• If there is a virus, it sends a message reporting the infection to the client.
* If the scanned message exceeds the maximum content setting or, if, the scan cannot be
successfully completed, the security device follows a different course of action depending on
the fail-mode setting.
Antivirus Scanning 77
Concepts & Examples ScreenOS Reference Guide
or
exceeds the drop is unset
maximum email notification
concurrent is set
messages
NOTE: Because an SMTP client refers to the entity that sends email, a client could, in fact,
be another SMTP server.
78 Antivirus Scanning
Chapter 4: Content Monitoring and Filtering
DMZ Zone
Internet
4. A remote mail server forwards an email message via SMTP to the A. An SMTP client sends an email message to a local mail server.
local mail server.
B. The security device intercepts the email message and passes the
5. The security device intercepts the email message and passes the data to the internal AV scanner, which scans it for viruses.
data to the internal AV scanner, which scans it for viruses.
C. After completing the scan, the device follows one of two courses*:
6. After completing the scan, the device follows one of two courses*:
• If there is no virus, it forwards the message to the local server.
• If there is no virus, it forwards the message to the local server.
• If there is a virus, it sends a message reporting the infection to
• If there is a virus, it sends a message reporting the infection to the client.
the remote server.
* If the scanned message exceeds the maximum content setting, or, if the scan cannot be successfully completed, the security
device follows a different course of action depending on the fail-mode setting.
1. A remote mail server forwards an email message via SMTP to the local mail server.
2. The security device intercepts the email message and passes the data to the internal AV scanner, which scans it for viruses.
3.After completing the scan, the device follows one of two courses*:
•If there is no virus, it forwards the message to the local server.
•If there is a virus, it sends a message reporting the infection to the remote server.
To configure the security device to support external ICAP AV scanning, perform the
following steps:
1. Use the set icap command to configure the external ICAP scan server.
Command Description
timeout Specifies the timeout value for an AV session for a specific protocol
(HTTP or SMTP).
http skipmime Skips the specified files in the MIME list from AV scanning.
Note: Disabling the skipmime list allows the security device to scan all
kinds of HTTP traffic regardless of MIME content types.
email-notify Notifies sender or recipient of detected virus or scanning errors for
SMTP traffic only.
Antivirus Scanning 79
Concepts & Examples ScreenOS Reference Guide
WebUI
Objects > Antivirus > ICAP Server >New: Enter the following, then click
Apply:
CLI
set icap server icap_server1 host 1.1.1.1
save
Before you start updating the AV pattern files, make sure your device supports the
following:
Prerequisites Description
Valid AV license key av_v2_key
Access to the Internet Your device has a route to the internet
DNS and port settings Verify your DNS setting and port 80
AV signature service See “Subscribing to the AV Signature Service” on
page 80
If you are upgrading a current security device to use internal AV scanning, you
must register the device and purchase a subscription for AV signatures before
you can begin loading the AV pattern file. After completing the registration
process, you must wait up to four hours before initiating the AV pattern file
download.
NOTE: For more information about the AV signature service, see “Registration and
Activation of Subscription Services” on page 2-251.
80 Antivirus Scanning
Chapter 4: Content Monitoring and Filtering
http://update.juniper-updates.net/av/5gt/
Internet
2. After the security device downloads the server-initialization file, the device
checks that the pattern file is valid. The device then parses the file to obtain
information about it, including the file version, size, and location of the pattern
fileserver.
3. If the pattern file on the security device is out of date (or nonexistent because
this is the first time you are loading it), and, if the AV pattern-update service
subscription is still valid, the device automatically retrieves an updated pattern
file from the pattern fileserver.
Internet
4. The device saves the new pattern file to flash memory and RAM and, if there is
an existing file, overwrites it.
Antivirus Scanning 81
Concepts & Examples ScreenOS Reference Guide
Updates to the pattern file are added as new viruses propagate. You can configure
the security device to regularly update the pattern file automatically, or you can
update the file manually.
NOTE: Once your subscription expires, the update server no longer permits you to update
the AV pattern file.
WebUI
Security > Antivirus > Scan Manager: Enter the following, then click Apply:
CLI
set av scan-mgr pattern-update-url http://update.juniper-updates.net/av/5gt
interval 120
save
http://update.juniper-updates.net/av/5gt/
WebUI
Security > Antivirus > Scan Manager: Enter the following, then click Apply:
CLI
exec av scan-mgr pattern-update
The set command is not required because the URL is the default.
82 Antivirus Scanning
Chapter 4: Content Monitoring and Filtering
WebUI
Security > Proxy: Set the HTTP and SSL proxy addresses, then click Apply:
CLI
set pattern-update proxy http 10.0.0.5:8080
save
NOTE: You cannot configure an HTTPs proxy, because you cannot cache an HTTPs proxy.
The following sections explain the global settings for your AV scanner:
Use the get av all or get av scan-mgr to see the global antivirus settings on the
device.
AV Resource Allotment
A malicious user might generate a large amount of traffic all at once in an attempt
to consume all available resources and hinder the ability of the AV scanner to scan
other traffic. To prevent such activity from succeeding, the Juniper Networks
security device can impose a maximum percentage of AV resources that traffic from
a single source can consume at one time. The default maximum percentage is 70
percent. You can change this setting to any value between 1 and 100 percent,
where 100 percent does not impose any restriction on the amount of AV resources
that traffic from a single source can consume.
Antivirus Scanning 83
Concepts & Examples ScreenOS Reference Guide
WebUI
CLI
set av all resources number
unset av all resources
Fail-Mode Behavior
Fail-mode is the behavior that the security device applies when it cannot complete a
scan operation—either to permit the unexamined traffic or to block it. By default, if
a device cannot complete a scan, it blocks the traffic that a policy with antivirus
checking enabled permits. You can change the default behavior from block to
permit.
When the AV scan engine is scanning a file and runs out of memory (typically, when
decompressing files), the content is either dropped or passed based on the out of
resource (set av scan-mgr out-of-resource) setting, instead of the fail-mode setting.
WebUI
Security > Antivirus > Global: Select Fail Mode Traffic Permit to permit
unexamined traffic, or clear it to block unexamined traffic, then click Apply.
CLI
set av all fail-mode traffic permit
unset av all fail-mode traffic
The above unset av command returns the fail mode behavior to the default (block
unexamined traffic).
If the total number of messages or the size of the content received concurrently
exceeds the device limits, by default the scanner drops the content without
checking for viruses. For slow links, such as ISDN, decrease the max-content-size to
a lesser value (set av scan-mgr max-content-size 20), so that AV scanning does not
time out.
NOTE: On some security devices, the default for Maximum Content Size is 10 MB.
However, if DI is enabled, we recommend that you configure a value of 6 MB.
84 Antivirus Scanning
Chapter 4: Content Monitoring and Filtering
For example, the scanner can receive and examine four 4-megabyte messages
concurrently. If the scanner receives nine 2-megabyte messages concurrently, it
drops the contents of the last two files without scanning it. You can change this
default behavior so that the scanner passes the traffic instead of dropping it by
doing the following:
WebUI
Security > Antivirus > Scan Manager
Content Oversize: Select Permit to pass traffic if the file size exceeds 30,000 KB
Or
Msgs Overflow: Select Permit if the number of files exceeds the maximum
number of messages on the device, then click Apply.
CLI
unset av scan-mgr max-content-size drop
unset av scan-mgr max-msgs drop
When the AV scan engine is scanning a file and runs out of memory (typically, when
decompressing files), the content is either dropped or passed based on the out of
resource (set av scan-mgr out-of-resource) setting, instead of the fail-mode (set av all
failmode) setting.
HTTP Keep-Alive
By default, the security device uses the HTTP “keep-alive” connection option, which
does not send a TCP FIN to indicate the termination of data transmission. The HTTP
server must indicate that it has sent all the data in another way, such as by sending
the content length in the HTTP header or by some form of encoding. (The method
that a server uses varies by server type.) This method keeps the TCP connection
open while the antivirus examination occurs, which decreases latency and
improves processor performance.
You can change the default behavior of the security device to use the HTTP “close”
connection option for indicating the end of data transmission. (If necessary, the
device changes the token in the connection header field from “keep-alive” to
“close.”) With this method, when the HTTP server completes its data transmission,
it sends a TCP FIN to close the TCP connection and indicate that the server has
finished sending data. When the device receives a TCP FIN, it has all the HTTP data
from the server and can instruct the AV scanner to begin scanning it.
NOTE: The “keep-alive” not as secure as the “close” connection method. You can change
the default behavior if you find that HTTP connections are timing out during the
antivirus examination.
WebUI
Security > Antivirus > Global: Select Keep Alive to use the “keep-alive”
connection option, or clear it to use the “close” connection option, then click
Apply.
Antivirus Scanning 85
Concepts & Examples ScreenOS Reference Guide
CLI
set av http keep-alive
unset av http keep-alive
WebUI
Security > Antivirus > Global: Select the Trickling Default check box, then click
Apply.
CLI
set av http trickling default
NOTE: HTTP trickling is supported on internal AV only. For YMSG however, trickling is
disabled for chat and file transfer. ICAP AV does not support HTTP trickling.
With the default parameters, the security device employs trickling if the size of an
HTTP file is 3MB or larger. The device forwards 500 bytes of content for every 1MB
sent for scanning.
ScreenOS allows you to configure more granular trickling options if your browser
times out during AV scanning. The browser times out if the security device requires
more time to scan traffic or when the traffic is slow. Based on your environment,
customize the values for time and data to trigger HTTP trickling as follows:
WebUI
Security > Antivirus > Global: Enter the following, then click Apply:
Trickling:
Custom: (select)
Minimum Length to Start Trickling: number1.
Trickle Size: number2.
Trickle for Every KB Sent for Scanning: number3.
Trickle Timeout: number4.
CLI
set av http trickling threshold number1 segment-size number3 trickle-size number2
timeout number4
number2: The size (a nonzero value) in bytes of unscanned traffic that the
security device forwards.
86 Antivirus Scanning
Chapter 4: Content Monitoring and Filtering
number3: The size (in kilobytes) of a block of traffic to which the security
device applies trickling.
number4: The time (in seconds) to trigger the trickling event. Time-based
trickling begins when the initial size (number1) is reached. The value 0
indicates that time-based trickling is disabled.
NOTE: Data trickled to the client’s browser appears as a small, unusable file. Because
trickling works by forwarding a small amount of data to a client without scanning
it, virus code might be among the data that the security device has trickled to the
client. We advise users to delete such files.
You can disable HTTP trickling in the WebUI (Security > Antivirus: Click
Disable in the Trickling section) or with the CLI command unset av http
trickling enable. However, if a file being downloaded is larger than 8MB and
HTTP trickling is disabled, the browser window will probably time out.
AV Profiles
Policies use AV profiles to determine which traffic undergoes AV examination and
the actions to take as a result of this examination. ScreenOS supports the following
types of profiles:
Predefined AV Profiles
ScreenOS supports two predefined profiles: the default, ns-profile (read only)
and scan-mgr profile (read and write). Both profiles are supported for internal
embedded AV only.
The Scan Manager is the AV component that manages the scan engine. For
more information about the Scan Manager options, see “AV Scanner Global
Settings” on page 83.
Antivirus Scanning 87
Concepts & Examples ScreenOS Reference Guide
decompress layer: 3
timeout: 180 seconds
include ext list: N/A
exclude ext list: N/A
http Setting:
status: enable
mode: scan-intelligent
decompress layer: 2
timeout: 180 seconds
include ext list: N/A
exclude ext list: N/A
skip scanning:text/html;text/css;audio/;video/;image/;
application/x-director
---
Custom AV profiles
Create your own AV profiles to customize the settings for each protocol. You can
define a maximum of 8 AV profiles for each vsys (and root).
WebUI
Policy > Policies: Click Edit on the policy to which you want to link the AV
profile and select the profile under Antivirus Profile. Click OK.
CLI
device-> set policy id policy_num av ns-profile
The following sections explain how to initiate an AV profile and configure the profile
settings:
WebUI
Security > Antivirus > Profile: Select New and enter the profile name,
jnpr-profile, then click OK.
CLI
set av profile jnpr-profile
device(av:jnpr-profile)->
88 Antivirus Scanning
Chapter 4: Content Monitoring and Filtering
After you enter an AV profile context, all subsequent command executions modify
the specified AV profile (jnpr-profile).
WebUI
Security > Antivirus > Profile: Enter profile_name, then click OK.
NOTE: To change the timeout value, you must use the CLI.
CLI
set av profile jnpr-profile
(av:jnpr-profile)-> set http enable
(av:jnpr-profile)-> set http timeout 300
(av:jnpr-profile)-> set ftp enable
(av:jnpr-profile)-> set ftp timeout 300
(av:jnpr-profile)-> set imap enable
(av:jnpr-profile)-> set imap timeout 300
(av:jnpr-profile)-> set pop3 enable
(av:jnpr-profile)-> set pop3 timeout 300
(av:jnpr-profile)-> set smtp enable
(av:jnpr-profile)-> set smtp timeout 300
(av:jnpr-profile)-> exit
save
You can also change the timeout value for each protocol. By default, an AV scan
operation times out after 180 seconds if the security device does not start scanning
after it receives all the data. The range is 1 to 1800 seconds.
In this example, you configure the AV scanner to examine all SMTP and HTTP
traffic. You return the timeout value for both protocols to their defaults: 180
seconds.
NOTE: The internal AV scanner examines specific HTTP Webmail patterns only. The
patterns for Yahoo!, Hotmail, and AOL mail services are predefined.
WebUI
Security > Antivirus > Select New and enter the profile name jnpr-profile.
Antivirus Scanning 89
Concepts & Examples ScreenOS Reference Guide
Protocols to be scanned:
HTTP: (select)
SMTP: (select)
POP3: (clear)
FTP: (clear)
IMAP: (clear)
NOTE: To change the timeout value, you must use the CLI.
CLI
set av profile jnpr-profile
(av:jnpr-profile)-> set smtp timeout 180
(av:jnpr-profile)-> set http timeout 180
(av:jnpr-profile)-> unset pop3 enable
(av:jnpr-profile)-> unset ftp enable
(av:jnpr-profile)-> unset imap enable
(av:jnpr-profile)-> exit
save
AV Profile Settings
The following scanning options are configured for each application protocol:
For example, if a message contains a compressed .zip file that contains another
compressed .zip file, there are two compression layers, and decompressing both
files requires a decompress-layer setting of 2.
WebUI
Security > Antivirus > Profile: Select New or Edit to edit an existing profile.
Update the Decompress Layer to 2, then click Apply.
CLI
set av profile jnpr-profile
(av:jnpr-profile)-> set smtp decompress-layer 2
When transmitting data, some protocols use content encoding. The AV scan engine
needs to decode this layer, which is considered as a decompression level before it
scans for viruses.
90 Antivirus Scanning
Chapter 4: Content Monitoring and Filtering
scan-all. The AV engine forwards all files to the scan engine for virus scanning.
File-extension lists are used to determine which files undergo AV scanning for a
specific protocol. You can select to Include a file-extension list and Exclude a
file-extension list for each protocol.
Configure the AV scanner to scan IMAP traffic by extensions and exclude files with
the following extensions: .ace, .arj, and .chm.
WebUI
Security > Antivirus > Ext-list >New > Enter an extension-list name (elist1),
and enter the list of extensions (ace;arj;chm). Click OK.
Security > Antivirus >Profile > Select the Profile to Edit > Select IMAP >
Select the following options, then click OK:
Enable
Scan Mode: Scan by Extension
Exclude Extension List: elist1
CLI
set av extension-list elist1 ace;arj;chm
set av profile test1
(av:test1)-> set imap scan-mode scan-ext
(av:test1)-> set imap extension-list exclude elist1
Antivirus Scanning 91
Concepts & Examples ScreenOS Reference Guide
You can configure the AV profile to skip MIME lists containing specific MIME types.
The default predefined MIME list is ns-skip-mime-list. Yahoo Messenger file transfer
ignores the MIME extensions specified in the MIME list because it uses the HTTP
protocol. As part of the HTTP GET/PUT operation, the content-type header is
specified as text or html for all files.
In this example, you configure the security device to scan all kinds of HTTP traffic
regardless of MIME content type:
WebUI
Security > Antivirus > Profile > Select the Profile to Edit> Select HTTP and
clear the Skipmime Enable option. Click OK.
CLI
set av profile jnpr-profile
(av:jnpr-profile)-> unset av http skipmime
(av:jnpr-profile)-> exit
save
For more information about MIME types, see the ScreenOS CLI Reference Guide: IPv4
Command Descriptions.
When a virus is found in an email message, the content of the warning message
(virus name, source/destination IP) is included in a notification-level message. The
warning-level message is sent via an email through the SMTP protocol.
When a scanning error occurs in a message, the content of the scanning error
message should be included in a warning-level message. This message is sent via an
email through the SMTP protocol.
92 Antivirus Scanning
Chapter 4: Content Monitoring and Filtering
WebUI
Security > Antivirus > Profile > Select the Profile to Edit> Select IMAP, then
click OK.
NOTE: The default value for decompressed file content size is per message and not the
total number of concurrent messages being examined.
The default values for Maximum Concurrent Messages and Maximum Queue size
indicate that the AV scanner can examine a total of 16 concurrent messages at any
specific time. The 17th message is dropped or passed as configured.
WebUI
Security > Antivirus > Scan Manager: Enter the following, then click OK:
Security > Antivirus > Profile: Select Edit > HTTP: Enter the following, then
click OK:
Antivirus Scanning 93
Concepts & Examples ScreenOS Reference Guide
Anti-Spam Filtering
Spam consists of unwanted email messages, usually sent by commercial, malicious,
or fraudulent entities. The anti-spam feature examines transmitted messages to
identify spam. When the device detects a message deemed to be spam, it either
drops the message or tags the message field with a preprogrammed string.
This anti-spam feature is not meant to replace your anti-spam server, but to
complement it. Configuring this command prevents an internal corporate email
server from receiving and distributing spams. Corporate users retrieve emails from
an internal email server without going through the firewall. This should be a typical
configuration in an enterprise environment.
NOTE: This release supports anti-spam for the SMTP protocol only.
To prevent or reduce the volume of spam messages you receive, you can configure
an anti-spam profile. You can use the profile in policies to detect and filter out
suspected spam messages. An anti-spam profile allows you to designate lists of IP
addresses, emails, hostnames, or domain names identified as malicious (spam) or
benign (non-spam). The anti-spam profile can include lists of the following types:
If the connection is from a mail-forwarding agent, the device can filter the
connection’s source IP address using lists of devices deemed to be benign
(whitelist) or malicious (blacklist).
The device can use such lists to filter connections that use domain names
deemed to be benign or malicious.
The device can use such lists to base filtering on the sender’s email address
or domain. By default, any email server should accept its own user’s email.
94 Anti-Spam Filtering
Chapter 4: Content Monitoring and Filtering
Alternatively, you can configure local whitelists and blacklists. In this case, by
default the system checks first against the local database of whitelists/blacklists. If it
does not find the hostname, the firewall proceeds to query the SBL server located
on the Internet.
Basic Configuration
The following commands provide an example of basic anti-spam configuration
where you are protecting an smtp server (or relay server) from receiving spam
emails.
In the following example, the firewall tests spammer.org to see if it resides on the
whitelist or the blacklist.
If the blacklist contains spammer.org, the device might produce the following
output:
AS: anti spam result: action Tag email subject, reason: Match local blacklist
Alternatively, if the whitelist contains spammer.org, the device may produce the
following output:
AS: anti spam result: action Pass, reason: Match local whitelist
Anti-Spam Filtering 95
Concepts & Examples ScreenOS Reference Guide
After you enter an anti-spam context, all subsequent command executions modify
the specified anti-spam profile (ns-profile in this example). To save your changes,
you must first exit the anti-spam context and then enter the save command:
device(ns-profile)-> exit
device-> save
Defining a Blacklist
Use the black-list commands to add or remove an IP or email address, a hostname,
or a domain name from the local anti-spam blacklist. Each entry in a blacklist can
identify a possible spammer.
2. Give the profile a blacklist entry that prevents connections with the hostname
www.wibwaller.com.
3. Exit the spam context and apply the profile to an existing policy (id 2).
Defining a Whitelist
Use the white-list commands to add or remove an IP or email address, a hostname,
or a domain name from the local whitelist. Each entry in a whitelist can identify an
entity that is not a suspected spammer. The following table shows some possible
entries.
To define a whitelist:
2. Give the profile a whitelist entry that allows connections with the hostname
www.fiddwicket.com.
3. Exit the spam context and apply the profile to an existing policy (id 2).
You can place the tag either in the message header or the subject line.
96 Anti-Spam Filtering
Chapter 4: Content Monitoring and Filtering
To define the default action for spam, perform the following tasks:
2. Specify that email messages deemed to be spam will have the string “This is
spam” added to the message header.
3. Exit the spam context and apply the profile to an existing policy (id 2).
3. Exit the spam context and apply the profile to an existing policy (id 2).
Testing Anti-Spam
Use the command, exec anti-spam testscan <IP addr> to cause the security device
to scan for known spammer IP addresses.
Anti-Spam Filtering 97
Concepts & Examples ScreenOS Reference Guide
Web Filtering
Web filtering enables you to manage Internet access by preventing access to
inappropriate web content. ScreenOS provides two Web filtering solutions:
Integrated
NOTE: Integrated Web filtering requires you to install a license key on your security
device.
Integrated Web filtering allows you to permit or block access to a requested site
by binding a Web filtering profile to a firewall policy. A Web filtering profile
specifies URL categories and the action the security device takes (permit or
block) when it receives a request to access a URL in each category. URL
categories are predefined and maintained by or are user-defined. For
information about configuring the integrated Web filtering feature, see
“Integrated Web Filtering” on page 99.
Redirect
In redirect Web filtering, the security device sends the HTTP request in a TCP
connection to either a Websense server or a SurfControl server, enabling you to
block or permit access to different sites based on their URLs, domain names,
and IP addresses. For information about configuring the redirect Web filtering
feature, see “Redirect Web Filtering” on page 108.
NOTE: Use integrated Web filtering to manage HTTPS traffic. Redirect Web filtering does
not support HTTPS traffic.
For example, the set url protocol type { sc-cpa | scfp | websense } command
selects the protocol.
Executing the set url protocol { sc-cpa | scfp | websense } command places
the CLI in the Web filtering context. Once you initiate the Web filtering context,
all subsequent command executions apply to that Web filtering mode.
98 Web Filtering
Chapter 4: Content Monitoring and Filtering
Table 3 shows the commands for entering and exiting the three different Web
filtering modes.
A URL category is a list of URLs organized by content. Security devices use the
SurfControl predefined URL categories to determine the category of the requested
URL. SurfControl Content Portal Authority (CPA) servers maintain the largest
database of all types of Web content classified into about 40 categories. A partial list
of the URL categories is shown in “Define URL Categories (Optional)” on page 102.
For a complete list of SurfControl URL categories, visit the Websense website at
http://www.websense.com/global/en/scwelcome.
In addition to the SurfControl predefined URL categories, you can also group URLs
and create categories based on your needs. For information about creating
user-defined categories, see “Define URL Categories (Optional)” on page 102.
Following is the basic sequence of events when a host in the Trust zone tries an
HTTP connection to a server in the Untrust zone:
1. The security device checks for a firewall policy that applies to the traffic:
If there is no firewall policy for the traffic, the device drops the traffic.
If there is a firewall policy and if Web filtering is enabled on that policy, the
device intercepts all HTTP requests.
2. The device checks for a user-defined profile bound to the firewall policy. If there
is none, the device then uses the default profile, ns-profile.
3. The device determines if the category of the requested URL is already cached. If
it is not, the device sends the URL to the SurfControl CPA server for
categorization and caches the result.
Web Filtering 99
Concepts & Examples ScreenOS Reference Guide
4. Once the device determines the category of the URL, it checks for the category
in the Web filtering profile bound to the firewall policy.
If the category is in the profile, the device blocks or permits access to the
URL as defined in the profile.
If the category is not in the profile, the device performs the configured
default action.
SurfControl Servers
SurfControl has three server locations, each of which serves a specific geographic
area: the Americas, Asia Pacific, and Europe/MiddleEast/Africa. The default primary
server is the Americas, and the default backup server is Asia Pacific. You can change
the primary server, and the security device automatically selects a backup server,
based on the primary server. (The Asia Pacific server is the backup for the Americas
server, and the Americas server is the backup for the other two servers.)
The SurfControl CPA server periodically updates its list of categories. Since the CPA
server does not notify its clients when the list is updated, the security device must
periodically poll the CPA server. By default, the device queries the CPA server for
category updates every two weeks. You can change this default to support your
networking environment. You can also manually update the category list by
entering the Web filtering context and executing the exec cate-list-update
command. To manually update the category list, do the following:
In the following example, you change the cache size to 500 kilobytes (KB) and the
timeout value to 18 hours.
WebUI
Security > Web Filtering > Protocol Selection > Select Integrated
(SurfControl), then click Apply.
CLI
device-> set url protocol sc-cpa
device(url:sc-cpa)-> set cache size 500
device(url:sc-cpa)-> set cache timeout 18
device(url:sc-cpa)-> exit
device-> save
WebUI
Security > Web Filtering > Protocol Selection: Select Integrated (SurfControl),
then click Apply. Then select Enable Web Filtering via CPA Server, and click
Apply again.
CLI
device-> set url protocol type sc-cpa
device-> set url protocol sc-cpa
device(url:sc-cpa)-> set enable
device(url:sc-cpa)-> exit
device-> save
The device(url:sc-cpa)-> prompt indicates that you have entered the integrated Web
filtering context and can now configure integrated Web filtering parameters.
WebUI
Security > Web Filtering > Profiles > Predefined category
CLI
device-> set url protocol type sc-cpa
device-> set url protocol sc-cpa
device(url:sc-cpa)-> get category pre
The predefined categories list displays the categories and their SurfControl internal
codes. Although you cannot list the URLs within a category, you can determine the
category of a website by using the Test A Site feature on the Websense website at
http://www.websense.com/global/en/scwelcome.
In addition to the SurfControl predefined URL categories, you can group URLs and
create categories specific to your needs. Each category can have a maximum of 20
URLs. When you create a category, you can add either the URL or the IP address of
a site. When you add a URL to a user-defined category, the device performs DNS
lookup, resolves the hostname into IP addresses, and caches this information.
When a user tries to access a site with the IP address of the site, the device checks
the cached list of IP addresses and tries to resolve the hostname.
Many sites have dynamic IP addresses, meaning that their IP addresses change
periodically. A user attempting to access a site can type an IP address that is not in
the cached list on the device. Therefore, if you know the IP addresses of sites you
are adding to a category, enter both the URL and the IP address(es) of the site.
NOTE: If a URL appears in both a user-defined category and a predefined category, the
device matches the URL to the user-defined category.
In the following example, you create a category named Competitors and add the
following URLs: www.games1.com and www.games2.com
WebUI
Security > Web Filtering > Profiles > Custom > New: Enter the following,
then click Apply:
URL: www.games2.com
CLI
device-> set url protocol sc-cpa
device(url:sc-cpa)-> set category competitors url www.games1.com
device(url:sc-cpa)-> set category competitors url www.games2.com
device(url:sc-cpa)-> exit
device-> save
Permit - The security device always allows access to the websites in this
category.
Block - The security device blocks access to the websites in this category. When
the device blocks access to this category of websites, it displays a message in
your browser indicating the URL category.
You can edit an existing message or create a new message (up to 500
characters) to be sent from the security device. To create or edit a deny
message:
WebUI
Security > Web Filtering > Protocol > Selection: Select Integrated
(SurfControl).
Enter the message in the Web Filter Deny Message text area, then click Apply.
CLI
device-> set deny-message deny-message-str
Black List—The security device always blocks access to the websites in this
list. You can create a user-defined category or use a predefined category.
White List—The security device always allows access to the websites in this
list. You can create a user-defined category or use a predefined category.
Juniper Networks security devices provide a default profile called ns-profile. This
profile lists the SurfControl predefined URL categories and their actions. You cannot
edit the default profile. To view the predefined profile, use the following command:
WebUI
Security > Web Filtering > Profiles > Predefined
CLI
device-> set url protocol sc-cpa
device(url:sc-cpa)-> get profile ns-profile
If the URL in an HTTP request is not in any of the categories listed in the default
profile, the default action of the security device is to permit access to the site.
You can create a custom profile by cloning an existing profile, saving it with a new
name, and then editing the profile. Perform the following step in the WebUI to clone
ns-profile.
WebUI
Security > Web Filtering > Profiles > Custom: ns-profile: Select Clone.
You can also create your own Web filtering profile. When you create a Web filtering
profile, you can:
In the following example, you create a custom profile called my-profile with a
default action of permit. Then, you take the category you created in the previous
example and add it to my-profile with an action of block.
WebUI
Security > Web Filtering > Profiles > Custom > New: Enter the following,
then click Apply:
NOTE: To configure the default action using the CLI, specify the action for the Other
category.
CLI
device-> set url protocol type sc-cpa
device-> set url protocol sc-cpa
device(url:sc-cpa)-> set profile my-profile other permit
device(url:sc-cpa)-> set profile my-profile competitors block
device(url:sc-cpa)-> exit
device-> save
Enable Web filtering in the policy and bind the profile to the policy. When you
enable integrated Web filtering in a policy, the security device intercepts all HTTP
requests. If there is a Web filtering profile bound to the policy, the device matches
the URL in the incoming HTTP request to the categories in the profile in the
following sequence:
1. Blacklist
2. Whitelist
3. User-defined categories
If the device is unable to determine the category of the requested URL, then it
blocks or permits access based on the default configuration in the profile.
HTML request
Y Y Y Y
If the device determines that the URL is in a permitted category, and if AV scanning
is enabled for that policy, then the device scans the contents for viruses. If the
device determines that the URL is in a blocked category, it closes the TCP
connection, sends a message alerting the user, and does not perform AV scanning.
WebUI
1. Web Filtering
Security > Web Filtering > Protocol > Select Integrated (SurfControl), then
click Apply. Then, select Enable Web Filtering via CPA Server, and click Apply
again.
2. URL Category
Security > Web Filtering > Profile > Custom List > New: Enter the following,
then click Apply:
URL: www.comp2.com
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: HTTP
Web Filtering: (select), my-profile
Action: Permit
CLI
1. Web Filtering
device->set url protocol sc-cpa
device(url:sc-cpa)-> set enable
2. URL Category
device(url:sc-cpa)-> set category competitors url www.comp1.com
device(url:sc-cpa)-> set category competitors url www.comp2.com
3. Web Filtering Profile
device(url:sc-cpa)-> set profile my-profile other permit
device(url:sc-cpa)-> set profile my-profile competitors block
device(url:sc-cpa)-> exit
4. Firewall Policy
device-> set policy id 23 from trust to untrust any any http permit url-filter
device-> set policy id 23
device(policy:23)-> set url protocol sc-cpa profile my-profile
device(policy:23)-> exit
device-> save
Figure 41 shows the basic sequence of events when a host in the Trust zone
attempts an HTTP connection to a server in the Untrust zone. However, Web
filtering determines that the requested URL is prohibited.
If the server permits access to the URL, the sequence of events in the HTTP
connection attempt proceeds as shown in Figure 42.
See the following sections for more details on redirect Web filtering:
Alternatively, devices with virtual systems that use Websense Web filtering servers
can share all eight Websense servers, not just the root server. Each Websense server
can support an unrestricted number of virtual systems, allowing you to balance the
traffic load among the eight servers.
1. Create a account name for each vsys. Use the following CLI command:
When a host in a vsys sends out a URL request, it includes the account name.
This name enables the Websense server to identify which vsys sent the URL
request.
2. Configure the same Web filtering server settings and system-level parameters
for each vsys that shares a Websense Web filtering server. The next section
contains information about configuring Web filtering settings and parameters.
Websense server
WebUI
Security > Web Filtering > Protocol > Select Redirect (Websense) or Redirect
(SurfControl), then click Apply.
CLI
Enter the Web filtering context for SurfContol (scfp) or Websense (websense)
redirect filtering. For more information, see “Using the CLI to Initiate
Web-Filtering Modes” on page 98.
Configure the following Web filtering settings at the system level for Web filtering
server communication:
Source Interface: The source from which the device initiates web-filter requests
to a Web filtering server.
Server Name: The IP address or Fully Qualified Domain Name (FQDN) of the
computer running the Websense or SurfControl server.
Server Port: If you have changed the default port on the server, you must also
change it on the security device. (The default port for Websense is 15868, and
the default port for SurfControl is 62252.) Please refer to your Websense or
SurfControl documentation for full details.
Communication Timeout: The time interval, in seconds, that the device waits
for a response from the Web filtering server. If the server does not respond
within the time interval, the device either blocks or allows the request. For the
time interval, enter a value from 10 through 240.
If a device with multiple virtual systems connects to a Websense server, the virtual
systems can share the server. To configure multiple virtual systems to share a
Websense server, use the following CLI commands to create an account name for
each vsys:
Once you have configured the vsys names, you define the settings for the Web
filtering server and the parameters for the behavior that you want the security
device to take when applying Web filtering. If you configure these settings in the
root system, they also apply to any vsys that shares the Web filtering configuration
with the root system. For a vsys, the root and vsys administrators must configure
the settings separately. Virtual systems that share the same Websense Web filtering
server must have the same Web filtering settings.
WebUI
Security > Web Filtering > Protocol > Select Redirect (Websense) or Redirect
(SurfControl), then click Apply.
Enable Web Filtering check box.
CLI
device-> set url protocol type { websense | scfp }
device-> set url protocol { websense | scfp }
device(url:scfp)-> set config enable
When Web filtering is enabled at the system level, HTTP requests are redirected to a
Websense or SurfControl server. This action allows the device to check all HTTP
traffic for policies (defined in that system) that require Web filtering. If you disable
Web filtering at the system level, the device ignores the Web filtering component in
policies and treats the policies as “permit” policies.
If connectivity to the server is lost: If the security device loses contact with the
Web filtering server, you can specify whether to Block or Permit all HTTP
requests.
NOTE: If you select Juniper Networks, some of the functions that Websense provides,
such as redirection, are suppressed.
Juniper Networks Blocked URL Message: This is the message the security
device returns to the user after blocking a site. You can use the message sent
from the Websense or SurfControl server, or you can create a message (up to
500 characters) to be sent from the device.
WebUI
Security > Web Filtering > Protocol > Select Redirect (Websense) or Redirect
(SurfControl), then click Apply.
CLI
device-> set url protocol type { websense | scfp }
device-> set url protocol { websense | scfp }
device(url:scfp)-> set fail-mode permit
device(url:scfp)-> set deny-message use-server
WebUI
Policy > Policies > Click Edit (edit the policy that you want Web filtering to
apply), then select the Web Filter check box.
Select the Web filtering profile from the drop-down box.
CLI
set policy from zone to zone src_addr dst_addr service permit url-filter
NOTE: The device reports the status of the Websense or SurfControl server. To update the
status report, click the Server Status icon in the WebUI:
Security > Web Filtering > Protocol > Select Redirect (Websense) or Redirect
(SurfControl), then click Apply.
1. Set the interfaces to work with a SurfControl server at IP address 10.1.2.5, with
port number 62252 (default), and have the Web filtering server in the Trust
security zone.
2. Enable Web filtering on all outbound HTTP traffic from hosts in the Trust zone
to hosts in the Untrust zone. If the device loses connectivity with the Web
filtering server, the device permits outbound HTTP traffic. When an HTTP client
requests access to a prohibited URL, the device sends the following message:
“We’re sorry, but the requested URL is prohibited. Contact
[email protected].”
3. Set both security zones to be in the trust-vr routing domain with the interface
for the Untrust zone as ethernet3, IP address 1.1.1.1/24, and the interface for
the Trust zone as ethernet1, IP address 10.1.1.1/24. Because the Web filtering
server is not in the immediate subnet of one of the device interfaces, a route is
added to it through ethernet1 and the internal router at 10.1.1.250.
4. Configure the policy to enable Web filtering so that Trust to Untrust permits
HTTP service from any source address to any destination address.
WebUI
1. Interfaces
Network > Interfaces > List >Edit (for ethernet1): Enter the following, then
click Apply:
Network > Interfaces > List >Edit (for ethernet3): Enter the following, then
click OK:
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
4. Policy
Policy > Policies > (From: Trust, To: Untrust) New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: HTTP
Action: Permit
Web Filtering: (select)
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Web Filtering Server
device-> set url protocol type scfp
device-> set url protocol scfp
device(url:scfp)-> set server 10.1.2.5 62252 10
device(url:scfp)-> set fail-mode permit
device(url:scfp)-> set deny-message “We’re sorry, but the requested URL is
prohibited. Contact [email protected].”
device(url:scfp)-> set config enable
3. Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
set vrouter trust-vr route 10.1.2.0/24 interface ethernet1 gateway 10.1.1.250
4. Policy
set policy from trust to untrust any any http permit url-filter
save
You can enable deep inspection (DI) in policies to examine permitted traffic and
take action if the DI module in ScreenOS finds attack signatures or protocol
anomalies. The following sections present the DI elements that appear in policies
and explains how to configure them:
117
Concepts & Examples ScreenOS Reference Guide
You can also enable DI at the security zone level for HTTP components. These
SCREEN options are explained in the final section of this chapter:
Overview
Deep inspection (DI) is a mechanism for filtering the traffic permitted by the Juniper
Networks firewall. DI examines Layer 3 and Layer 4 packet headers and Layer 7
application content and protocol characteristics in an effort to detect and prevent
any attacks or anomalous behavior that might be present. Figure 43 shows how a
packet undergoes Layer 3 inspection.
NOTE: Juniper Networks security devices detect anomalous traffic patterns at Layer 3 and
Layer 4 (IP and TCP) via SCREEN options set at the zone level, not the policy level.
Examples of IP and TCP traffic-anomaly detection are “IP Address Sweep” on
page 8, “Port Scanning” on page 9, and the various flood attacks described in
“Network DoS Attacks” on page 38.
118 Overview
Chapter 5: Deep Inspection
Perform attack
response action
No No
Forward packet
When the security device receives the first packet of a session, it inspects the
source and destination IP addresses in the IP packet header (Layer 3 inspection)
and the source and destination port numbers and protocol in the TCP segment
or UDP datagram header (Layer 4 inspection). If the Layer 3 and 4 components
match the criteria specified in a policy, the device then performs the specified
action on the packet—permit, deny, or tunnel. When the device receives a
packet for an established session, it compares it with the state information
maintained in the session table to determine if it belongs to the session.
NOTE: If the specified action is tunnel, the notion of permission is implied. Note that if
you enable DI in a policy whose action is tunnel, the security device performs the
specified DI operations before encrypting an outbound packet and after
decrypting an inbound packet.
If you have enabled DI in the policy that applies to this packet and the policy action
is “permit” or “tunnel,” then the security device further inspects it and its
associated data stream for attacks. It scans the packet for patterns that match those
defined in one or more groups of attack objects. Attack objects can be attack
signatures or protocol anomalies, which you can either define yourself or download
to the security device from a database server. (For more information, see “Attack
Objects and Groups” on page 130 and “Customized Attack Objects and Groups” on
page 157.)
Overview 119
Concepts & Examples ScreenOS Reference Guide
NOTE: The deep inspection (DI) feature is available after you have obtained and loaded
an advanced mode license key. (If you upgrade from a pre-5.0.0 version of
ScreenOS, the mode automatically becomes “advanced.” In this case, an
advanced-mode license key is not required.) The ability to download signature
packs from the database server requires that you first subscribe for the service. For
more information, see “Registration and Activation of Subscription Services” on
page 2-251.
Based on the attack objects specified in the policy, the security device might
perform the following inspections (see Figure 44):
Examine header values and payload data for stateful attack signatures
Compare the format of the transmitted protocol with the standards specified in
the RFCs and RFC extensions for that protocol to determine if someone has
altered it, possibly for malicious purposes
SRC IP DST IP SRC PT DST PT PROTO SRC IP DST IP SRC PT DST PT PROTO
Payload Data Payload Data
If the security device detects an attack, it performs the action specified for the
attack object group to which the matching attack object belongs: close, close-client,
close-server, drop, drop-packet, ignore, or none. If it does not find an attack, it
forwards the packet. (For more information about attack actions, see “Attack
Actions” on page 140.)
You can conceptually separate a set policy command into two parts—the core
section and the DI component:
The core section contains the source and destination zones, source and
destination addresses, one or more services, and an action.
120 Overview
Chapter 5: Deep Inspection
NOTE: You can optionally add other extensions to the core component of a set policy
command: VPN and L2TP tunnel references, a schedule reference, address
translation specifications, user authentication specifications, antivirus checking,
logging, counting, and traffic management settings. Whereas these extensions are
optional, the elements that constitute the core of a policy—source and destination
zones, source and destination addresses, service (or services), and action—are
required. (An exception to this is a global policy, in which no source and
destination zones are specified: set policy global src_addr dst_addr service action.
For more information about global policies, see “Global Policies” on page 2-162.)
set policy id 1 from untrust to dmz any websrvl http permit attack HIGH:HTTP:ANOM action close
The above command directs the security device to permit HTTP traffic from any
address in the Untrust zone to the destination address “websrv1” in the DMZ zone.
It also instructs the device to inspect all HTTP traffic permitted by this policy. If any
pattern in the traffic matches an attack object defined in the attack object group
“HIGH:HTTP:ANOM”, the device closes the connection by dropping the packet and
sending TCP RST notifications to the hosts at the source and destination addresses.
It is possible to enter the context of an existing policy by using its ID number. For
example:
NOTE: The command prompt changes to signal that the subsequent command will be
within a particular policy context.
Overview 121
Concepts & Examples ScreenOS Reference Guide
device-> set policy id 1 from untrust to dmz any websrv1 http permit attack
CRITICAL:HTTP:ANOM action close
device-> set policy id 1
device(policy:1)-> set dst-address websrv2
device(policy:1)-> set service https
device(policy:1)-> set attack CRITICAL:HTTP:SIGS action close-server
device(policy:1)-> set attack HIGH:HTTP:ANOM action drop
device(policy:1)-> set attack HIGH:HTTP:SIGS action close-server
device(policy:1)-> exit
device-> save
The above configuration permits both HTTP and HTTPS traffic, but only looks for
attacks in HTTP traffic. To be able to add attack object groups within a policy
context, you must first specify a DI attack and action in the top-level command. In
the above example, you can add CRITICAL:HTTP:SIGS, HIGH:HTTP:ANOM, and
HIGH:HTTP:SIGS attack object groups because you first configured the policy for DI
with the CRITICAL:HTTP:ANOM group.
NOTE: You can specify a different attack action for each attack object group in a policy. If
the security device simultaneously detects multiple attacks, it applies the most
severe action, which in the above example is “close.” For information about the
seven attack actions, including their severity levels, see “Attack Actions” on
page 140.
1.Due to memory allocation required for new enhancements, only DI signatures of critical severity are provided for NS-5XT/GT
devices.
Table 6 lists the predefined signatures packs with the corresponding URLs.
NOTE: You can also use NetScreen-Security Manager to download the signature packs.
For information, see the NetScreen-Security Manager Administration Guide.
3. Verify that the system clock and the Domain Name System (DNS) settings on
your device are accurate.
WebUI
Configuration > Date/Time
Note that this option is only available after you retrieve a DI subscription key.
The security device then attempts to contact the server at the default URL:
https://services.juniper.net/restricted/sigupdates; or, if you have entered a
different URL in the Database Server field, it attempts to contact the URL that
you entered. Table 6 on page 123 lists the predefined signatures packs and the
corresponding URLs.
After a few moments, a message appears indicating whether the update was
successful. If the update was unsuccessful, then check the event log to
determine the cause of the failure.
NOTE: After you download the signature pack the first time, you must reset the security
device. Following each download thereafter, resetting the device is unnecessary.
Immediate Update
The Immediate Update option allows you to update the signature pack on the
security device immediately with the signature pack stores on the database server.
For this operation to work, you must first configure the attack object database
server settings.
In this example (see Figure 46), you save a predefined signature pack from the
attack object database server to the security device immediately.
You do not set a schedule for updating the database on the security device. Instead,
you save the database from the server to the security device immediately.
Internet
WebUI
Configuration > Update > Attack Signature:
Signature Pack: Client
Click the Update Now button.
CLI
set attack db sigpack client
exec attack-db update
Loading attack database.............
Done.
Done.
Switching attack database...Done
Saving attack database to flash...Done.
Automatic Update
The Automatic Update option, downloads the signature pack at user-scheduled
times if the database on the server is a newer version than that previously loaded
on the device. Juniper Networks regularly updates the signature pack with newly
discovered attack patterns. Therefore, because of its changing nature, you must also
update the signature pack on your security device regularly. For this operation to
work, you must first configure the attack object database server settings.
In this example (see Figure 47), you set a schedule to update the database on the
security device every Monday at 04:00 AM. At that scheduled time, the device
compares the version of the database on the server with that on the device. If the
version on the server is more recent, the security device automatically replaces its
database with the newer version.
For example, select Server to update the server signature pack. See Table 6 on
page 123 for a list of predefined signatures packs and the corresponding URLs.
S M T W T F S
Internet
WebUI
Configuration > Update > Attack Signature: Enter the following, then click OK:
NOTE: If you schedule monthly updates and the date you choose does not occur in a
particular month (for example, 31), the security device uses the last possible date
of the month in its place.
CLI
set attack db sigpack server
set attack db mode update
set attack db schedule weekly monday 04:00
save
In this example (see Figure 48), you set a schedule to check the database on the
security device every day at 07:00 AM.
When you receive a notice that the database on the server has been updated, you
click the Update Now button on the Configuration > Update > Attack Signature
page in the WebUI or enter the exec attack-db update command to save the
database from the server to the device.
For example, do the following to update the Client signature pack. See Table 6 on
page 123 for a list of predefined signatures packs and the corresponding URLs.
S M T W T F S
Internet
https://services.juniper.net/
restricted/sigupdates
Attack Object 2. Immediate Database Update Attack Object
Database Database
WebUI
1. Scheduled Database Checking
Configuration > Update > Attack Signature: Enter the following, then click OK:
CLI
1. Scheduled Database Checking
set attack db sigpack client
set attack db mode notification
set attack db schedule daily 07:00
2. Immediate Database Update
When you receive a notice that the attack database on the server is more
current than the one on the security device, do the following:
Manual Update
The Manual Update option, allows you to first use a browser to download the
signature pack to a local directory or TFTP server directory. You can then load the
signature pack on the security device using either the WebUI (from the local
directory) or CLI (from the TFTP server directory).
NOTE: Before performing an immediate database update, you can use the exec attack-db
check command to check if the attack object database on the server is more
recent than the one on the security device.
In this example (see Figure 49), you manually save the latest signature pack to the
local directory “C:\netscreen\attacks-db” (if you want to use the WebUI to load the
database) or C:\Program Files\TFTP Server (if you want to use the CLI to load it). You
then load the database on the security device from your local directory.
NOTE: After downloading the signature pack, you can also post it on a local server and
set it up for other security devices to access. The admins for the other devices
must then change the database server URL to that of the new location. They can
either enter the new URL in the Database Server field on the Configuration >
Update > Attack Signature page or use the following CLI command: set attack db
server url_string.
For an automatic update, the security device automatically adds the following
elements to the URL:
Platform type
When you manually update the DI Signatures, you must add these elements
yourself. In this example, the serial number is 0043012001000213, the ScreenOS
version is 5.4, and the platform is NetScreen-208 (ns200). Consequently, the
resulting URL is:
https://services.juniper.net/restricted/sigupdates/5.4/ns200/attacks.bin?sn=0
043012001000213
Internet
2. Manual
Database URL = https://services.juniper.net/
Attack Object Update Attack Object /restricted/sigupdates/5.4/ns200/attacks
Database Database .bin?sn=0043012001000213
Admin: 10.1.1.5
C:\netscreen\attacks-db
C:\Program Files\TFTP Server
https://services.juniper.net/restricted/sigupdates/5.4/ns200/attacks.bin?sn=0
043012001000213
Or
Click Browse and navigate to that directory, select attacks.bin, then click
Open.
If you downloaded the server, client, or worm protection signature packs, then
enter the appropriate filename.
CLI
save attack-db from tftp 10.1.1.5 attacks.bin to flash
WebUI
Security > Proxy: Set the HTTP and SSL proxy addresses, then click Apply:
CLI
set pattern-update proxy http 10.0.0.5:8080
save
NOTE: You cannot configure an HTTPs proxy, because you cannot cache an HTTPs proxy.
SYN
SYN/ACK
ACK
RST RST
The attack object groups that you reference in the DI component of a policy must
target the same service type that the policy permits. For example, if the policy
permits SMTP traffic, the attack object group must aim at attacks on SMTP traffic.
The following policy exemplifies a valid configuration:
set policy id 2 from trust to untrust any any smtp permit attack CRIT:SMTP:SIGS action
close
The next policy is erroneous because the policy permits SMTP traffic, but the attack
object group is for POP3 traffic:
set policy id 2 from trust to untrust any any smtp permit attack CRIT:POP3:SIGS action
close
The second policy is configured incorrectly and, if implemented, would cause the
security device to expend unnecessary resources inspecting SMTP traffic for POP3
attack objects that it could never find. If policy 2 permits both SMTP and POP3
traffic, you can configure the DI component to check for SMTP attack objects, POP3
attack objects, or for both.
Supported Protocols
The deep inspection (DI) module supports stateful signature attack objects and
protocol anomaly attack objects for the following protocols and applications:
Stateful Protocol
Protocol Signature Anomaly Definition
DNS Yes Yes Domain Name System (DNS) is a database system for translating domain names
to IP addresses, such as www.juniper.net = 207.17.137.68.
FTP Yes Yes File Transfer Protocol (FTP) is a protocol for exchanging files between computers
across a network.
HTTP Yes Yes HyperText Transfer Protocol (HTTP) is a protocol primarily used to transfer
information from webservers to web clients.
IMAP Yes Yes Internet Mail Access Protocol (IMAP) is a protocol that provides incoming email
storage and retrieval services, with the option that users can either download their
email or leave it on the IMAP server.
NetBIOS Yes Yes NetBIOS (Network Basic Input Output System) is an application interface that
allows applications on users’ workstations to access network services provided by
network transports such as NetBEUI, SPX/IPX, and TCP/IP.
POP3 Yes Yes Post Office Protocol, version 3 (POP3) is a protocol that provides incoming email
storage and retrieval services.
SMTP Yes Yes Simple Mail Transfer Protocol (SMTP) is a protocol for transferring email between
mail servers.
Chargen Yes Yes Character generator protocol
DHCP Yes Yes Dynamic Host Configuration Protocol is used to control vital networking
parameters of hosts (running clients) with the help of a server. DHCP is backward
compatible with BOOTP.
Discard Yes Yes Discard protocol is a useful debugging and measurement tool. A discard service
simply throws away any data it receives.
Echo Yes Yes Echo protocol is an internet protocol intended for testing and measurement
purposes. A host may connect to a server that supports the ECHO protocol, on
either TCP or UDP port 7. The server then sends back any data it receives.
Finger Yes Yes Finger User Information protocol is a simple protocol that provides an interface to
a remote user information program.
Gopher Yes Yes Gopher is an internet protocol designed for distributed document search and
retrieval.
Stateful Protocol
Protocol Signature Anomaly Definition
ICMP Yes Yes Internet Control Message Protocol is a required protocol tightly integrated with IP.
ICMP messages, delivered in IP packets, are used for out-of-band messages
related to network operation.
IDENT Yes Yes Identification protocol provides a means to determine the identity of a user of a
particular TCP connection.
LDAP Yes Yes Lightweight Directory Access Protocol is a set of protocols for accessing
information directories.
LPR Yes Yes Line Printer spooler
NFS Yes Yes Network File System (NFS) protocol provides transparent remote access to shared
files across networks. The NFS protocol is designed to be portable across different
machines, operating systems, network architectures, and transport protocols.
NNTP Yes Yes Network News Transfer Protocol specifies a protocol for the distribution, inquiry,
retrieval, and posting of news articles using a reliable stream-based transmission
of news.
NTP Yes Yes Network Time Protocol and Simple Network Time Protocol is used to synchronize
the time of a computer client or server to another server or reference time source,
such as a radio or satellite receiver or modem.
Portmapper Yes Yes Port Mapper Program Protocol maps RPC program and version numbers to
transport- specific port numbers.
RADIUS Yes Yes Remote Authentication Dial In User Service, an authentication and accounting
system used by many Internet Service Providers (ISPs).
rexec Yes Yes Remote Execution
rlogin Yes Yes Remote Login occurs when a user connects to an Internet host to use its native
user interface.
rsh Yes Yes Remote shell
RTSP Yes Yes Real Time Streaming Protocol is a client-server application-level protocol for
controlling the delivery of data with real-time properties. It establishes and
controls either a single or several time-synchronized streams of continuous
media, such as audio and video.
SNMPTRAP Yes Yes Simple Network Management Protocol is an SNMP application that uses the
SNMP TRAP operation to send information to a network manager.
SSH Yes Yes Secure Shell Protocol is a protocol for secure remote login and other secure
network services over an insecure network.
SSL Yes Yes Secure Sockets Layer is a protocol used for transmitting private documents via the
Internet using a cryptographic system.
syslog Yes Yes System Logging Protocol is used for the transmission of event notification
messages across networks.
Telnet Yes Yes Telnet protocol is a terminal emulation program for TCP/IP networks. This
protocol enables you to communicate with other servers on the network.
TFTP Yes Yes Trivial File Transfer Protocol is a simple protocol used to transfer files. TFTP uses
the User Datagram Protocol (UDP) and provides no security features.
VNC Yes Yes Virtual Network Computing is a desktop protocol to remotely control another
computer.
Whois Yes Yes Network Directory Service Protocol is a TCP transaction based query/response
server that provides network-wide directory service to internet users.
Stateful Protocol
Protocol Signature Anomaly Definition
AIM Yes Yes America Online Instant Messaging (AIM) is the instant messaging application for
America Online.
MSN Messenger Yes Yes Microsoft Network Messenger (MSN Messenger) is the instant messaging service
provided by Microsoft.
Yahoo! Yes Yes Yahoo! Messenger is the instant messaging service provided by Yahoo!.
Messenger
IRC Yes Yes Internet Relay Chat is a text-based protocol, with the simplest client being any
socket program capable of connecting to the server.
NOTE: Many of the listed P2P applications use their own proprietary protocols.
Stateful Protocol
Protocol Signature Anomaly Definition
MSRPC Yes Yes MSRPC (Microsoft-Remote Procedure Call) is a mechanism for running
processes on a remote computer.
http://help.juniper.net/sigupdates/english/AIM.html
http://help.juniper.net/sigupdates/english/DNS.html
http://help.juniper.net/sigupdates/english/FTP.html
http://help.juniper.net/sigupdates/english/GNUTELLA.html
http://help.juniper.net/sigupdates/english/HTTP.html
http://help.juniper.net/sigupdates/english/IMAP.html
http://help.juniper.net/sigupdates/english/MSN.html
http://help.juniper.net/sigupdates/english/NBDS.html
http://help.juniper.net/sigupdates/english/NBNAME.html
http://help.juniper.net/sigupdates/english/POP3.html
http://help.juniper.net/sigupdates/english/SMTP.html
http://help.juniper.net/sigupdates/english/MSRPC.html
http://help.juniper.net/sigupdates/english/SMB.html
http://help.juniper.net/sigupdates/english/YMSG.html
Each of the above URLs links to an HTML page containing a list of all the predefined
attack objects—organized in groups by severity—for a particular protocol. To see a
description of an attack object, click its name.
Stateful Signatures
An attack signature is a pattern that exists when a particular exploit is in progress.
The signature can be a Layer 3 or 4 traffic pattern, such as when one address sends
lots of packets to different port numbers at another address (see “Port Scanning” on
page 9), or a textual pattern, such as when a malicious URL string appears in the
data payload of a single HTTP or FTP packet. The string can also be a specific
segment of code or a specific value in the packet header. However, when searching
for a textual pattern, the deep inspection (DI) module in a security device looks for
more than just a signature in a packet; it looks for the signature in a particular
portion of the packet (even if fragmented or segmented), in packets sent at a
particular time in the life of the session, and sent by either the connection initiator
or the responder.
NOTE: Because the DI module supports regular expressions, it can use wildcards when
searching for patterns. Thus, a single attack signature definition can apply to
multiple attack pattern variations. For information about regular expressions, see
“Regular Expressions” on page 158.
When the DI module checks for a textual pattern, it considers the roles of the
participants as client or server and monitors the state of the session to narrow its
search to just those elements relevant to the exploit for which attackers use the
pattern. Using contextual information to refine packet examination greatly reduces
false alarms—or “false positives”—and avoids unnecessary processing. The term
“stateful signatures” conveys this concept of looking for signatures within the
context of the participants’ roles and session state.
To see the advantage of considering the context in which a signature occurs, note
the way the DI module examines packets when enabled to detect the EXPN Root
attack. Attackers use the EXPN Root attack to expand and expose mailing lists on a
mail server. To detect the EXPN Root attack, the security device searches for the
signature “expn root” in the control portion of a Simple Mail Transfer Protocol
(SMTP) session. The device examines only the control portion because that is only
where the attack can occur. If “expn root” occurs in any other portion of the
session, it is not an attack.
Using a simple textual packet signature detection technique, the signature “expn
root” triggers an alarm even if it appears in the data portion of the SMTP
connection; that is, in the body of an email message. If, for example, you were
writing to a colleague about EXPN Root attacks, a simple packet signature detector
would regard this as an attack. Using stateful signatures, the DI module can
distinguish between text strings that signal attacks and those that are harmless
occurrences.
NOTE: For a list of protocols for which there are predefined stateful signature attack
objects, see “Supported Protocols” on page 131.
NOTE: You can define TCP stream signatures on the high-end systems only.
Stream signatures are independent of protocols and are therefore more flexible in
matching traffic. Stream signatures can examine traffic where protocols decoders
can’t inspect. However, this flexibility affects performance and resource
consumption.
Protocol Anomalies
Attack objects that search for protocol anomalies detect traffic that deviates from
the standards defined in RFCs and common RFC extensions. With signature attack
objects, you must use a predefined pattern or create a new one; therefore, they can
only detect known attacks. Protocol anomaly detection is particularly useful for
catching new attacks or those attacks that cannot be defined by a textual pattern.
NOTE: For a list of protocols for which there are predefined protocol anomaly attack
objects, see “Supported Protocols” on page 131.
For example, if the security device detects an attack with the severity level
“Medium,” the corresponding entry that appears in the event log then has the
severity level “Warning.”
It is possible to override the default severity level of all attack objects in one or more
attack object groups referenced in a policy. You do this at the policy level by
entering the context of an existing policy and then assigning a new severity level to
all the attack object groups that the policy references.
The following shows how to change the severity level of the attack object groups
referenced in a policy through the WebUI and CLI:
WebUI
Policies > Edit (for an existing policy): Do the following, then click OK:
> Deep Inspection: Select a severity option in the Severity drop-down list,
then click OK.
CLI
device-> set policy id number
device(policy:number)-> set di-severity { info | low | medium | high | critical }
To return the severity level for each attack object to its original setting, you again
enter the context of a policy and do either of the following:
WebUI
Policies > Edit (for an existing policy): Do the following, then click OK:
> Deep Inspection: Select Default in the Severity drop-down list, then click
OK.
CLI
device-> set policy id number
device(policy:number)-> unset di-severity
HIGH:HTTP:SIGS
INFO:GNUTELLA:ANOM
INFO:HTTP:SIGS
NOTE: For security reasons, you do not define a policy permitting any host in the Untrust
zone to initiate a P2P session with a host in the Trust zone.
NOTE: For information about the various attack actions that the security device can
perform, see “Attack Actions” on page 140. For information about logging
detected attacks, see “Attack Logging” on page 151.
WebUI
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: DNS
> Click Multiple, select GNUTELLA and HTTP, then click OK to return to
the basic policy configuration page.
Action: Permit
> Click Deep Inspection, enter the following, click Add to enter each
attack object group, then click OK to return to the basic policy
configuration page:
Severity: Default
Group: HIGH:HTTP:SIGS
Action: Close Client
Log: (select)
Severity: Default
Group: INFO:GNUTELLA:ANOM
Action: Close Client
Log: (select)
Severity: Default
Group: INFO:HTTP:SIGS
Action: Close Client
Log: (select)
CLI
set policy id 1 from trust to untrust any any dns permit attack
HIGH:HTTP:SIGS action close-client
set policy id 1
device(policy:1)-> set service gnutella
device(policy:1)-> set service http
device(policy:1)-> set attack INFO:GNUTELLA:ANOM action close-client
device(policy:1)-> set attack INFO:HTTP:SIGS action close-client
device(policy:1)-> exit
save
NOTE: Because the logging of detected attacks is enabled by default, you do not have to
specify logging through CLI commands.
Note that a predefined attack object is disabled only within the root system or
virtual system (vsys) in which you disable it. For example, disabling a predefined
attack object in the root system does not automatically disable it in any virtual
systems. Likewise, disabling an attack object in one vsys does not affect that object
in any other vsys.
WebUI
Security > Deep Inspection > Attacks > Predefined: Clear the check box in
the Configure column for the attack object that you want to disable.
CLI
set attack disable attack_object_name
WebUI
Security > Deep Inspection > Attacks > Predefined: Select the check box in
the Configure column for the attack object that you want to enable.
CLI
unset attack disable attack_object_name
Attack Actions
When the security device detects an attack, it performs the action that you specify
for the attack group containing the object that matches the attack. The seven
actions are as follows, from most to least severe:
NOTE: The client is always the initiator of a session; that is, the source address in a policy.
The server is always the responder, or the destination address.
Use this option for TCP connections. The security device drops the connection
and sends a TCP RST to both the client (source) and server (destination).
Because the delivery of RST notifications is unreliable, by sending a RST to both
client and server, there is a greater chance that at least one gets the RST and
closes the session.
Use this option for inbound TCP connections from an untrusted client to a
protected server. If the client tries to launch an attack, the security device drops
the connection and sends a TCP RST only to the server for it to clear its
resources while the client is left hanging.
Use this option for outbound TCP connections from a protected client to an
untrusted server. If, for example, the server sends a malicious URL string, the
security device drops the connection and sends a RST only to the client for it to
clear its resources while the server is left hanging.
Use this option for UDP or other non-TCP connections, such as DNS. The
security device drops all packets in a session, but does not send a TCP RST.
Drop Packet (drops a particular packet, but does not sever connection)
This option drops the packet in which an attack signature or protocol anomaly
occurs but does not terminate the session itself. Use this option to drop
malformed packets without disrupting the entire session. For example, if the
security device detects an attack signature or protocol anomaly from an AOL
proxy, dropping everything would disrupt all AOL service. Instead, dropping just
the packet stops the problem packet without stopping the flow of all the other
packets.
It is useful when first identifying attack types during the initial setup phase of
your DI implementation. When the security device detects an attack signature
or protocol anomaly, it makes an entry in the event log but takes no action on
the traffic itself. The security device continues to check subsequent traffic in
that session and make log entries if it detects other attack signatures and
anomalies.
You can create a policy referencing multiple attack object groups, each group having
a different action. If the security device simultaneously detects multiple attacks that
belong to different attack object groups, it applies the most severe action specified
by one of those groups.
Policy ID 1: Permit HTTP, HTTPS, PING, and FTP-GET traffic from any address
in the Untrust zone to the webservers (websrv1 and websrv2) in the DMZ.
CRITICAL:HTTP:ANOM, CRITICAL:HTTP:SIGS
HIGH:HTTP:ANOM, HIGH:HTTP:SIGS
MEDIUM:HTTP:ANOM, MEDIUM:HTTP:SIGS
CRITICAL:FTP:SIGS
You choose to drop the connection and send a TCP RST notification only to the
protected webservers so they can terminate sessions and clear resources. You
anticipate attacks coming from the Untrust zone.
Policy ID 2: Permit HTTP, HTTPS, PING, and FTP traffic from any address in the
Trust zone to the webservers (websrv1 and websrv2) in the DMZ
CRITICAL:HTTP:ANOM, CRITICAL:HTTP:SIGS
HIGH:HTTP:ANOM, HIGH:HTTP:SIGS
MEDIUM:HTTP:ANOM, MEDIUM:HTTP:SIGS
CRITICAL:FTP:SIGS
You choose to drop the connection and send a TCP RST notification to both the
protected clients and servers so they both can terminate their sessions and
clear their resources regardless of the severity level of the attack.
Policy ID 3: Permit FTP-GET, HTTP, HTTPS, PING traffic from any address in the
Trust zone to any address in the Untrust zone
CRITICAL:HTTP:ANOM, CRITICAL:HTTP:SIGS
HIGH:HTTP:ANOM, HIGH:HTTP:SIGS
MEDIUM:HTTP:ANOM, MEDIUM:HTTP:SIGS
CRITICAL:FTP:SIGS
You choose to drop the connection and send a TCP RST notification to the
protected clients so they both can terminate their sessions and clear their
resources. In this case, you anticipate an attack coming from an untrusted
HTTP or FTP server.
Although the policies permit HTTP, HTTPS, Ping, and FTP-Get or FTP, the security
device activates DI only for HTTP and FTP traffic. All zones are in the trust-vr
routing domain.
Untrust Zone
DI (Untrust -> DMZ)
HTTP:Crit, High, Med;
FTP:Crit
ethernet3 Action:Close-server
1.1.1.1/24
DMZ Zone
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
OK:
IP Address/Domain Name:
IP/Netmask: (select), 1.2.2.5/32
Zone: DMZ
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), websrv1
> Click Multiple, select websrv2, then click OK to return to the basic
policy configuration page.
Service: HTTP
> Click Multiple, select FTP-GET, HTTPS, PING, then click OK to return to
the basic policy configuration page.
Action: Permit
> Click Deep Inspection, enter the following, click Add to enter each
attack object group, then click OK to return to the basic policy
configuration page:
Group: CRITICAL:HTTP:ANOM
Action: Close Server
Log: (select)
Group: CRITICAL:HTTP:SIGS
Action: Close Server
Log: (select)
Group: HIGH:HTTP:ANOM
Action: Close Server
Log: (select)
Group: HIGH:HTTP:SIGS
Action: Close Server
Log: (select)
Group: MEDIUM:HTTP:ANOM
Action: Close Server
Log: (select)
Group: MEDIUM:HTTP:SIGS
Action: Close Server
Log: (select)
Group: CRITICAL:FTP:SIGS
Action: Close Server
Log: (select)
5. Policy ID 2
Policies > (From: Trust, To: DMZ) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), websrv1
> Click Multiple, select websrv2, then click OK to return to the basic
policy configuration page.
Service: HTTP
> Click Multiple, select FTP-GET, HTTPS, PING, then click OK to return to
the basic policy configuration page.
Action: Permit
> Click Deep Inspection, enter the following, click Add to enter each
attack object group, then click OK to return to the basic policy
configuration page:
Group: CRITICAL:HTTP:ANOM
Action: Close
Log: (select)
Group: CRITICAL:HTTP:SIGS
Action: Close
Log: (select)
Group: HIGH:HTTP:ANOM
Action: Close
Log: (select)
Group: HIGH:HTTP:SIGS
Action: Close
Log: (select)
Group: MEDIUM:HTTP:ANOM
Action: Close
Log: (select)
Group: MEDIUM:HTTP:SIGS
Action: Close
Log: (select)
Group: CRITICAL:FTP:SIGS
Action: Close
Log: (select)
6. Policy ID 3
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
> Click Multiple, select FTP-GET, HTTPS, PING, then click OK to return to
the basic policy configuration page.
Action: Permit
> Click Deep Inspection, enter the following, click Add to enter each
attack object group, then click OK to return to the basic policy
configuration page:
Group: CRITICAL:HTTP:ANOM
Action: Close Client
Log: (select)
Group: CRITICAL:HTTP:SIGS
Action: Close Client
Log: (select)
Group: HIGH:HTTP:ANOM
Action: Close Client
Log: (select)
Group: HIGH:HTTP:SIGS
Action: Close Client
Log: (select)
Group: MEDIUM:HTTP:ANOM
Action: Close Client
Log: (select)
Group: MEDIUM:HTTP:SIGS
Action: Close Client
Log: (select)
Group: CRITICAL:FTP:SIGS
Action: Close Client
Log: (select)
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 manage
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface ethernet2 zone dmz
set interface ethernet2 ip 2.1.1.1/24
2. Addresses
set address dmz websrv1 1.2.2.5/32
set address dmz websrv2 1.2.2.6/32
3. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
4. Policy ID 1
set policy id 1 from untrust to dmz any websrv1 http permit attack
CRITICAL:HTTP:ANOM action close-server
set policy id 1
device(policy:1)-> set dst-address websrv2
device(policy:1)-> set service ftp-get
device(policy:1)-> set service https
device(policy:1)-> set service ping
device(policy:1)-> set attack CRITICAL:HTTP:SIGS action close-server
device(policy:1)-> set attack HIGH:HTTP:ANOM action close-server
device(policy:1)-> set attack HIGH:HTTP:SIGS action close-server
device(policy:1)-> set attack MEDIUM:HTTP:ANOM action close-server
device(policy:1)-> set attack MEDIUM:HTTP:SIGS action close-server
device(policy:1)-> set attack CRITICAL:FTP:SIGS action close-server
device(policy:1)-> exit
5. Policy ID 2
set policy id 2 from trust to dmz any websrv1 http permit attack
CRITICAL:HTTP:ANOM action close
set policy id 2
device(policy:2)-> set dst-address websrv2
device(policy:2)-> set service ftp
device(policy:2)-> set service https
device(policy:2)-> set service ping
device(policy:2)-> set attack CRITICAL:HTTP:SIGS action close
device(policy:2)-> set attack HIGH:HTTP:ANOM action close
device(policy:2)-> set attack HIGH:HTTP:SIGS action close
device(policy:2)-> set attack MEDIUM:HTTP:ANOM action close
device(policy:2)-> set attack MEDIUM:HTTP:SIGS action close
device(policy:2)-> set attack CRITICAL:FTP:SIGS action close
device(policy:2)-> exit
6. Policy ID 3
set policy id 3 from trust to untrust any any http permit attack
CRITICAL:HTTP:ANOM action close-client
set policy id 3
device(policy:3)-> set service ftp-get
device(policy:3)-> set service https
device(policy:3)-> set service ping
device(policy:3)-> set attack CRITICAL:HTTP:SIGS action close-client
Brute force attack is detected based on the threshold values set for the DI supported
protocols. For example,
Apart from a DI action, brute force attack actions are configured with the IP action
command for a configured amount of time for a specified target. If your security
device detects a brute force attack, then select one of the following actions to
perform:
Notify: The security device logs the event but does not take any action against
further traffic matching the target definition for the period of time specified in
the timeout setting.
Block: The security device logs the event and drops all further traffic matching
the target definition for the period of time specified in the timeout setting.
Close: The security device logs the event and drops all further traffic matching
the target definition for the period of time specified in the timeout setting, and
sends a Reset (RST) for TCP traffic to the source and destination addresses.
Example 1
In this example, you configure an IP action along with the existing DI action for
each group in a policy. The following CLI commands block brute force attack
object—HTTP Brute Force Login Attempt or HTTP Brute Force Search for 45
seconds. All other attacks in the HIGH:HTTP:ANOM attack group are configured
with a DI action of close.
In this release of ScreenOS, S2C HTTP protocol decoding is performed only if you
configure server-to-client signature attacks. HTTP:Brute-Force, a server-to-client
anomaly attack is detected if you configure an HTTP server-to-client signature
attack in the policy. In the following example, HTTP:HIGH:SIGS has server-to-client
signature attacks, so add HTTP:HIGH:SIGS along with HTTP:HIGH:ANOM in a policy.
CLI
device>get attack group HIGH:HTTP:ANOM
GROUP "HIGH:HTTP:ANOM" is pre-defined. It has the following members
ID Name
1674 HTTP:INVALID:INVLD-AUTH-CHAR
1675 HTTP:INVALID:INVLD-AUTH-LEN
1711 HTTP:OVERFLOW:HEADER
1713 HTTP:OVERFLOW:INV-CHUNK-LEN
1717 HTTP:OVERFLOW:AUTH-OVFLW
5394 HTTP:EXPLOIT:BRUTE-FORCE
5395 HTTP:EXPLOIT:BRUTE-SEARCH
device> set policy id 1 from Untrust to DMZ Any Any Any permit attack
MEDIUM:HTTP:ANOM action none
device> set policy id 1 from Untrust to DMZ Any Any Any permit attack
MEDIUM:HTTP:HIGH:SIGS action none
device> set policy id 1
device(policy:1)-> set attack HIGH:HTTP:ANOM action close ip-action block
target dst-ip timeout 45
If the configured attack group does not have any brute force attack protocol
anomalies, IP action is not enforced.
Example 2
In this example, you associate an IP action for each attack group for a configured
amount of time from a specified host.
set policy id 1 from trust to untrust any any any permit attack HIGH:POP3:ANOM
action close ip-action notify target serv timeout 60
Example 3
In this example, the default threshold value of FTP brute force login attempt is 8
attempts per minute. If a user at IP address 192.168.2.2 is launching a FTP brute
force login attempt to FTP server at 10.150.50.5 in order to figure out a user
account name and password, the attempt is detected when the attacker makes 8
FTP login attempts within a minute.
If an IP action is configured to “Block” for 120 seconds for target of “serv”, any
traffic coming from 192.168.2.2 (src IP) to 10.150.50.5 (dst IP) over TCP (protocol)
port 21 (dst port) is blocked for 120 seconds.
Note that some IP action targets may affect traffic matching another policy.
Attack Logging
You can enable the logging of detected attacks per attack group per policy. In other
words, within the same policy, you can apply multiple attack groups and selectively
enable the logging of detected attacks for just some of them.
By default, logging is enabled. You might want to disable logging for attacks that are
lower priority for you and about which you do not give much attention. Disabling
logging for such attacks helps prevent the event log from becoming cluttered with
entries that you do not plan to look at anyway.
HIGH:IMAP:ANOM
HIGH:IMAP:SIGS
MEDIUM:IMAP:ANOM
LOW:IMAP:ANOM
INFO:IMAP:ANOM
The policy applies to IMAP traffic from all hosts in the Trust zone to a mail server
named “mail1” in the DMZ. If any of the predefined IMAP attack objects in the
above five groups match an attack, the security device closes the connection.
However, it only creates log entries for detected attacks matching attack objects in
the first two groups.
WebUI
1. Address
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Zone: DMZ
2. Policy
Policies > (From: Trust, To: DMZ) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), mail1
Service: IMAP
Action: Permit
> Click Deep Inspection, enter the following, click Add to enter each
attack object group, then click OK to return to the basic policy
configuration page:
Group: HIGH:IMAP:ANOM
Action: Close
Log: (select)
Group: HIGH:IMAP:SIGS
Action: Close
Log: (select)
Group: MEDIUM:IMAP:ANOM
Action: Close
Log: (clear)
Group: LOW:IMAP:ANOM
Action: Close
Log: (clear)
Group: INFO:IMAP:ANOM
Action: Close
Log: (clear)
CLI
1. Address
set address dmz mail1 1.2.2.10/32
2. Policy
device-> set policy id 1 from trust to dmz any mail1 imap permit attack
HIGH:IMAP:ANOM action close
device-> set policy id 1
device(policy:1)-> set attack HIGH:IMAP:SIGS action close
device(policy:1)-> set attack MEDIUM:IMAP:ANOM action close
device(policy:1)-> unset attack MEDIUM:IMAP:ANOM logging
device(policy:1)-> set attack LOW:IMAP:ANOM action close
device(policy:1)-> unset attack LOW:IMAP:ANOM logging
device(policy:1)-> set attack INFO:IMAP:ANOM action close
device(policy:1)-> unset attack INFO:IMAP:ANOM logging
device(policy:1)-> exit
device-> save
set policy id 1 from untrust to trust any ftp-srv1 custom-ftp permit attack
CRITICAL:FTP:SIGS action close-server
However, the DI module checks for CRITICAL:FTP attacks on port 21, which is not in use.
To avoid this problem, you must inform the DI module that the FTP application is
running on port 2121 (see Figure 53). Essentially, you must map the protocol in the
Application Layer to a specific port number in the Transport Layer. You can do this
binding at the policy level:
When you map the FTP application to the custom service “custom-ftp” and
configure DI to examine FTP traffic for the attacks defined in the
CRITICAL:FTP:SIGS attack object group in a policy that references custom-ftp, the
DI module perform its inspection on port 2121.
set policy id 1 from untrust to trust any ftp-srv1 custom-ftp permit attack
CRITICAL:FTP:SIGS action close-server
set policy id 1 application ftp
CRITICAL:HTTP:ANOM, CRITICAL:HTTP:SIGS
HIGH:HTTP:ANOM, HIGH:HTTP:SIGS
MEDIUM:HTTP:ANOM, MEDIUM:HTTP:SIGS
WebUI
1. Custom Service
Policy > Policy Elements > Services > Custom > New: Enter the following,
then click OK:
3. Policy
Policies > (From: Untrust, To: DMZ) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), server1
Service: HTTP1
Application: HTTP
Action: Permit
> Click Deep Inspection, enter the following, click Add to enter each
attack object group, then click OK to return to the basic policy
configuration page:
Group: CRITICAL:HTTP:ANOM
Action: Close Server
Log: (select)
Group: CRITICAL:HTTP:SIGS
Action: Close Server
Log: (select)
Group: HIGH:HTTP:ANOM
Action: Close Server
Log: (select)
Group: HIGH:HTTP:SIGS
Action: Close Server
Log: (select)
Group: MEDIUM:HTTP:ANOM
Action: Close Server
Log: (select)
Group: MEDIUM:HTTP:SIGS
Action: Close Server
Log: (select)
CLI
1. Custom Service
set service HTTP1 protocol tcp src-port 0-65535 dst-port 8080-8080
2. Address
set address dmz server1 1.2.2.5/32
3. Policy
device-> set policy id 1 from untrust to dmz any server1 HTTP1 permit attack
CRITICAL:HTTP:ANOM action close-server
device-> set policy id 1
device(policy:1)-> set attack CRITICAL:HTTP:SIGS action close-server
device(policy:1)-> set attack HIGH:HTTP:ANOM action close-server
device(policy:1)-> set attack HIGH:HTTP:SIGS action close-server
device(policy:1)-> set attack MEDIUM:HTTP:ANOM action close-server
device(policy:1)-> set attack MEDIUM:HTTP:SIGS action close-server
device(policy:1)-> exit
device-> set policy id 1 application http
save
In this example, you associate traffic using the nonstandard port of 8000 with HTTP
to detect the above attacks.
NOTE: In general, if you are running some services using nonstandard port numbers in
your network and you want the DI engine to scan that traffic, you must associate
the nonstandard port number to the service.
WebUI
1. Custom Service
Policy > Policy Elements > Services > Custom > New: Enter the following,
then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: HTTP2
Application: HTTP
Action: Permit
> Click Deep Inspection, enter the following, click Add to enter each
attack object group, then click OK to return to the basic policy
configuration page:
Group: CRITICAL:HTTP:SIGS
Action: Close
Log: (select)
Group: MEDIUM:DOS:SIGS
Action: Close
Log: (select)
CLI
1. Custom Service
set service HTTP2 protocol tcp src-port 0-65535 dst-port 8000-8000
2. Policy
device-> set policy id 1 from untrust to dmz any any HTTP2 permit attack
CRITICAL:HTTP:SIGS action close
device-> set policy id 1
device(policy:1)-> set attack MEDIUM:DOS:SIGS action close
device(policy:1)-> exit
device-> set policy id 1 application http
save
Name the attack object. (All user-defined attack objects must begin with “CS:”.)
Set the context for the DI search. (For a complete list of all the contexts that you
can use when creating attack objects, see “Contexts for User-Defined
Signatures” on page A-I.)
Define the signature. (“Regular Expressions” on page 158 examines the regular
expressions that you can use when defining signatures.)
Assign the attack object a severity level. (For information about severity levels,
see “Changing Severity Levels” on page 136.)
You must then put a user-defined attack object in a user-defined attack object group
for use in policies.
NOTE: A user-defined attack object group can only contain user-defined attack objects.
You cannot mix predefined and user-defined attack objects in the same attack
object group.
Regular Expressions
When entering the text string for a signature, you can enter an alphanumeric string
of ordinary characters to search for an exact character-to-character match, or you
can use regular expressions to broaden the search for possible matches to sets of
characters. ScreenOS supports the following regular expressions as shown in
Table 14.
Group expressions ()
1.Octal is a base-8 number system that uses only the digits 0–7.
2. Hexadecimal is a base-16 number system that uses digits 0–9 as usual, and then the letters A–F representing hexadecimal
digits with decimal values of 10–15.
You then organize them into a user-defined attack object group named “DMZ DI”,
which you reference in a policy permitting traffic from the Untrust zone to the
servers in the DMZ zone.
WebUI
1. Attack Object 1: ftp-stor
Security > Deep Inspection> Attacks > Custom > New: Enter the following,
then click OK:
Select cs:ftp-stor and use the << button to move the address from the
Selected Members column to the Selected Members column.
Select cs:ftp-user-dm and use the << button to move the address from
the Available Members column to the Selected Members column.
Select cs:url-index and use the << button to move the address from the
Available Members column to the Selected Members column.
Select cs:spammer and use the << button to move the address from the
Available Members column to the Selected Members column.
6. Policy
Policies > (From: Untrust, To: DMZ) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: HTTP
> Click Multiple, select FTP, then click OK to return to the basic policy
configuration page.
Action: Permit
> Click Deep Inspection, enter the following, click Add to enter each
attack object group, then click OK to return to the basic policy
configuration page:
Group: CS:DMZ DI
Action: Close Server
Log: (select)
CLI
1. Attack Object 1: ftp-stor
set attack cs:ftp-stor ftp-command STOR severity medium
2. Attack Object 2: ftp-user-dm
set attack cs:ftp-user-dm ftp-username dmartin severity low
3. Attack Object 3: url-index
set attack cs:url-index http-url-parsed index.html severity high
4. Attack Object 4: spammer
set attack cs:spammer smtp-from .*@spam.com severity info
5. Attack Object Group
set attack group “CS:DMZ DI”
set attack group “CS:DMZ DI” add cs:ftp-stor
set attack group “CS:DMZ DI” add cs:ftp-user-dm
set attack group “CS:DMZ DI” add cs:url-index
set attack group “CS:DMZ DI” add cs:spammer
6. Policy
set policy id 1 from untrust to dmz any any http permit attack “CS:DMZ DI” action
close-server
set policy id 1
device(policy:1)-> set service ftp
device(policy:1)-> exit
save
NOTE: You can define TCP stream signatures on NetScreen-5000 series systems only.
Because there are no predefined TCP stream signature attack objects, you must
define them. When creating a signature attack object, you define the following
components:
Attack object name (All user-defined attack objects must begin with “CS:”.)
Pattern definition
Severity level
WebUI
1. Stream Signature Attack Object
Security > Deep Inspection > Attacks > Custom > New: Enter the following,
then click OK:
Select CS:A1 in the Available Members column and then click << to move
it to the Selected Members column.
3. Policy
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: ANY
Action: Permit
> Click Deep Inspection, enter the following, click Add to enter each
attack object group; and then click OK to return to the basic policy
configuration page:
Group: CS:Gr1
Action: Close Client
Log: (select)
CLI
1. Stream Signature Attack Object
set attack “CS:A1” stream “.*satori.*” severity critical
2. Stream Signature Attack Group
set attack group “CS:Gr1”
set attack group “CS:Gr1” add “CS:A1”
3. Policy
set policy from trust to untrust any any any permit attack CS:Gr1 action close-client
save
NOTE: For a complete list of all configurable parameters, see the di command in
ScreenOS CLI Reference Guide: IPv4 Command Descriptions.
For the following parameters, you set lower values to detect anomalous behavior
that the security device missed with the default settings:
WebUI
Security > Deep Inspection> Service Limits: Enter the following, then click
Apply:
CLI
set di service smb failed_logins 10
set di service gnutella max_ttl_hops 10
set di service aim max_flap_length 5000
set di service aim max_oft_frame 5000
save
Negation
Typically, you use attack objects to match patterns that are indicative of malicious or
anomalous activity. However, you can also use them to match patterns indicative of
benign or legitimate activity. WIth this approach, something is amiss only if a type
of traffic does not match a particular pattern. To use attack objects in this way, you
apply the concept of negation.
A useful application of attack object negation would be to block all login attempts
other than those with the correct username and password. It would be difficult to
define all invalid usernames and passwords, but quite easy to define the correct
ones and then apply negation to reverse what the security device considers an
attack; that is, everything except the specified attack object.
The FTP server is at 1.2.2.5 in the DMZ zone. Its address name is ftp1.
You apply DI on FTP traffic to the server from all hosts in the Untrust and Trust
zones.
Name: CS:FTP1_USR_OK
164 Negation
Chapter 5: Deep Inspection
Negation: enabled
Context: ftp-username
Pattern: admin1
Severity: high
Name: CS:FTP1_PASS_OK
Negation: enabled
Context: ftp-password
Pattern: pass1
Severity: high
You then put both objects into an attack object group named CS:FTP1_LOGIN and
reference that attack object group in two policies permitting FTP traffic from the
Trust and Untrust zones to ftp1 in the DMZ.
ethernet2
ethernet3 1.2.2.1/24
1.1.1.1/24 DMZ
FTP Server
“ftp1”
1.2.2.5
LAN
ethernet1
10.1.1.1/24
Trust
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Negation 165
Concepts & Examples ScreenOS Reference Guide
NOTE: By default, any interface that you bind to the Trust zone is in NAT mode.
Consequently, this option is already enabled for interfaces bound to the Trust
zone.
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
166 Negation
Chapter 5: Deep Inspection
Select CS:FTP1_USR_OK and use the << button to move the address
from the Available Members column to the Selected Members column.
Select CS:FTP1_PASS_OK and use the << button to move the address
from the Available Members column to the Selected Members column.
6. Route
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), ftp1
Service: FTP
Action: Permit
> Click Deep Inspection, enter the following, click Add to enter each
attack object group; and then click OK to return to the basic policy
configuration page:
Group: CS:FTP1_LOGIN
Action: Drop
Log: (select)
Policies > (From: Trust, To: DMZ) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), ftp1
Service: FTP
Action: Permit
> Click Deep Inspection, enter the following, click Add to enter each
attack object group, then click OK to return to the basic policy
configuration page:
Group: CS:FTP1_LOGIN
Action: Drop
Log: (select)
Negation 167
Concepts & Examples ScreenOS Reference Guide
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet2 zone dmz
set interface ethernet2 ip 1.2.2.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Address
set address dmz ftp1 1.2.2.5/32
3. Attack Objects
set attack CS:FTP1_USR_OK ftp-username not admin1 severity high
set attack CS:FTP1_PASS_OK ftp-password not pass1 severity high
set attack group CS:FTP1_LOGIN
set attack group CS:FTP1_LOGIN add CS:FTP1_USR_OK
set attack group CS:FTP1_LOGIN add CS:FTP1_PASS_OK
4. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
5. Policies
set policy from untrust to dmz any ftp1 ftp permit attack CS:FTP1_LOGIN action
drop
set policy from trust to dmz any ftp1 ftp permit attack CS:FTP1_LOGIN action drop
save
When you enable the blocking of one or more of these components in a security
zone, the security device examines every HTTP header that arrives at an interface
bound to that zone. It checks if the content type listed in the header indicates that
any of the targeted components are in the packet payload. If the content type is
Java, .exe, or .zip and you have configured the security device to block those HTTP
component types, the device blocks the packet. If the content type lists only “octet
stream” instead of a specific component type, then the device examines the file
type in the payload. If the file type is Java, .exe, or .zip and you have configured the
device to block those component types, the device blocks the packet.
When you enable the blocking of ActiveX controls, the device blocks all HTTP
packets containing any type of HTTP component in its payload—ActiveX controls,
Java applets, .exe files, or .zip files.
NOTE: When ActiveX-blocking is enabled, the security device blocks Java applets, .exe
files, and .zip files whether or not they are contained within an ActiveX control.
ActiveX Controls
Microsoft ActiveX technology provides a tool for web designers to create dynamic
and interactive web pages. ActiveX controls are components that allow different
programs to interact with each other. For example, ActiveX allows your browser to
open a spreadsheet or display your personal account from a backend database.
ActiveX components might also contain other components such as Java applets, or
files such as .exe and .zip files.
When you visit an ActiveX-enabled website, the site prompts you to download
ActiveX controls to your computer. Microsoft provides a pop-up message displaying
the name of the company or programmer who authenticated the ActiveX code that
is offered for download. If you trust the source of the code, you can proceed to
download the controls. If you distrust the source, you can refuse them.
If you download an ActiveX control to your computer, it can then do whatever its
creator designed it to do. If it is malicious code, it can now reformat your hard drive,
delete all your files, send all your personal email to your boss, and so on.
Java Applets
Serving a similar purpose as ActiveX, Java applets also increase the functionality of
web pages by allowing them to interact with other programs. You download Java
applets to a Java Virtual Machine (VM) on your computer. In the initial version of
Java, the VM did not allow the applets to interact with other resources on your
computer. Starting with Java 1.1, some of these restrictions were relaxed to provide
greater functionality. As a result, Java applets can now access local resources
outside the VM. Because an attacker can program Java applets to operate outside
the VM, they pose the same security threat as ActiveX controls do.
EXE Files
If you download and run an executable file (that is, a file with a .exe extension)
obtained off the Web, you cannot guarantee that the file is uncontaminated. Even if
you trust the site from which you downloaded it, it is possible that somebody
sniffing download requests from that site has intercepted your request and
responded with a doctored .exe file that contains malicious code.
ZIP Files
A zip file (that is, a file with a .zip extension) is a type of file containing one or more
compressed files. The danger of downloading a .exe file presented in the previous
section about .exe files applies to .zip files, because a .zip file can contain one or
more .exe files.
WebUI
Screening > Screen (Zone: Untrust): Select Block Java Component and Block
EXE Component, then click Apply.
CLI
set zone untrust screen component-block jar
set zone untrust screen component-block exe
save
Juniper Networks Intrusion Detection and Prevention (IDP) technology can detect
and then stop attacks when deployed inline to your network. Unlike an IPS alone,
IDP uses multiple methods to detect attacks against your network and prevent
attackers from gaining access and doing damage. IDP can drop malicious packets or
connections before the attacks can enter your network. It is designed to reduce
false positives and ensure that only actual malicious traffic is detected and stopped.
You can also deploy IDP as a passive sniffer, similar to a traditional IPS but with
greater accuracy and manageability.
171
Concepts & Examples ScreenOS Reference Guide
If you purchased a security device with only firewall or virtual private network
(VPN) capabilities, you can upgrade the device to an IDP-capable system by
performing the following steps:
NOTE: Installing the IDP license key disables the ScreenOS deep inspection (DI) feature.
See the ISG 2000 Field Upgrade Guide and the NetScreen-ISG 1000 Field Upgrade
Guide for instructions on how to upgrade the devices to include IDP capabilities.
You can use the IDP-capable security device as a fully integrated firewall/VPN/IDP
security system that not only screens traffic between the Internet and your private
network but also provides application-level security. You can also use this device as
a standalone IDP system to protect critical segments of your private network. For
more information, see “Configuring the Device as a Standalone IDP Device” on
page 229.
Traffic Flow
PW R A LA R M TEM
P S TA T U S H A
Security module
FA N M O 1D M O 2D M O 3D F LA S H
ISG 2000
Security module
Juniper Networks
security device
Security module
Each security module, consisting of a dual processor, maintains its own session
table. The dual CPU allows each security module to run two instances of IDP per
module. The get sm status command shows the dual CPU for each security module
(see page 177).
The Inline-tap mode configuration enables the IDP security modules to monitor
traffic passively. In Inline-tap mode, an internal tap sends a copy of every packet in
the traffic flow to the security module for IDP processing; at the same time, the
ASIC module performs Firewall/VPN processing on the inline traffic.
If an attack object is detected, TCP reset occurs with “close” option to clear the
session table. For each attack that matches a rule, you can choose to ignore, drop, or
close the current attacking packets or connection. For more information about the
action to perform when an attack object is found, see “Defining Actions” on
page 196.
NOTE: The security module inspects traffic within IPSec tunnels that use Null
encryption method. It does not inspect the traffic that uses any other encryption.
For more information about configuring this feature in the security module using
NSM, see the NetScreen-Security Manager Administrator's Guide.
When the PPU passes the IPSec ESP tunneled packet that uses Null-encryption
method to the IDP security device, the IDP security device checks if ESP-NULL
encrypted packet inspection feature is enabled. If the feature is enabled, IDP
performs packet sanity test and ESP-NULL packet check on the ESP-NULL packet. If
the packet does not conform to either of the tests, the security device drops the
packet. If the packet passes both the tests, IDP decapsulates the payload data of the
original IP ESP-NULL packet. It then checks if a session already exists for the
decapsulated data. If a session does not exist, it creates a session for the
decapsulated packet based on the decapsulated packet data header. The IDP device
then passes the packet to the IDP engine for inspection.
IDP limits the total number of internal sessions that is generated for the ESP-NULL
encrypted traffic. By default, the maximum value is set to 20000 sessions and the
user can define a value up to 40000 sessions. If the maximum session limit is
reached the IDP bypasses the packet without inspection and will generate an event
log.
NOTE: IDP supports inspection of both transparent mode and tunnel mode
ESP-NULL encrypted traffic. The transport mode is not supported currently.
For Tunnel mode ESP, IDP uses the new IP packet header's source IP address,
destination IP address, internal payload data's protocol id, source port and
destination port for policy look up.
IDP follows the normal packet processing on the decapsulated ESP-NULL packets.
But when an attack happens, IDP drops the corresponding internal session and
does not forward it to the outer session. Table 16 explains the actions taken by the
ESP-NULL encrypted traffic against the actions taken by the normal traffic for the
rule actions defined by the IDP.
When attacks happen on the ESP-NULL traffic, appropriate actions are taken on the
internal sessions based on the rule actions as explained in the Table 2. When there
are no attack objects, the traffic passes through the IDP successfully.
Preconfiguration Tasks
Before you start configuring IDP on the device, you need to ensure the following:
NOTE: Although you can perform basic device configuration using the ScreenOS CLI or
WebUI, you need NSM to configure and manage IDP on the security device.
You have a security policy for the device. You can use the default security policy
provided in NetScreen-Security Manager, or you can create a custom security
policy for the firewall/VPN functions on the device.
NOTE: You cannot use the DSCP marking feature if you have enabled IDP on the security
device. The DSCP marking feature is disabled in IDP-capable security devices.
2. Add the network components that you want IDP to protect using the CLI,
WebUI, or NetScreen-Security Manager UI.
Internet
PW R A LA R M TEM
P S TA T U S H A
FA N M O 1D M O 2D M O 3D F LA S H
ISG 2000
FTP-Srv1
3. Enable IDP (the default is inline mode) in the appropriate firewall rule for the
device.
This step can be performed using the CLI or NetScreen-Security Manager UI.
The CLI commands are shown below (to configure using NSM, see “Enabling
IDP in Firewall Rules” on page 186):
Make sure you have a security policy for the device. You can use the default
security policy; or, if the device is deployed as an integrated firewall/VPN/IDP
device, you can create a custom security policy for the firewall/VPN functions
on the device. For more information, see “Configuring Security Policies” on
page 183. For more information about configuring security polices using NSM,
see the NetScreen-Security Manager Administrator’s Guide.
To import the device, right-click on the device that you added, then select
Import device. Importing the device copies the security-policy information
from the device to the NSM server so that the device can be managed. The
imported policy is displayed in NSM under Security Policy.
For more information about adding and configuring devices using NSM, see the
NetScreen-Security Manager Administrator’s Guide. Other configuration settings
include operational mode, administrative password, zone interface
assignments, and default route configurations.
7. Add and configure IDP rules in the security policy for the device.
You configure a security policy on the device to include IDP rules. When you
update the configuration on the device, the entire security policy, including IDP
rule additions or changes, is installed on the device. For more information
about enabling and configuring IDP rules, see “Configuring IDP Rules” on
page 188.
NOTE: If you are using the device as a standalone IDP system, you need to configure a
simple firewall rule that directs all traffic to be checked against the IDP rules. For
more information, see “Configuring the Device as a Standalone IDP Device” on
page 229.
9. Allow traffic to flow and view the IDP sessions with the following command:
device->get sm status
SM CPU aval ena Sess_cnt
1 1 1 10 Security module 1
2 1 1 8
3 0 1 0 Security module 2
4 0 1 0
5 0 1 0 Security module 3
6 0 1 0
The above command shows one security module (SM1 and SM2) installed in
the device. The CPU column indicates that security modules 2 and 3 are not
installed in the device. The status on the two CPUs on each security module is
displayed in separate rows.
The management module in the device processes the traffic and then forwards
it for IDP inspection to the security modules. The traffic is load-balanced
between the two CPUs in the security module (see the Sess_Cnt column). If
your device has more than one security module, then the management module
load-balances the traffic between the security modules.
NOTE: When you have more than one security module installed in the device and one
module fails, then the IDP sessions are automatically transferred to the next
security module.
Untrust Zone
PW R
FA N
A LA R M
M O 1D
TEM
P
M O 2D
S TA T U S
M O 3D
H A
F LA S H
ISG 2000
Trust Zone
Internet Device B
PW R
FA N
A LA R M
M O 1D
TEM
P
M O 2D
S TA T U S
M O 3D
H A
F LA S H
ISG 2000
FTP-Srv1
Active/Passive Failover
Device A (master)
VSD ID 0
Device B (backup)
1. Configure Device A and Device B for IDP as described in “Example 1: Basic IDP
Configuration” on page 176.
2. To ensure continuous traffic flow, cable and configure two security devices in a
redundant cluster with Device A acting as a primary device and Device B acting
as its backup.
Cable e1/x on Device A to e1/x on Device B. Similarly cable the e2/x interfaces.
For more information about cabling the two devices together, setting up
managed IP addresses to manage a backup device, or removing other potential
points of failure by setting up redundant switches on either side of the HA pair,
see Volume 11: High Availability.
Specify the zones with HA interfaces. Bind e1/x and e2/x to the HA zone. Set
manage IP addresses for the Trust zone interfaces on both devices.
Assign each device to NSRP cluster ID 0. When the devices become members
of the NSRP cluster, the IP addresses of their physical interfaces automatically
become the IP addresses of the Virtual Security Interfaces (VSIs) for Virtual
Security Device (VSD) group ID 0. Each VSD member has a default priority of
100. The device with the higher unit ID becomes the VSD group’s primary
device. For more information about VSDs, see Volume 11: High Availability.
For example, enter the following on each of the devices to configure an NSRP
cluster:
Upon initial NSRP configuration, the VSD group members with the priority
number closest to 0 becomes the primary device. (The default is 100.) If Device
A and B have the same priority value, the device with the highest MAC address
becomes primary device.
The primary device propagates all its network and configuration settings and
the current session information to the backup device. Although the backup
device is passive, it is maintaining its synchronization with the information it
receives from the primary device. If the primary device fails, the backup device
is promoted to primary and takes over the traffic processing.
NOTE: Synchronization is maintained for firewall sessions only. Stateful failover does not
occur for IDP sessions.
Untrust Zone
Trust Zone
P W R A LA R M T E MP S TA T U S HA
FA N M O 1D M O 2D M O 3D F LA S H
ISG 2000
Internet Device B
P W R A LA R M
FA N
T E MP S TA T U S
M O 1D M O 2D M O 3D F LA S H
HA
ISG 2000
FTP-Srv1
Active/Active Failover
Device A (master)
VSD ID 0
Device B (backup)
Device A (backup)
VSD ID 1
Device B (master)
NOTE: We recommend that the same number of security modules be installed on both
devices.
1. Configure Device A and Device B for IDP as described in “Example 1: Basic IDP
Configuration” on page 176.
2. To ensure continuous traffic flow, cable and configure two security devices in a
redundant cluster.
Cable e1/x on Device A to e1/x on Device B. Similarly cable the e2/x interfaces.
For more information about how to cable the two devices together, setting up
managed IP addresses to manage a backup device, or to remove other potential
points of failure by setting up redundant switches on either side of the HA pair,
see Volume 11: High Availability.
Specify the zones with HA interfaces. Bind e1/x and e2/x to the HA zone. Set
manage IP addresses for the trust zone interfaces on both devices.
Devices A and B are members of the same NSRP cluster and VSD group 0. For
Active/Active failover, create a second VSD group—group 1.
In both VSD groups, enable the preempt option on the primary device and set
the preempt hold-down time to 10 seconds. If both devices are active, Device A
is always the primary device of group 1 and Device B is always the primary
device of group 2.
Device A
set nsrp vsd-group id 0 priority 1
set nsrp vsd-group id 0 preempt hold-down 10
set nsrp vsd-group id 0 preempt
set nsrp vsd-group id 1
save
Device B
set nsrp vsd-group id 1 priority 1
set nsrp vsd-group id 1 preempt hold-down 10
set nsrp vsd-group id 1 preempt
save
For more information about creating two VSD groups, see Volume 11:
High Availability.
Devices A and B each receive 50 percent of the network and VPN traffic. When
Device A fails, Device B becomes the primary device of VSD group 1, as well as
continuing to be the primary device of VSD group 2, and handles 100 percent
of the traffic.
NOTE: Synchronization is maintained for firewall sessions only. Stateful failover does not
occur for IDP sessions.
This section describes the IDP, Exempt, and Backdoor rulebases. For more
information about Zone and Global firewall rulebases and the Multicast rulebase,
see the information about configuring security policies in the NetScreen-Security
Manager Administrator’s Guide.
NOTE: In the ScreenOS WebUI and CLI, a security policy is a single statement that defines
a source, destination, zone, direction, and service. In NetScreen-Security Manager,
those same statements are known as rules, and a security policy is a collection of
rules.
Disabling a rule
NOTE: The IDP, Exempt, and Backdoor rulebases are not included when you merge two
policies into a single policy.
For detailed information about managing your security policy, see the
NetScreen-Security Manager Administrator’s Guide.
IDP: This rulebase protects your network from attacks by using attack objects to
detect known and unknown attacks. Juniper Networks provides predefined
attack objects that you can use in IDP rules. You can also configure your own
custom attack objects. For more information, see “Configuring IDP Attack
Objects” on page 211.
NOTE: Juniper Networks regularly updates predefined attack objects to keep current with
newly discovered attacks. For more information about updating attack objects, see
“Managing IDP” on page 232.
Exempt: This rulebase works in conjunction with the IDP rulebase to prevent
unnecessary alarms from being generated. You configure rules in this rulebase
to exclude known false positives or to exclude a specific source, destination, or
source/destination pair from matching an IDP rule. If traffic matches a rule in
the IDP rulebase, IDP attempts to match the traffic against the Exempt rulebase
before performing the action specified.
The rules in all rulebases, including the Zone, Global, and Multicast rulebases,
combine to create a security policy. To direct the device to process and execute
rules in the IDP rulebases, you need to enable IDP in a firewall rule. See “Enabling
IDP in Firewall Rules” on page 186.
NOTE: If you import the device into NetScreen-Security Manager, the imported device
configuration does not include the IDP, Exempt, or Backdoor rulebases.
NOTE: You must create each object in the Address Object database. There are no default
address objects.
Service objects represent network services that use Transport layer protocols
such as TCP, UDP, RPC, and ICMP. You use service objects in rules to specify the
service an attack uses to access your network. NetScreen-Security Manager
includes predefined service objects, a database of service objects that are based
on industry-standard services. If you need to add service objects that are not
included in the predefined service objects, you can create custom service
objects. For more information about creating service objects, see the
NetScreen-Security Manager Administrator’s Guide.
IDP attack objects represent known and unknown attacks. IDP includes a
predefined attack object database that is periodically updated by Juniper
Networks (see “Managing IDP” on page 232). You can also add custom attack
objects to detect attacks that are unique to your network (see “Configuring IDP
Attack Objects” on page 211.)
Copy an existing security policy into a new policy, which you can then modify.
A template is a set of rules of a specific rulebase type that you can use as a starting
point when creating a security policy. For a list of templates, see the
NetScreen-Security Manager Administrator’s Guide.
1. Zone-based firewall
2. Global firewall
3. Multicast
4. IDP
5. Exempt
6. Backdoor
Enabling IDP in a zone-based or global firewall rule directs traffic that matches the
firewall rule to be checked against the IDP rulebases.
NOTE: The firewall action must be permit. You cannot enable IDP for traffic that the
device denies or rejects.
To enable IDP in a firewall rule, right-click in the Rule Options column for the
zone-based or global firewall rule, then select DI Profile/Enable IDP. The DI
Profile/Enable IDP dialog box appears, as shown in Figure 60.
NOTE: These attack-profile settings apply only to the Deep Inspection (DI) feature on
firewall/VPN devices. When you install the IDP license on the device, DI is disabled
on the device.
Enabling IDP
By default, the IDP option is disabled. Select Enable to enable IDP for traffic that
matches the firewall rule. When you enable IDP, you can also select whether the IDP
function is to operate inline or in inline tap mode on the device on which the
security policy is installed.
NOTE: If you do not enable IDP in a firewall rule for a target device, you can still configure
IDP rules for the device. However, you will not be able to apply the IDP rules when
you update the security policy on the device.
In inline mode, IDP is directly in the path of traffic on your network and can
detect and block attacks. For example, you can deploy the security device with
integrated firewall/VPN/IDP capabilities between the Internet and an enterprise
LAN, WAN, or special zone such as the DMZ. This is the default mode.
In inline tap mode, IDP receives a copy of a packet while the original packet is
forwarded on the network. IDP examines the copy of the packet and flags any
potential problems. IDP’s inspection of packets does not affect the forwarding
of the packet on the network.
NOTE: You must deploy the IDP-capable device inline. You cannot connect a device that
is in inline tap mode to an external TAP or SPAN port on a switch.
You specify the IDP mode as part of the security policy for the device.
When you create an IDP rule, you must specify the following:
The type of network traffic you want IDP to monitor for attacks, using the
following characteristics:
From Zone/To Zone: All traffic flows from a source to a destination zone.
You can select any zone for the source or destination; however, the zone
must be valid for the security devices you select in the Install On column of
the rule. You can also use zone exceptions to specify unique to and from
zones for each device.
Source IP: The source IP address from which the network traffic originates.
You can set this to “any” to monitor network traffic originating from any IP
address. You can also specify “negate” to specify all sources except the
specified addresses.
See Figure 70, “Set Terminal Rules,” on page 196. Note that, if you check
Terminate Match, rules below the Terminate Match Rule (Rule Shadowing)
are not evaluated.
The attack(s) you want IDP to match in the monitored network traffic. Each
attack is defined as an attack object, which represents a known pattern of
attack. Whenever this known pattern of attack is encountered in the monitored
network traffic, the attack object is matched. You can add attack objects
individually or by category, operating system, or severity.
The action you want IDP to take when the monitored traffic matches the rule’s
attack objects. You can specify the following:
Action: The action you want IDP to perform against the current
connection.
IP Actions: The action you want IDP to perform against future connections
that use the same IP address.
Severity: Use the default severity settings of the selected attack objects, or
choose a specific severity for your rule.
NOTE: The ISG 1000 and ISG 2000 devices with IDP can inspect traffic that is
encapsulated in GPRS tunneling protocol (GTP) and generic routing encapsulation
(GRE).
IP
For more information about how IDP inspects GRE and GTP packets, see the
Netscreen-Security Manager Administrator's Guide.
1. In the main navigation tree, select Security Policies. Open a security policy
either by double-clicking on the policy name in the Security Policy window or
by clicking on the policy name and then selecting the Edit icon.
2. Click the Add icon in the upper right corner of the Security Policy window, then
select Add IDP Rulebase. See Figure 61.
3. To configure an IDP rule, click the Add icon on the left side of the Security Policy
window.
A default IDP rule appears. You can modify this rule as needed. See Figure 63.
Matching Traffic
When creating your IDP rules, you must specify the type of network traffic that you
want IDP to monitor for attacks. These characteristics include the network
components that originate and receive the traffic and the firewall zones the traffic
passes through.
The Match columns From Zone, Source, To Zone, Destination, and Service are
required for all rules in the IDP rulebase. The Terminate Match selection allows you
to designate a rule as terminal; if IDP encounters a match for the other Match
columns in a terminal rule, no other rules in the rulebase are examined. The
matching traffic does not need to match the attacks specified in a terminal rule. (For
more information, see “Terminal Rules” on page 195.)
NOTE: You can create custom zones for some security devices. The list of zones from
which you can select source and destination zones includes the predefined and
custom zones that have been configured for all devices managed by
NetScreen-Security Manager. Therefore, you should only select zones that are
applicable for the device on which you will install the security policy.
You can create address objects either before you create an IDP rule (see the
NetScreen-Security Manager Administrator’s Guide) or while creating or editing an
IDP rule. To select or configure an address object, right-click on either the Source or
the Destination column of a rule, then select Select Address. In the Select Source
Addresses dialog box, you can either select an already created address object or
click the Add icon to create a new host, network, or group object.
The more specific you are in defining the source and destination of an attack, the
more you reduce false positives.
Services
Services are Application Layer protocols that define how data is structured as it
travels across the network. Because the services you support on your network are
the same services that attackers must use to attack your network, you can specify
which services are supported by the destination IP to make your rule more efficient.
NOTE: All services rely on a Transport Layer protocol to transmit data. IDP includes
services that use the TCP, UDP, RPC, and ICMP Transport Layer protocols.
In the Service column, you select the service of the traffic you want IDP to match:
Select Default to accept the service specified by the attack object you select in
the Attacks column. When you select an attack object in the Attack column, the
service associated with that attack object becomes the default service for the
rule. To see the exact service, view the attack object details.
Select Select Service to choose specific services from the list of defined service
objects.
If you are supporting services on nonstandard ports, you should choose a service
other than the default.
Add this service object to your rule, then add several HTTP attack objects, which
have a default service of TCP/80. IDP uses the specified service, HTTP-8080, instead
of the default and looks for matches to the HTTP attacks in TCP traffic on port 8080.
You can create your own service objects to use in rules, such as service objects for
protocols that use nonstandard ports. However, you cannot match attack objects to
protocols they do not use.
Terminal Rules
The normal IDP rule-matching algorithm starts from the top of the rulebase and
checks traffic against all rules in the rulebase that match the source, destination,
and service. A terminal rule is an exception to this normal rule-matching algorithm.
When a match is discovered in a terminal rule for the source, destination, and
service, IDP does not continue to check subsequent rules for the same source,
destination, and service. It does not matter whether or not the traffic matches the
attack objects in the matching rule.
To set different actions for different attacks for the same Source and
Destination. This is illustrated by rules 3 and 6 in the following section,
“Example: Setting Terminal Rules”.
To disregard traffic that originates from a known trusted source. Typically, the
action is None for this type of terminal rule. This is illustrated by rule 1 in the
following section, “Example: Setting Terminal Rules”.
Use caution when defining terminal rules. An inappropriate terminal rule can leave
your network open to attacks. Remember that traffic matching the source,
destination, and service of a terminal rule is not compared to subsequent rules,
even if the traffic does not match an attack object in the terminal rule. Use a
terminal rule only when you want to examine a certain type of traffic for one
specific set of attack objects. Be particularly careful about terminal rules that use
“any” for both the source and destination.
Terminal rules should appear near the top of the rulebase before other rules that
would match the same traffic. You set a rule as terminal by selecting the box in the
Terminate Match column of the Security Policy window when you create or modify
the rule.
NOTE: In many cases, you can use an exempt rule instead of a terminal rule. You might
find it easier and more straightforward to configure an exempt rule than a
terminal rule. See “Configuring Exempt Rules” on page 202.
Rule 1 terminates the match algorithm if the source IP of the traffic originates
from the security network, a known trusted network. If this rule is matched,
IDP disregards traffic from the security network and does not continue
monitoring the session for malicious data.
Rules 3 and 6 set different actions for different attacks when the destination IP
is the Corporate or Europe email server. Rule 3 terminates the match algorithm
when the attack is an email that uses the SMTP context Confidential. Rule 6
closes the server when the attack is an SMTP attack.
Rule 4 terminates the match algorithm when the destination is the webserver
and the attack is a Critical or High HTTP attack. The rule ensures that IDP drops
the most important HTTP attacks against the webserver and does not continue
to match the connection.
Rule 5 terminates the match algorithm when the source is the internal network
and the attack is a critical, high, or medium trojan backdoor. The rule ensures
that IDP closes both the client and server and does not continue to match the
connection.
The default in the Service Column (see Figure 70 on page 196) means the rule is
dynamically built based on the service bindings of the attack objects of that rule. To
see the service bindings for a rule, right click on the attacks and select View
Services. Even if you select a broad category like HTTP Critical, use the View
Services for more details.
Defining Actions
You can specify which actions IDP is to take against attacks that match rules in your
security policy. For each attack that matches a rule, you can choose to ignore, drop,
or close the current attacking packets or connection. If the rule is triggered, IDP can
perform actions against the connection.
When IDP is configured for Drop Packet and finds a TCP attack, the security module
informs the management module that successive packets are attacks; consequently,
the IDP action is updated to a higher severity, Drop Connection.
If a packet triggers multiple rule actions, the device will apply the most severe
action. For example, if the rules dictate that a packet will receive a diffserv marking
and be dropped, then the packet will be dropped.
Table 17 shows the actions you can specify for IDP rules.
Action Description
None IDP inspects for attacks but IDP does not take action against the
connection. If a rule that contains None action is matched, the
corresponding log record displays "accept" in the action column of
the Log Viewer.
Ignore IDP does not inspect for attacks and ignores this connection.
Diffserv Marking Assigns the indicated service-differentiation value to packets in an
attack, then passes them on normally. Set the
service-differentiation value in the dialog box that appears when
you select this action in the rulebase.
Note that diffserv marking is not applied to the first packet that is
detected as an attack but is applied to subsequent packets. The
marking has no effect in tap mode or when using NSRP.
If there is a conflict in DSCP specified by the IDS rulebase and the
firewall policy, the setting in the IDS rulebase has priority.
Drop Packet IDP drops a matching packet before it can reach its destination but
does not close the connection. Use this action to drop packets for
attacks in traffic that is prone to spoofing, such as UDP traffic.
Closing a connection for such traffic could result in a denial of
service(Dos), which will prevent you from receiving traffic from
legitimate source IP addresses.
Drop Connection IDP drops all packets associated with the connection. Use this
action to drop connections for traffic that is not prone to spoofing.
Close Client and Server IDP closes the connection and sends an RST packet to both the
client and the server. If IDP is operating in inline tap mode, IDP
sends an RST packet to both the client and the server but does not
close the connection.
Close Client IDP closes the connection to the client but not to the server.
Close Server IDP closes the connection to the server but not to the client.
Recommended IDP takes the action recommended in individual attack objects. If
IDP detects multiple attacks in one packet and the rule action is
Recommended for all the attacks, IDP applies the most severe
action. For example, if two attacks match in the same packet and
have Drop Packet and Drop as their recommended actions,
respectively, Drop is applied.
Note: You cannot set Diffserv Marking as the recommended action.
Recommended actions in individual attack objects can be
overwritten by specifying explicit actions in policy rules. If you
specify an action within a policy rule, it will take precedence over
the recommended action. For more information about IDP rule
actions, see the NetScreen-Security Manager Administrator's Guide.
For more information about IDP Rule actions, see the NetScreen-Security Manager
Administrator’s Guide.
You can add attack objects to your rule individually or in groups. Attack objects are
organized as follows:
Attack List is an alphabetical list of all attack objects, including custom attack
objects.
To add attack objects for a rule, right-click the Attacks column of the rule, then select
Select Attacks. The Add Attacks dialog box appears.
For more information about attack objects and creating custom attack objects and
groups, see “Configuring IDP Attack Objects” on page 211.
If you do not want to choose an entire category group for a rule, you can select your
attack objects by severity.
If you do not want to choose an entire operating system group for a rule, you can
select your attack objects by severity.
NOTE: To protect critical address objects or popular targets for attack, such as your mail
server, use multiple severity levels to ensure maximum protection.
Table 18 shows the IDP severity levels, along with their recommended actions and
notifications.
Setting IP Action
The IP Action column appears only when you view the security policy in Expanded
mode. To change the security policy view from Compact to Expanded mode, select
View > Expanded Mode.
If the current network traffic matches a rule, IDP can perform an IP action against
future network traffic that uses the same IP address. IP actions are similar to other
actions; they direct IDP to drop or close the connection. However, because you now
also have the attacker’s IP address, you can choose to block the attacker for a
specified time. If attackers cannot immediately regain a connection to your
network, they might try to attack easier targets.
Use IP actions in conjunction with actions and logging to secure your network. In a
rule, first configure an action to detect and prevent current malicious connections
from reaching your address objects. Then, right-click in the IP Action column of the
rule and select Configure to bring up the Configure IP Action dialog box. Enable
and configure an IP action to prevent future malicious connections from the
attacker’s IP address.
Choosing an IP Action
For each IP action option, an IP action is generated by the IDP system. The IP
action instructs IDP to perform the specified task. Select from the following options:
IDP Notify. IDP does not take any action against future traffic, but logs the
event. This is the default.
IDP Drop. IDP drops blocks future connections that match the criteria in the
Blocking Options box.
IDP Close. IDP closes future connections that match the criteria in the Blocking
Options box.
Source, Destination, Destination Port and Protocol. IDP blocks future traffic
based on the source, destination, destination port, and protocol of the attack
traffic. This is the default.
Source. IDP blocks future traffic based on the source of the attack traffic.
Destination. IDP blocks future traffic based on the destination of the attack
traffic.
From Zone, Destination, Destination Port and Protocol. IDP blocks future
traffic based on the source zone, destination, destination port, and protocol of
the attack traffic.
From Zone. IDP blocks future traffic based on the source zone of the attack
traffic.
Setting Notification
The first time you design a security policy, you might be tempted to log all attacks
and let the policy run indefinitely. Do not do this! Some attack objects are
informational only, and others can generate false positives and redundant logs. If
you become overloaded with data, you can miss something important. Remember
that security policies that generate too many log records are hazardous to the
security of your network, as you might discover an attack too late or miss a security
breach entirely if you have to sift through hundreds of log records. Excessive logging
can also affect IDP throughput, performance, and available disk space. A good
security policy generates enough logs to fully document only the important security
events on a network.
Setting Logging
In the Configure Notification dialog box, select Logging, then click OK. Each time
the rule is matched, the IDP system creates a log record that appears in the Log
Viewer.
Logging an attack creates a log record that you can view in realtime in the Log
Viewer. For more critical attacks, you can also set an alert flag to appear in the log
record.
To log an attack for a rule, right-click the Notification column of the rule, then select
Configure. The Configure Notification dialog box appears.
Setting an Alert
In the Configure Notification dialog box, select Alert, then click OK. If Alert is
selected and the rule is matched, IDP places an alert flag in the Alert column of the
Log Viewer for the matching log record.
Logging Packets
You can record individual packets in network traffic that match a rule by capturing
the packet data for the attack. Viewing the packets used in an attack on your
network can help you determine the extent of the attempted attack and its purpose,
whether or not the attack was successful, and any possible damage to your
network.
NOTE: To improve IDP performance, log only the packets received after the attack.
If multiple rules with packet capture enabled match the same attack, IDP captures
the maximum specified number of packets. For example, you configure rule 1 to
capture 10 packets before and after the attack, and you configure rule 2 to capture 5
packets before and after the attack. If both rules match the same attack, IDP
attempts to capture 10 packets before and after the attack.
NOTE: Packet captures are restricted to 256 packets before and after an attack.
Setting Severity
The Severity column appears only when you view the security policy in Expanded
mode. To change the security policy view from Compact to Expanded mode, from
the menu bar, select View > Expanded Mode.
You can override the inherent severity for an attack in a rule within the IDP
rulebase. You can set the severity level to Default, Info, Warning, Minor, Major, or
Critical.
To change the severity for a rule, right-click the Severity column of the rule, then
select a severity.
Setting Targets
For each rule in the IDP rulebase, you can select the security device that will use
that rule to detect and prevent attacks. When you install the security policy to which
the rule belongs, the rule becomes active only on the device(s) you selected in the
Install On column of the rulebase.
Entering Comments
You can enter notations about the rule in the Comments column. The information
in the Comments column is not pushed to the target device(s). To enter a comment,
right-click on the Comments column, then select Edit Comments. The Edit
Comments dialog box appears. You can enter a comment of up to 1024 characters.
NOTE: If you delete the IDP rulebase, the Exempt rulebase is also deleted.
You might want to use an exempt rule under the following conditions:
When an IDP rule uses an attack object group that contains one or more attack
objects that produce false positives or irrelevant log records.
You can also use an exempt rule if the IDP rulebase uses static or dynamic
attack-object groups containing one or more attack objects that produce false
positives or irrelevant log records.
When you create an exempt rule, you must specify the following:
Source and destination for traffic you want to exempt. You can set the source or
destination to “any” to exempt network traffic originating from any source or
sent to any destination. You can also specify “negate” to specify all sources or
destinations except specified addresses.
The attack(s) you want IDP to exempt for the specified source/destination
addresses. You must include at least one attack object in an exempt rule.
NOTE: The Exempt rulebase is a nonterminal rulebase. That is, IDP attempts to match
traffic against all rules in the Exempt rulebase and executes all matches.
1. In the main navigation tree, select Security Policies. Open a security policy
either by double-clicking on the policy name in the Security Policies window, or
by clicking on the policy name, then selecting the Edit icon.
2. Click the Add icon in the upper right corner of the Security Policy window, then
select Add Exempt Rulebase.
3. To configure an exempt rule, click the Add icon on the left side of the Security
Policy window.
A default exempt rule appears. You can modify this rule as needed.
Defining a Match
Specify the traffic you want to exempt from attack detection. The Match columns
From Zone, Source, To Zone, and Destination are required for all rules in the exempt
rulebase.
NOTE: You can create custom zones for some security devices. The list of zones from
which you can select source and destination zones includes the predefined and
custom zones that have been configured for all devices managed by
NetScreen-Security Manager. Therefore, you should only select zones that are
applicable for the device on which you will install the security policy.
You can create address objects either before you create an exempt rule (see the
NetScreen-Security Manager Administrator’s Guide) or while creating or editing an
exempt rule. To select or configure an address object, right-click on either the
Source or Destination column of a rule, then select Select Address. In the Select
Source Addresses dialog box, you can either select an already created address
object, or you can click the Add icon to create a new host, network, or group object.
Setting Targets
For each rule in the Exempt rulebase, you can select the IDP-capable device that will
use that rule to detect and prevent attacks. When you install the security policy to
which the rule belongs, the rule becomes active only on the device(s) you select in
the Install On column of the rulebase.
Entering Comments
You can enter notations about the rule in the Comments column. The information
in the Comments column is not pushed to the target device(s). To enter a comment,
right-click on the Comments column, then select Edit Comments. The Edit
Comments dialog box appears. You can enter a comment of up to 1024 characters.
To create an exempt rule from the Log Viewer, perform the following steps:
2. Right-click a log record that contains an attack you want to exempt, then select
Exempt.
The Exempt rulebase for the security policy that generated the log record is
displayed, with the exempt rule that is associated with the log entry. The
source, destination, and attack settings for the rule are automatically filled in
based on the information in the log record.
NOTE: If the Exempt rulebase does not already exist when you create an exempt rule
from the Log Viewer, the rulebase is automatically created and the rule is added.
You can modify, reorder, or merge an exempt rule created from the Log Viewer in
the same manner as any other exempt rule that you create directly in the Exempt
rulebase.
Unlike antivirus software, which scans for known backdoor or executable files on
the host system, IDP detects the interactive traffic that is produced when backdoors
are used. If interactive traffic is detected, IDP can perform IP actions against the
connection to prevent an attacker from further compromising your network.
When you configure a backdoor rule, you must specify the following:
Source and destination addresses for traffic you want to monitor. To detect
incoming interactive traffic, set the Source to “any” and the Destination to the
IP address of network device you want to protect. To detect outgoing interactive
traffic, set the Source to the IP address of the network device you want to
protect and the Destination to “any.”
NOTE: Do not include Telnet, SSH, RSH, NetMeeting, or VNC, as these services are often
used to legitimately control a remote system and their inclusion might generate
false positives.
Action that the IDP is to perform if interactive traffic is detected. Set the
Operation to “detect.” If you are protecting a large number of network devices
from interactive traffic, you can create a rule that ignores accepted forms of
interactive traffic from those devices, then create another rule that detects all
interactive traffic from those devices.
NOTE: The Backdoor rulebase is a terminal rulebase. That is, when IDP finds a match on
a rule in the Backdoor rulebase, it does not execute successive rules.
1. In the main navigation tree, select Security Policies. Open a security policy
either by double-clicking on the policy name in the Security Policy window, or
by clicking on the policy name, then selecting the Edit icon.
2. To configure a backdoor rule, click the Add icon in the upper right corner of the
Security Policy window (see Figure 77).
A default backdoor rule appears as shown in Figure 78. You can modify this
rule as needed.
Defining a Match
You specify the traffic you want IDP to monitor for indications of backdoors or
Trojans. The Match columns From Zone, Source, To Zone, Destination, and Service
are required for all rules in the Backdoor rulebase.
NOTE: You can create custom zones for some security devices. The list of zones from
which you can select source and destination zones includes the predefined and
custom zones that have been configured for all devices managed by
NetScreen-Security Manager. Therefore, you should only select zones that are
applicable for the device on which you will install the security policy.
You can create address objects either before you create a backdoor rule (see the
NetScreen-Security Manager Administrator’s Guide) or while creating or editing a
backdoor rule. To select or configure an address object, right-click on either the
Source or Destination column of a rule, then select Select Address. In the Select
Source Addresses dialog box, you can either select an already created address
object or you can click the Add icon to create a new host, network, or group object.
Services
Select interactive service objects. Be sure to include services that are offered by the
source or destination IP as well as interactive services that are not; attackers can
use a backdoor to install any interactive service. Do not include Telnet, SSH, RSH,
NetMeeting, or VNC, as these services are often used to control a remote system
legitimately, and their inclusion might generate false positives.
Setting Actions
Use the following steps to configure an action to perform if IDP detects interactive
traffic:
Action Description
Accept IDP accepts the interactive traffic.
Drop Connection IDP drops the interactive connection without sending an RST packet to the sender, preventing the traffic
from reaching its destination. Use this action to drop connections for traffic that is not prone to spoofing.
Close Client and IDP closes the interactive connection and sends an RST packet to both the client and the server. If the
Server IDP is in sniffer mode, IDP sends an RST packet to both the client and server but does not close the
connection.
Close Client IDP closes the interactive connection to the client but not to the server.
Close Server IDP closes the interactive connection to the server but not to the client.
Setting Notification
The first time you design a security policy, you might be tempted to log all attacks
and let the policy run indefinitely. Do not do this! Some attack objects are
informational only, and others can generate false positives and redundant logs. If
you become overloaded with data, you might miss something important.
Remember that security policies that generate too many log records are hazardous
to the security of your network, as you might discover an attack too late or miss a
security breach entirely if you have to sift through hundreds of log records.
Excessive logging can also affect IDP throughput, performance, and available disk
space. A good security policy generates enough logs to fully document only the
important security events on a network.
Setting Logging
In the Configure Notification dialog box, select Logging, then click OK. Each time
the rule is matched, the IDP system creates a log record that appears in the Log
Viewer.
Logging an attack creates a log record that you can view real time in the Log Viewer.
For more critical attacks, you can also set an alert flag to appear in the log record,
notify you immediately by email, have IDP run a script in response to the attack, or
set an alarm flag to appear in the log record. Your goal is to fine tune the attack
notifications in your security policy to your individual security needs.
To log an attack for a rule, right-click the Notification column of the rule, then select
Configure. The Configure Notification dialog box appears.
Setting an Alert
In the Configure Notification dialog box, select Alert, then click OK. If Alert is
selected and the rule is matched, IDP places an alert flag in the Alert column of the
Log Viewer for the matching log record.
Logging Packets
You can record the individual packets in network traffic that matched a rule by
capturing the packet data for the attack. Viewing the packets used in an attack on
your network can help you determine the extent of the attempted attack and its
purpose, whether or not the attack was successful, and any possible damage to your
network.
NOTE: To improve IDP performance, log only the packets following the attack.
If multiple rules with packet capture enabled match the same attack, IDP captures
the maximum specified number of packets. For example, you configure rule 1 to
capture 10 packets before and after the attack, and you can configure rule 2 to
capture 5 packets before and after the attack. If both rules match the same attack,
IDP attempts to capture 10 packets before and after the attack.
NOTE: Packet captures are restricted to 256 packets before and after the attack.
Setting Severity
You can override the inherent attack severity for a rule within the Backdoor
rulebase. You can set the severity to Default, Info, Warning, Minor, Major, or Critical.
To change the severity for a rule, right-click the Severity column, then select a
severity.
Setting Targets
For each rule in the Backdoor rulebase, you can select the security device that will
use that rule to detect and prevent attacks. When you install the security policy to
which the rule belongs, the rule becomes active only on the devices you select in
the Install On column of the rulebase.
Entering Comments
You can enter notations about the rule in the Comments column. The information
in the Comments column is not pushed to the target device(s). To enter a comment,
right-click on the Comments column, then select Edit Comments. The Edit
Comments dialog box appears. You can enter a comment of up to 1024 characters.
A compound attack object enables you to be very specific about the events that
need to occur before IDP identifies traffic as an attack. For example, you might want
to take action only if an FTP session includes a failed login attempt for specific
users.
To view predefined attack objects and groups perform the following steps:
1. In the Object Manager, click Attack Objects > IDP Objects. The IDP Objects
dialog box appears.
2. Click the Predefined Attacks or Predefined Attack Groups tab to view predefined
attack objects or groups.
Category
Bugtraq number, which identifies the equivalent attack in the Security Focus
Bugtraq database
Initially, attack objects are listed alphabetically by Category name but you can view
attacks in different orders by clicking on a column heading.
To locate all rules that use a predefined attack object, right-click the attack object,
then select View Usages.
Severity groups attack objects by the severity assigned to the attack. IDP
has five severity levels: Info, Warning, Minor, Major, Critical. Within each
severity, attack objects are grouped by category.
To locate all rules that use a predefined attack object group, right-click the attack
object group, then select View Usages.
For more information about predefined groups, see the NetScreen-Security Manager
Administrator’s Guide.
1. In the Object Manager, click Attack Objects > IDP Objects. The IDP Objects
dialog box appears.
3. Click the Add icon. The Custom Attack dialog box appears with the General tab
selected.
a. Enter a name for the attack. The name is used to display the attack object
in the UI. You might want to include the protocol the attack uses as part of
the attack name.
b. Enter a description for the attack. The description provides details about
the attack. Entering a description is optional when creating a new attack
object, but it can help you remember important information about the
attack. View the attack descriptions for predefined attacks for examples. To
display details about a predefined attacks, see “Viewing Predefined
Attacks” on page 213.
c. Select a severity for this attack: Info, Warning, Minor, Major, or Critical.
Critical attacks are the most dangerous—typically these attacks attempt to
crash your server or gain control of your network. Informational attacks are
the least dangerous and typically are used by network administrators to
discover holes in their own security system.
d. Enter a category for this attack. You can use a predefined category or
define a new category
e. Enter one or more keywords for this attack that can help you find it later. A
keyword is a unique identifier used to display the attack object in log
records. Keywords indicate the important words that relate to the attack
and the attack object.
f. Check the check box if you want this attack object to be part of your
highest-risk set of attack objects. Later, when you add this attack object to
dynamic groups, you can specify whether only recommended attack
objects will be included. For more information about recommended attack
objects, see the NetScreen-Security Manager Administrator’s Guide.
4. Click the Platforms tab in the Custom Attack dialog box to specify the security
platform on which the attack detection is to occur.
a. Click the Add icon. The Custom Attack dialog box appears.
If you are configuring a new attack object, the attack object editor leads you through
the screens to configure the specific type of attack:
For signature attack objects, see the following section, “Creating a Signature
Attack Object”.
For protocol anomaly attack objects, see “Protocol Anomaly Attack Objects” on
page 212.
For compound attack objects, see “Compound Attack Objects” on page 212.
1. Configure general parameters for the attack perform the following steps:
Service Binding allows you to select a protocol that the attack uses to enter
your network. Depending upon the protocol you select, additional fields
might appear. You can select the following protocol types:
Any allows IDP to match the signature in all services (attacks can use
multiple services to attack your network).
TCP (specify port ranges) allows IDP to match the signature for
specified TCP port(s).
UDP (specify port ranges) allows IDP to match the signature for
specified UDP port(s).
ICMP (specify ID) allows IDP to match the signature for specified ICMP
ID.
RPC (specify program number) allows IDP to match the signature for a
specified remote procedure call program number.
Time Binding allows IDP to detect a sequence of the same attacks over a
period of time. If you select Time Binding, you can specify the following
attributes which are bound to the attack object for one minute:
Scope specifies whether the counting of the attack is from the same
source IP address, the same destination IP address, or a peer. If you
select Source, IDP detects attacks from a given source IP address for
the specified number of times, regardless of the destination IP address.
If you select Destination, IDP detects attacks to a given destination IP
address for the specified number of times, regardless of the source IP
address. If you select Peer, IDP detects attacks between source and
destination IP addresses of the sessions for the specified number of
times.
Count specifies the number of times that IDP detects the attack within
the specified scope before triggering an event.
2. Click Next.
The attack pattern is the signature of the attack you want to detect. The
signature is a pattern that always exists within an attack; if the attack is
present, so is the signature. When creating a new signature attack object,
you must analyze the attack to detect a pattern (such as a segment of code,
a URL, or a value in a packet header) and then use that pattern to create a
signature. You can also negate an entered pattern.
Table 20 shows the regular expressions you can use in the attack pattern:
Offset is the starting place from the specified service context where IDP
should look for the attack. If there is no offset, you can specify None;
otherwise, you can specify a decimal value.
Context defines the location where IDP should look for the attack in a
specific Application Layer protocol. When creating a signature attack
object, you should choose a service context, if possible. Because the service
context is very specific, your chances of detecting a false positive are
greatly reduced. However, choosing a service context overrides any
protocol you previously specified in the Service Binding general parameter.
Table 21 lists the service contexts you can use for the attacks.
Flow defines the connection flow of the attack: Control, Auxiliary, or Both.
4. Click Next.
5. Configure the header match information for the signature attack. The header
match configuration allows you to specify that IDP search a packet for a pattern
match only for certain header information for the following protocols:
Reserved Bit. Specifies that IDP looks for a pattern match whether or
not the IP flag is set (none), only if the flag is set (set), or only if the flag
is not set (unset).
More Fragments. Specifies that IDP looks for a pattern match whether
or not the IP flag is set (none), only if the flag is set (set), or only if the
flag is not set (unset).
Don’t Fragment. Specifies that IDP looks for a pattern match whether
or not the IP flag is set (none), only if the flag is set (set), or only if the
flag is not set (unset).
ACK Number. The ACK number of the packet. This number identifies
the next sequence number; the ACK flag must be set to activate this
field.
Urgent Pointer. Indicates that the data in the packet is urgent; the URG
flag must be set to activate this field.
Data Length. The number of bytes in the data payload. For SYN, ACK,
and FIN packets, this field should be empty.
You can also specify the following TCP flag options as none, set, or unset:
URG. When set, the urgent flag indicates that the packet data is
urgent.
PSH. When set, the push flag indicates that the receiver should
push all data in the current sequence to the destination application
(identified by the port number) without waiting for the remaining
packets in the sequence.
RST. When set, the reset flag resets the TCP connection, discarding
all packets in an existing sequence.
FIN. When set, the final flag indicates that the packet transfer is
complete and the connection can be closed.
ICMP Type. The primary code that identifies the function of the
request/reply.
ICMP Code. The secondary code that identifies the function of the
request/reply within a given type.
6. Click Finish.
Time Binding allows IDP to detect a sequence of the same attacks over a
specified period. If you select Time Binding, you can specify the following
attributes that are bound to the attack object for one minute:
Scope specifies whether the counting of the attack is from the same
source IP address, the same destination IP address, or a peer. If you
select Source, IDP detects attacks from a given source IP address for
the specified number of times, regardless of the destination IP address.
If you select Destination, IDP detects attacks to a given destination IP
address for the specified number of times, regardless of the source IP
address. If you select Peer, IDP detects attacks between source and
destination IP addresses of the sessions for the specified number of
times.
Count specifies the number of times that IDP detects the attack within
the specified scope before an event is triggered.
2. Click Finish.
All members of the compound attack object must use the same service setting
or service binding, such as FTP, Telnet, YMSG, TCP/80, and so on.
You can add between 2 and 32 protocol anomaly attack objects and/or
signatures as members of the compound attack object. However, all members
must use the same service setting or service binding.
Perform the following steps to configure a compound attack in the Custom Attack
dialog box:
Service Binding allows you to select a protocol that the attack uses to enter
your network. Depending upon the protocol you select, additional fields
may appear. You can select the following protocol types:
Any allows IDP to match the signature in all services (attacks can use
multiple services to attack your network).
TCP (specify port ranges) allows IDP to match the signature for
specified TCP port(s).
UDP (specify port ranges) allows IDP to match the signature for
specified UDP port(s).
ICMP (specify ID) allows IDP to match the signature for specified ICMP
ID.
RPC (specify program number) allows IDP to match the signature for a
specified remote procedure call program number.
Time Binding allows IDP to detect a sequence of the same attacks over a
specified period. If you select Time Binding, you can specify the following
attributes that are bound to the attack object for one minute:
Scope specifies whether the counting of the attack is from the same
source IP address, the same destination IP address, or a peer. If you
select Source, IDP detects attacks from a given source IP address for
the specified number of times, regardless of the destination IP address.
If you select Destination, IDP detects attacks to a given destination IP
address for the specified number of times, regardless of the source IP
address. If you select Peer, IDP detects attacks between source and
destination IP addresses of the sessions for the specified number of
times.
Count specifies the number of times that IDP detects the attack within
the specified scope before an event is triggered.
2. Click Next.
Scope specifies whether the match should occur over a single session or
can be made across multiple transactions within a session:
Select Session to allow multiple matches for the object within the same
session.
Select Reset if the compound attack should be matched more than once
within a single session or transaction. If Reset is selected, multiple matches
can be made within a single session or transaction.
Select Ordered Match to create a compound attack object that must match
each member signature or protocol anomaly in the order you specify. If you
do not specify an ordered match, the compound attack object still must
match all members, but the attacks or protocol anomalies can appear in
random order.
You can now add signature or protocol anomaly attack objects to the compound
attack, as described in the following sections.
DFA Pattern. Specify the pattern IDP should match. You construct the
attack pattern just as you would when creating a new signature attack
object.
To exclude the specified pattern from being matched, select the Negate
check box.
Context. Specify the context in which the IDP should look for the pattern.
The context displays only contexts that are appropriate for the specified
service. If you selected a service binding of any, you are restricted to the
service contexts packet and first packet.
Direction. Specify whether IDP should match the pattern in traffic flowing
in any direction, from client-to-server, or from server-to-client.
3. Click OK.
2. Select an anomaly.
3. Click OK.
You can create static groups, which contain only the groups or attack objects you
specify, or dynamic groups, which contain attack objects based on criteria you
specify.
A custom static group can include the same members as a predefined static group,
plus the following members:
Define a specific set of attacks to which you know your network is vulnerable
Define a specific set of informational attack objects that you use to keep you
aware of what is happening on your network
Static groups require more maintenance than dynamic groups because you must
manually add or remove attack objects in a static group in order to change the
members. However, you can include a dynamic group within a static group to
automatically update some attack objects. For example, the predefined attack
object group Operating System is a static group that contains four predefined static
groups: BSD, Linux, Solaris, and Windows. The BSD group contains the predefined
dynamic group BSD-Services-Critical, to which attack objects can be added during
an attack database update.
1. In Object Manager, click Attack Objects > IDP Objects. The IDP Objects dialog
box appears.
3. Click the Add icon, then select Add Static Group. The New Static Group dialog
box appears.
4. Enter a name and description for the static group. Select a color for the group
icon.
5. To add an attack or a group to the static group, select the attack or group from
the Attacks/Group list, then click Add.
6. Click OK.
A predefined or custom dynamic group can only contain attack objects, not attack
groups. Dynamic group members can be either predefined or custom attack
objects.
1. In the Object Manager, click Attack Objects > IDP Objects. The IDP Objects
dialog box appears.
3. Click the Add icon, then select Add Dynamic Group. The New Dynamic Group
dialog box appears.
4. Enter a name and description for the static group. Select a color for the group
icon.
5. In the Filters tab, click the Add icon, then select one of the following:
Add Products Filter adds attack objects based on the application that is
vulnerable to the attack
Add Severity Filter adds attack objects based on the attack severity.
NOTE: All predefined attack objects are assigned a severity level by Juniper Networks.
However, you can edit this setting to match the needs of your network.
Add Last Modified Filter adds attack objects based on their last
modification date
You create filters one at a time; as you add each criteria, IDP compares it to the
attributes for each attack object and immediately filters out any attack object that
does not match. If you create a filter with attributes that no attack object can match,
a message appears warning you that your dynamic group has no members.
From the resulting list of matching attack objects, you can then exclude any attack
objects that produce false positives on your network or that detect an attack to
which your network is not vulnerable.
NOTE: A dynamic group cannot contain another group (predefined, static, or dynamic).
However, you can include a dynamic group as a member of a static group.
1. In the Custom Attack Groups tab, click the Add icon, then select Add Dynamic
Group. The New Dynamic Group dialog box appears.
2. Enter a name and description for the group. Select a color for the group icon.
3. In the Filters tab, click the Add icon, then add the filters that determine which
attack objects should be in the group:
a. Add a Products filter to add attack objects that detect attacks against all
Microsoft Windows operating systems.
b. Add a Severity filter to add attack objects that have a severity level of
Critical or Major.
IDP automatically applies all filters to the entire attack object database,
identifies the attack objects that meet the defined criteria, and adds the
matching objects as members of the group.
4. View the members of the group by clicking on the Members tab as shown in
Figure 82:
For all new attack objects, the update compares the predefined attributes of
each attack object to each dynamic group criteria and adds the attack objects
that match.
For all updated attack objects, the update removes attack objects that no longer
meet their dynamic group criteria. The update also reviews updated attack
objects to determine if they now meet any other dynamic group criteria and
adds them to those groups as necessary.
For all deleted attack objects, the update removes the attack objects from their
dynamic groups.
You can also edit a dynamic group manually, adding new filters or adjusting existing
filters to get the type of attack objects you want. You can also edit a dynamic group
from within a security policy (see “Configuring Security Policies” on page 183).
This section describes how to configure the security device to provide standalone
IDP functions.
NOTE: Juniper Networks offers standalone IDP appliances that provide IDP functionality
without integrated firewall/VPN capabilities. You can use the NetScreen-Security
Manager system to manage these appliances as well as IDP-capable firewall/VPN
devices.
Enabling IDP
To enable IDP, you need to configure a firewall rule in a security policy that directs
traffic between the applicable zones to be checked against IDP rulebases. You can
make this firewall rule very simple in that it can match all traffic from all sources to
all destinations for all services.
1. Create a firewall rule that permits traffic from any source to any destination for
any service.
2. Right-click in the Rule Options column for the firewall rule, then select DI
Profile/Enable IDP.
3. In the DI Profile/Enable IDP dialog box, click the button to enable IDP, then
select OK.
For more information about configuring security policies that include IDP rules, see
“Configuring Security Policies” on page 183.
You would then add and configure IDP rulebases for the security policy to detect
possible attacks against servers in the Data_Center zone, as shown in Figure 84.
1. Log into the global domain as the superadmin. From the menu bar, select Tools
> Manage Administrators and Domains.
2. Click the Roles tab, then click the Add icon to create a role called IDP_Only.
Select tasks that are specific for IDP configuration and administration, such as:
Attack Update
Create/View/Edit/Delete Policies
Select any other tasks that might be helpful for the IDP administrator; for
example, you can select the options to view Jobs and the System Status
Monitor.
3. Click OK in the New Role dialog box to return to the Manage Administrators
and Domains dialog box.
4. Click the Administrators tab, then click the Add icon to create an administrator
called IDP_Administrator. The New Admin dialog box appears with the General
tab selected.
5. In the Name field, enter IDP_Administrator. You can enter contact information
for the administrator.
6. Click the Authorization tab. Select the authorization method and the local
password for the administrator.
7. Click the Permissions tab, then click the Add icon to select the role IDP_Only for
this administrator.
8. Click OK to close the New Select Role and Domains dialog box. Click OK to
close the New Admin dialog box. Click OK to close the Manage Administrators
and Domains dialog box.
The administrator for the standalone IDP device can now log into
NetScreen-Security Manager as IDP_Administrator. Upon login, the
NetScreen-Security Manager UI displays a limited navigation tree and menu options
for this user, as shown in Figure 85. Note that the UI displays only the security
policy and Object Manager options in the navigation tree; the Devices >
Configuration options are not available for this user.
Managing IDP
This section describes IDP management on the IDP-capable device.
In a new attack database update, the version number increments by 1. When you
download a version of an attack database update from the Juniper Networks
website, NetScreen-Security Manager stores the version number of the attack
database update. You can check to see if there is a more recent update available
than the last one you downloaded.
1. From the menu bar, select Tools > View/Update NSM Attack Database. The
Attack Update Manager wizard appears.
2. Follow the instructions in the Attack Update Manager to download the attack
database update file to the NetScreen-Security Manager GUI server.
NOTE: The Juniper Networks website is set by default in the New Preferences dialog box,
which you access by selecting Tools > Preferences. The GUI Server must have
Internet access.
When you download updated IDP attack objects and groups to the GUI server, any
new attack objects in the update are available for selection in an IDP rulebase in a
security policy. When you install a security policy on your managed device, only the
attack objects that are used in IDP rules for the device are pushed from the GUI
server to the device.
NOTE: For the DI feature, all updated signatures are pushed to your managed device. For
more information about updating the attack object database for DI on your
managed device, see the NetScreen-Security Manager Administrator’s Guide.
You can update the IDP engine on a managed device from an attack database
update on the GUI server. Because attack database updates are available more
often than firmware releases, an attack database update may include a more
recent version of the IDP engine than is available on the latest firmware release.
For example, an attack database update might contain updated IDP attack
objects that can only be used with an updated version of the IDP engine.
Perform the following steps to see the version of the IDP engine that is currently
running on the device:
1. Select Tools > View/Update NSM Attack Database. The Attack Update
Manager wizard appears.
2. Click Next.
3. Click Finish to continue downloading the latest attack database update, or click
Cancel to exit the Attack Update Manager.
1. Select Devices > IDP Detector Engine > IDP Detector Engine. The Change
Device Sigpack dialog box appears.
NOTE: The IDP engine version you install on the security device must be compatible with
the version of the firmware that is running in the device. You cannot downgrade
the IDP engine version on the device.
2. Click Next, then select the managed devices on which you want to install the
IDP engine update.
3. Follow the instructions in the Change Device Manager to update the IDP engine
on the selected device.
NOTE: Updating the IDP engine on a device does not require a reboot of the device.
1. Enable the device to send log entries with the desired severity settings to
NetScreen-Security Manager:
b. In the device navigation tree, select Report Settings > General > NSM.
d. Click OK.
2. Enable IDP detection and logging in the security policy installed on the device.
For detailed information about configuring IDP logging in the security policy,
see “Configuring Security Policies” on page 183.
IDP alarm log entries appear in the Log Viewer and display the following columns of
information:
Action
Protocol
Subcategory
Severity
Device
ISG-IDP Devices
Juniper Networks Integrated Security Gateway–Intrusion Detection and Prevention
(ISG-IDP) devices protect your networks from traffic anomalies and malicious
attacks. You can configure IDP policies for the traffic flowing through your network
based on your network’s security requirements. The ISG-IDP device loads the IDP
policy data and applies the policy to the network traffic.
Compiling a Policy
You use NetScreen-Security Manager (NSM) to remotely manage ISG-IDP devices.
NSM compiles the policies you define and transfers them to the ISG-IDP device. The
following section explains the steps involved in compiling and loading a policy on
the ISG-IDP device. Figure 87 illustrates an ISG-IDP policy compilation.
Security device
Security module 1
1. NSM compiles the policy you defined and generates a policy.gz.v file.
2. NSM transfers the policy.gz.v file to the management module of the ISG-IDP
device.
3. The management module sends a compile message along with the policy.gz.v
file to each ISG-IDP security module.
4. After all the security modules compile the policy file, the management module
sends an install message to each security module.
The management module sends the policy to the security module and waits for a
reply with a timeout of 60 seconds. If the security module does not respond with a
reply within the 60 seconds, the management module treats it as a policy push
failure and notifies NSM. NSM sends an error message to the user reporting the
policy push failure.
To avoid entering the irrecoverable state, the security module estimates the
memory required to compile the policy by multiplying the size of the policy.gz.v
file by the configurable parameter sc_policy_size_multiplier. If the security module
determines that the available memory is less than the estimated memory, the
security module does not compile the file and the policy push operation fails.
As shown in the other chapters in this volume, attackers can craft packets to
perform reconnaissance or launch denial of service (DoS) attacks. Sometimes it is
unclear what the intent of a crafted packet is, but the very fact that it is crafted
suggests that its being put to some kind of insidious use. All of the SCREEN options
presented in this chapter block suspicious packets that might contain hidden
threats:
239
Concepts & Examples ScreenOS Reference Guide
ICMP Fragments
Internet Control Message Protocol (ICMP) provides error reporting and network
probe capabilities. Because ICMP packets contain very short messages, there is no
legitimate reason for ICMP packets to be fragmented. If an ICMP packet is so large
that it must be fragmented, something is amiss. When you enable the ICMP
Fragment Protection SCREEN option, the security device blocks any ICMP packet
that has the More Fragments flag set or that has an offset value indicated in the
offset field.
Source Address
Destination Address
Options
Data
To block fragmented ICMP packets, do either of the following, where the specified
security zone is the one from which the fragments originate:
WebUI
Screening > Screen (Zone: select a zone name): Select ICMP Fragment
Protection, then click Apply.
CLI
set zone zone screen icmp-fragment
IP Header Header
Version Type of Service Total Packet Length (in Bytes)
Length
Identification 0 D M Fragment Offset
Source Address
Destination Address
Options
Data
When you enable the Large Size ICMP Packet Protection SCREEN option, the
security device drops ICMP packets with a length greater than 1024 bytes.
To block large ICMP packets, do either of the following, where the specified security
zone is the one from which the ICMP packets originate:
WebUI
Screening > Screen (Zone: select a zone name): Select Large Size ICMP Packet
(Size > 1024) Protection, then click Apply.
CLI
set zone zone screen icmp-large
Bad IP Options
The Internet Protocol standard RFC 791, Internet Protocol, specifies a set of eight
options that provide special routing controls, diagnostic tools, and security.
Although the original, intended uses for these options served worthy ends, people
have figured out ways to twist these options to accomplish less commendable
objectives. (For a summary of the exploits that attackers can initiate from IP
options, see “Network Reconnaissance Using IP Options” on page 10.)
IP Header Version Header Type of Service Total Packet Length (in Bytes)
Length
Identification 0 D M Fragment Offset
Source Address
Destination Address
Options
Payload
When you enable the Bad IP Option Protection SCREEN option, the security device
blocks packets when any IP option in the IP packet header is incorrectly formatted.
The security device records the event in the event log.
WebUI
Screening > Screen (Zone: select a zone name): Select Bad IP Option
Protection, then click Apply.
CLI
set zone zone screen ip-bad-option
Unknown Protocols
These protocol types with ID numbers of 137 or greater are reserved and undefined
at this time. Precisely because these protocols are undefined, there is no way to
know in advance if a particular unknown protocol is benign or malicious. Unless
your network makes use of a nonstandard protocol with an ID number of 137 or
greater, a cautious stance is to block such unknown elements from entering your
protected network.
IP Header Version Header Type of Service Total Packet Length (in Bytes)
Length
Identification 0 D M Fragment Offset
Source Address
Destination Address
Options
Payload
When you enable the Unknown Protocol Protection SCREEN option, the security
device drops packets when the protocol field is contains a protocol ID number of
137 or greater.
To drop packets using an unknown protocol, do either of the following, where the
specified security zone is the one from which the packets originate:
WebUI
Screening > Screen (Zone: select a zone name): Select Unknown Protocol
Protection, then click Apply.
CLI
set zone zone screen unknown-protocol
IP Packet Fragments
As packets traverse different networks, it is sometimes necessary to break a packet
into smaller pieces (fragments) based upon the maximum transmission unit (MTU)
of each network. IP fragments might contain an attacker's attempt to exploit the
vulnerabilities in the packet reassembly code of specific IP stack implementations.
When the victim receives these packets, the results can range from processing the
packets incorrectly to crashing the entire system.
Header
IP Header Version Type of Service Total Packet Length (in Bytes)
Length
Identification 0 D M Fragment Offset
Source Address
Destination Address
Options
Payload
When you enable the security device to deny IP fragments on a security zone, the
device blocks all IP packet fragments that it receives at interfaces bound to that
zone.
WebUI
Screening > Screen (Zone: select a zone name): Select Block Fragment Traffic,
then click Apply.
CLI
set zone zone screen block-frag
SYN Fragments
The Internet Protocol (IP) encapsulates a Transmission Control Protocol (TCP) SYN
segment in the IP packet that initiates a TCP connection. Because the purpose of
this packet is to initiate a connection and invoke a SYN/ACK segment in response,
the SYN segment typically does not contain any data. Because the IP packet is
small, there is no legitimate reason for it to be fragmented. A fragmented SYN
packet is anomalous, and as such suspect. To be cautious, block such unknown
elements from entering your protected network.
When you enable the SYN Fragment Detection SCREEN option, the security device
detects packets when the IP header indicates that the packet has been fragmented
and the SYN flag is set in the TCP header. The security device records the event in
the SCREEN counters list for the ingress interface.
To drop IP packets containing SYN fragments, do either of the following, where the
specified security zone is the one from which the packets originate:
WebUI
Screening > Screen (Zone: select a zone name): Select SYN Fragment
Protection, then click Apply.
CLI
set zone zone screen syn-frag
IP Header Version Header Type of Service Total Packet Length (in Bytes)
Length
Identification 0 D M Fragment Offset
Source Address
Destination Address
ICMP Header 16-bit Source Port Number 16-bit Destination Port Number
...and the SYN flag is set... ...the device drops the packet.
The context defines the location in the packet where the Deep Inspection (DI)
module searches for a signature matching the attack object pattern. When defining
a stateful signature attack object, you can specify any of the contexts in the
following lists. After you define an attack object, you must then put it in a
user-defined attack object group for use in policies.
NOTE: A user-defined attack object group can contain only user-defined attack objects.
You cannot mix predefined and user-defined attack objects in the same attack
object group.
When the DI module examines traffic for TCP stream signatures, it does so without
regard for contexts. TCP stream signatures look for patterns anywhere in any kind
of TCP traffic regardless of the application protocol in use. Stream signatures are
defined on NetScreen-5000 and 2000 series systems only. Stream256, however,
looks for patterns in the first 256 bytes of data.
A-I
Concepts & Examples ScreenOS Reference Guide
A-II
Appendix A: Contexts for User-Defined Signatures
A-III
Concepts & Examples ScreenOS Reference Guide
A-IV
Index
A stateful signatures .................................................134
ActiveX controls, blocking ..........................................169 stream signatures ..................................................135
address sweep..................................................................8 TCP stream signatures ..........................................161
agents, zombie .........................................................27, 29 attack protection
aggressive aging .......................................................31–36 policy level .................................................................4
AIM ................................................................................133 security zone level .....................................................4
ALGs ................................................................................59 attacks
America Online Instant Messaging common objectives ...................................................1
See AIM detection and defense options ............................2–4
Application Layer Gateways DOS .....................................................................27–56
See ALGs ICMP
attack actions .......................................................140–148 floods ...................................................................50
close ........................................................................140 fragments ..........................................................240
close client .............................................................140 IP packet fragments ..............................................244
close server ............................................................140 land ...........................................................................52
drop ........................................................................140 large ICMP packets ................................................241
drop packet ............................................................140 Ping of Death ...........................................................53
ignore......................................................................140 session table floods ...........................................17, 28
none ........................................................................141 stages of .....................................................................2
attack database updates SYN floods ..........................................................38–43
downloading ..........................................................232 SYN fragments .......................................................245
overview .................................................................232 teardrop ....................................................................54
attack object database ........................................122–129 UDP floods ...............................................................51
auto notification and manual update..................126 unknown MAC addresses .......................................43
automatic update ..................................................125 unknown protocols ...............................................243
changing the default URL .....................................128 WinNuke ...................................................................55
immediate update .................................................124 AV objects, timeout ........................................................89
manual update...............................................127, 128 AV scanning
attack object groups ....................................................136 AV resources per client ...........................................83
applied in policies .................................................130 content
changing severity ..................................................136 size .......................................................................85
Help URLs...............................................................134 decompression ........................................................90
logging ....................................................................151 fail-mode ..................................................................84
severity levels ........................................................136 file extensions ..........................................................91
attack objects ...............................................119, 130–135 FTP ............................................................................72
brute force......................................................148, 149 HTTP .........................................................................74
custom ....................................................................214 HTTP keep-alive .......................................................85
disabling .................................................................139 HTTP trickling ..........................................................86
IDP ..........................................................................185 IMAP .........................................................................76
negation .................................................................164 message drop...........................................................85
overview .................................................................211 MIME .........................................................................75
protocol anomalies .......................................135, 163 POP3 .........................................................................76
protocol anomaly ..................................................212 SMTP .........................................................................77
re-enabling .............................................................139 subscription..............................................................80
signature.................................................................212 using pattern files in ...............................................85
Index IX-I
Concepts & Examples ScreenOS Reference Guide
IX-II Index
Index
Index IX-III
Concepts & Examples ScreenOS Reference Guide
IX-IV Index
Index
Index IX-V
Concepts & Examples ScreenOS Reference Guide
Z
zip files, blocking ......................................................... 169
zombie agents.......................................................... 27, 29
IX-VI Index
Concepts & Examples
ScreenOS Reference Guide
Volume 5:
Virtual Private Networks
Juniper Networks, the Juniper Networks logo, JUNOS, NetScreen, ScreenOS, and Steel-Belted Radius are registered trademarks of Juniper Networks, Inc.
in the United States and other countries. JUNOSe is a trademark of Juniper Networks, Inc. All other trademarks, service marks, registered trademarks, or
registered service marks are the property of their respective owners.
All specifications are subject to change without notice. Juniper Networks assumes no responsibility for any inaccuracies in this document or for any
obligation to update information in this document. Juniper Networks reserves the right to change, modify, transfer, or otherwise revise this publication
without notice.
FCC Statement
The following information is for FCC compliance of Class A devices: This equipment has been tested and found to comply with the limits for a Class A
digital device, pursuant to part 15 of the FCC rules. These limits are designed to provide reasonable protection against harmful interference when the
equipment is operated in a commercial environment. The equipment generates, uses, and can radiate radio-frequency energy and, if not installed and
used in accordance with the instruction manual, may cause harmful interference to radio communications. Operation of this equipment in a residential
area is likely to cause harmful interference, in which case users will be required to correct the interference at their own expense.
The following information is for FCC compliance of Class B devices: The equipment described in this manual generates and may radiate radio-frequency
energy. If it is not installed in accordance with Juniper Networks’ installation instructions, it may cause interference with radio and television reception.
This equipment has been tested and found to comply with the limits for a Class B digital device in accordance with the specifications in part 15 of the FCC
rules. These specifications are designed to provide reasonable protection against such interference in a residential installation. However, there is no
guarantee that interference will not occur in a particular installation.
If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user
is encouraged to try to correct the interference by one or more of the following measures:
Connect the equipment to an outlet on a circuit different from that to which the receiver is connected.
Caution: Changes or modifications to this product could void the user's warranty and authority to operate this device.
Disclaimer
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED
WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED
WARRANTY, CONTACT YOUR JUNIPER NETWORKS REPRESENTATIVE FOR A COPY.
ii
Table of Contents
About This Volume vii
Document Conventions................................................................................. viii
Web User Interface Conventions ........................................................... viii
Command Line Interface Conventions ................................................... viii
Naming Conventions and Character Types .............................................. ix
Illustration Conventions ............................................................................ x
Requesting Technical Support .......................................................................... x
Self-Help Online Tools and Resources....................................................... xi
Opening a Case with JTAC ........................................................................ xi
Document Feedback ....................................................................................... xi
iv Table of Contents
Table of Contents
Table of Contents v
Concepts & Examples ScreenOS Reference Guide
Index..........................................................................................................................IX-I
vi Table of Contents
About This Volume
Volume 5: Virtual Private Networks describes virtual private network (VPN) concepts
and ScreenOS VPN-specific features.
vii
Concepts & Examples ScreenOS Reference Guide
Document Conventions
This document uses the conventions described in the following sections:
The following example shows the WebUI path and parameters for defining an
address:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
To open Online Help for configuration settings, click the question mark (?) in the
upper left of the screen.
The navigation tree also provides a Help > Config Guide configuration page to help
you configure security policies and Internet Protocol Security (IPSec). Select an
option from the list, and follow the instructions on the page. Click the ? character in
the upper left for Online Help on the Config Guide.
In text, commands are in boldface type and variables are in italic type.
In examples:
If there is more than one choice, each choice is separated by a pipe ( | ). For
example, the following command means “set the management options for the
ethernet1, the ethernet2, or the ethernet3 interface”:
NOTE: When entering a keyword, you only have to type enough letters to identify the
word uniquely. Typing set adm u whee j12fmt54 will enter the command set
admin user wheezer j12fmt54. However, all the commands documented in this
guide are presented in their entirety.
If a name string includes one or more spaces, the entire string must be
enclosed within double quotes; for example:
Any leading spaces or trailing text within a set of double quotes are trimmed;
for example, “ local LAN ” becomes “local LAN”.
NOTE: A console connection only supports SBCS. The WebUI supports both SBCS and
MBCS, depending on the character sets that your browser supports.
Document Conventions ix
Concepts & Examples ScreenOS Reference Guide
Illustration Conventions
Figure 1 shows the basic set of images used in illustrations throughout this volume.
Policy Engine
Security Zone Interfaces:
White = Protected Zone Interface
(example = Trust Zone)
Black = Outside Zone Interface
(example = Untrust Zone)
Generic Network Device
Tunnel Interface
Server
VPN Tunnel
Router
Juniper Networks
Switch Security Devices
Hub
Download the latest versions of software and review your release notes—
http://www.juniper.net/customers/csc/software/
To verify service entitlement by product serial number, use our Serial Number
Entitlement (SNE) Tool—
https://tools.juniper.net/SerialNumberEntitlementSearch/
Document Feedback
If you find any errors or omissions in this document, contact Juniper Networks at
[email protected].
Document Feedback xi
Concepts & Examples ScreenOS Reference Guide
This chapter introduces elements of Internet Protocol Security (IPSec) and describes
how they relate to virtual private network (VPN) tunneling. This chapter contains
the following sections:
“Modes” on page 4
“Protocols” on page 5
“Phase 1” on page 9
“Phase 2” on page 11
1
Concepts & Examples ScreenOS Reference Guide
A VPN connection can link two local area networks (LANs) or a remote dialup user
and a LAN. The traffic that flows between these two points passes through shared
resources such as routers, switches, and other network equipment that make up the
public WAN. To secure VPN communication while passing through the WAN, the
two participants create an IP Security (IPSec) tunnel.
NOTE: The term tunnel does not denote either Transport or Tunnel mode (see “Modes”
on page 4). It refers to the IPSec connection.
For more information about SPIs, see “Security Associations” on page 8. For more
information about IPSec security protocols, see “Protocols” on page 5.
Through the SA, an IPSec tunnel can provide the following security functions:
The security functions you employ depend on your needs. If you only need to
authenticate the IP packet source and content integrity, you can authenticate the
packet without applying any encryption. On the other hand, if you are only
concerned with preserving privacy, you can encrypt the packet without applying
any authentication mechanisms. Optionally, you can both encrypt and authenticate
the packet. Most network security designers choose to encrypt, authenticate, and
replay-protect their VPN traffic.
ScreenOS supports IPSec technology for creating VPN tunnels with two kinds of key
creation mechanisms:
Manual Key
IPSec Concepts
IP Security (IPSec) is a suite of related protocols for cryptographically securing
communications at the IP Packet Layer. IPSec consists of two modes and two main
protocols:
IPSec also provides methods for the manual and automatic negotiation of Security
Associations (SAs) and key distribution, all the attributes for which are gathered in a
Domain of Interpretation (DOI). Refer to RFC 2407 and RFC 2408.
AH Protocol
ESP Protocol
Domain of Interpretation
(DOI)
NOTE: The IPSec Domain of Interpretation (DOI) is a document containing definitions for
all the security parameters required for the successful negotiation of a VPN
tunnel—essentially, all the attributes required for SA and IKE negotiations.
IPSec Concepts 3
Concepts & Examples ScreenOS Reference Guide
Modes
IPSec operates in one of two modes—Transport or Tunnel. When both ends of the
tunnel are hosts, you can use either mode. When at least one of the endpoints of a
tunnel is a security gateway, such as a router or firewall, you must use Tunnel mode.
Juniper Networks security devices always operate in Tunnel mode for IPSec tunnels
and Transport mode for L2TP-over-IPSec tunnels.
Transport Mode
The original IP packet is not encapsulated within another IP packet, as shown in
Figure 3. The entire packet can be authenticated (with AH), the payload can be
encrypted (with ESP), and the original header remains in plaintext as it is sent
across the WAN.
Authenticated
Transport Mode--ESP
Original ESP Payload
Encrypted
Authenticated
Tunnel Mode
The entire original IP packet—payload and header—is encapsulated within another
IP payload and a new header is prepended to it, as shown in Figure 4. The entire
original packet can be encrypted, authenticated, or both. With AH, the AH and new
headers are also authenticated. With ESP, the ESP header can also be authenticated.
Authenticated
Encrypted
Authenticated
In a site-to-site VPN, the source and destination addresses used in the new header
are the IP addresses of the outgoing interface (in NAT or Route mode) or the VLAN1
IP address (in Transparent mode); the source and destination addresses of the
encapsulated packets are the addresses of the ultimate endpoints of the connection.
4 IPSec Concepts
Chapter 1: Internet Protocol Security
Device A Device B
Tunnel Gateway Tunnel Gateway
Internet
LAN LAN
Tunnel
1 2
B
A
A B Payload 1 2 A B Payload A B Payload
In a dialup VPN, there is no tunnel gateway on the VPN dialup client end of the
tunnel; the tunnel extends directly to the client itself. In this case, on packets sent
from the dialup client, both the new header and the encapsulated original header
have the same IP address: that of the client’s computer.
NOTE: Some VPN clients such as the NetScreen-Remote allow you to define a virtual
inner IP address. In such cases, the virtual inner IP address is the source IP
address in the original packet header of traffic originating from the client, and the
IP address that the ISP dynamically assigns the dialup client is the source IP
address in the outer header.
Device B
Tunnel Gateway
Internet
VPN Dialup Client
LAN
Tunnel
A=1
2 B
Protocols
IPSec uses two protocols to secure communications at the IP Layer:
IPSec Concepts 5
Concepts & Examples ScreenOS Reference Guide
Authentication Header
The Authentication Header (AH) protocol provides a means to verify the
authenticity/integrity of the content and origin of a packet. You can authenticate the
packet by the checksum calculated through a hash-based message authentication
code (HMAC) using a secret key and either MD5 or SHA-1 hash functions.
NOTE: For more information about MD5 and SHA-1 hashing algorithms, refer to the
following RFCs: (MD5) 1321, 2403; (SHA-1) 2404. For information about HMAC,
refer to RFC 2104.
With ESP, you can both encrypt and authenticate, encrypt only, or authenticate
only. For encryption, you can choose one of the following encryption algorithms:
Triple DES (3DES)—A more powerful version of DES in which the original DES
algorithm is applied in three rounds, using a 168-bit key. DES provides a
significant performance savings but is considered unacceptable for many
classified or sensitive material transfers.
NOTE: Even though it is possible to select NULL for authentication, it has been
demonstrated that IPSec might be vulnerable to attack under such circumstances.
Therefore, it is inadvisable to select NULL for authentication.
6 IPSec Concepts
Chapter 1: Internet Protocol Security
Key Management
The distribution and management of keys are critical to using VPNs successfully.
IPSec supports both manual and automatic key-distribution methods.
Manual Key
With manual keys, administrators at both ends of a tunnel configure all the security
parameters. This is a viable technique for small, static networks where the
distribution, maintenance, and tracking of keys are not difficult. However, safely
distributing manual-key configurations across great distances poses security issues.
Aside from passing the keys face-to-face, you cannot be completely sure that the
keys have not been compromised while in transit. Also, whenever you want to
change the key, you are faced with the same security issues as when you initially
distributed it.
AutoKey IKE
When you need to create and manage numerous tunnels, you need a method that
does not require you to configure every element manually. IPSec supports the
automated generation and negotiation of keys and security associations using the
Internet Key Exchange (IKE) protocol. ScreenOS refers to such automated tunnel
negotiation as AutoKey IKE and supports AutoKey IKE with preshared keys and
AutoKey IKE with certificates.
NOTE: A preshared key is a key for both encryption and decryption, which both
participants must have before initiating communication.
NOTE: For examples of both manual key and AutoKey IKE tunnels, see “Site-to-Site
Virtual Private Networks” on page 89.
IPSec Concepts 7
Concepts & Examples ScreenOS Reference Guide
Security Associations
A security association (SA) is a unidirectional agreement between the VPN
participants regarding the methods and parameters to use in securing a
communication channel. Full bidirectional communication requires at least two
SAs, one for each direction.
SA lifetime
For outbound VPN traffic, the policy invokes the SA associated with the VPN tunnel.
For inbound traffic, the security device looks up the SA by using the following
triplet:
Destination IP
Tunnel Negotiation
For a manual key IPSec tunnel, because all of the SA parameters have been
previously defined, there is no need to negotiate which SAs to use. In essence, the
tunnel has already been established. When traffic matches a policy using that
manual key tunnel or when a route involves the tunnel, the security device simply
encrypts and authenticates the data, as you determined, and forwards it to the
destination gateway.
To establish an AutoKey IKE IPSec tunnel, two phases of negotiations are required:
In Phase 2, the participants negotiate the IPSec SAs for encrypting and
authenticating the ensuing exchanges of user data.
NOTE: Juniper Networks security devices support the newer version of the IKE protocol
known as IKEv2. For more information about IKEv2 and how security devices
establish security associations (SAs) using the IKEv2 protocol, see “IKE Version 2”
on page 17.
8 Tunnel Negotiation
Chapter 1: Internet Protocol Security
Phase 1
Phase 1 of an AutoKey IKE tunnel negotiation consists of the exchange of proposals
for how to authenticate and secure the channel. The exchange can be in one of two
modes: Aggressive or Main. Using either mode, the participants exchange proposals
for acceptable security services such as:
A successful Phase 1 negotiation concludes when both ends of the tunnel agree to
accept at least one set of the Phase 1 security parameters proposed and then
process them. Juniper Networks security devices support up to four proposals for
Phase 1 negotiations, allowing you to define how restrictive a range of security
parameters for key negotiation you will accept.
Main mode: The initiator and recipient send three two-way exchanges (six
messages total) to accomplish the following services:
First exchange (messages 1 and 2): Propose and accept the encryption and
authentication algorithms.
Third exchange (messages 5 and 6): Send and verify their identities.
Tunnel Negotiation 9
Concepts & Examples ScreenOS Reference Guide
Aggressive Mode: The initiator and recipient accomplish the same objectives, but
only in two exchanges, with a total of three messages:
Second message: The recipient accepts the SA; authenticates the initiator; and
sends a pseudo-random number, its IKE identity, and, if using certificates, the
recipient’s certificate.
Third message: The initiator authenticates the recipient, confirms the exchange,
and, if using certificates, sends the initiator’s certificate.
Because the participants’ identities are exchanged in the clear (in the first two
messages), Aggressive mode does not provide identity protection.
NOTE: When a dialup VPN user negotiates an AutoKey IKE tunnel with a preshared key,
Aggressive mode must be used. Note also that a dialup VPN user can use an email
address, a fully qualified domain name (FQDN), or an IP address as its IKE ID. A
dynamic peer can use either an email address or FQDN, but not an IP address.
Diffie-Hellman Exchange
A Diffie-Hellman (DH) exchange allows the participants to produce a shared secret
value. The strength of the technique is that it allows the participants to create the
secret value over an unsecured medium without passing the secret value through
the wire. ScreenOS supports DH groups 1, 2, 5, and 14 for IKEv1 and IKEv2. The
size of the prime modulus used in each group’s calculation differs as follows:
DH Group 1: 768-bit
DH Group 2: 1024-bit
DH Group 5: 1536-bit
NOTE: The strength of DH Group 1 security has depreciated, and we do not recommend
its use.
The larger the modulus, the more secure the generated key is considered to be;
however, the larger the modulus, the longer the key-generation process takes.
Because the modulus for each DH group is a different size, the participants must
agree to use the same group.
NOTE: If you configure multiple (up to four) proposals for Phase 1 negotiations, you can
use different Diffie-Hellman groups in all proposals. The same guideline applies to
multiple proposals for Phase 2 negotiations.
10 Tunnel Negotiation
Chapter 1: Internet Protocol Security
Phase 2
After the participants have established a secure and authenticated channel, they
proceed through Phase 2, in which they negotiate the SAs to secure the data to be
transmitted through the IPSec tunnel.
Like the process for Phase 1, the participants exchange proposals to determine
which security parameters to employ in the SA. A Phase 2 proposal also includes a
security protocol—either Encapsulating Security Payload (ESP) or Authentication
Header (AH)—and selected encryption and authentication algorithms. The proposal
can also specify a DH group, if Perfect Forward Secrecy (PFS) is desired.
Regardless of the mode used in Phase 1, Phase 2 always operates in Quick mode
and involves the exchange of three messages.
In Phase 2, the peers also exchange proxy IDs. A proxy ID is a three-part tuple
consisting of local IP address–remote IP address–service. The proxy ID for both
peers must match, which means that the service specified in the proxy ID for both
peers must be the same, and the local IP address specified for one peer must be the
same as the remote IP address specified for the other peer.
PFS addresses this security risk by forcing a new Diffie-Hellman key exchange to
occur for each Phase 2 tunnel. Using PFS is thus more secure, although the rekeying
procedure in Phase 2 might take slightly longer with PFS enabled.
Tunnel Negotiation 11
Concepts & Examples ScreenOS Reference Guide
Replay Protection
A replay attack occurs when somebody intercepts a series of packets and uses them
later either to flood the system, causing a denial of service (DoS), or to gain entry to
the trusted network. The replay-protection feature enables security devices to check
every IPSec packet to see if it has been received previously. If packets arrive outside
a specified sequence range, the security device rejects them.
Tunnel Setup: The peers first establish security associations (SAs), which define
the parameters for securing traffic between themselves. The admins at each
end can define the SAs manually, or the SAs can be defined dynamically
through IKE Phase 1 and Phase 2 negotiations. Phase 1 can occur in either
Main mode or Aggressive mode. Phase 2 always occurs in Quick mode.
Applied Security: IPSec protects traffic sent between the two tunnel endpoints
by using the security parameters defined in the SAs that the peers agreed to
during the tunnel setup. IPSec can be applied in one of two modes—Transport
or Tunnel. Both modes support the two IPSec protocols—Encapsulating
Security Payload (ESP) and Authentication Header (AH).
For an explanation of the packet processing that occurs during the IKE and IPSec
stages of a VPN tunnel, see “IKE Packets” on page 12 and “IPSec Packets” on
page 15. These sections show the packet headers for IKE and IPSec, respectively.
IKE Packets
When a clear-text packet arrives at the security device that requires tunneling and
no active Phase 2 SA exists for that tunnel, the security device begins IKE
negotiations (and drops the packet). The source and destination addresses in the IP
packet header are those of the local and remote IKE gateways, respectively. In the
IP packet payload, there is a UDP segment encapsulating an Internet Security
Association and Key Management Protocol (ISAKMP), or IKE, packet. The format for
IKE packets is the same for Phase 1 and Phase 2.
NOTE: When the initial IP packet is dropped, the source host resends it. Typically, by the
time the second packet reaches the security device, IKE negotiations are complete
and the security device protects it—and all subsequent packets in the
session—with IPSec before forwarding it.
IP UDP ISAKMP
Header Header Header Payload
IP Payload
UDP Header
Source Port (500 for IKE) Destination Port (500 for IKE)
Length Checksum
UDP Payload
Initiator’s Cookie
Responder’s Cookie
(0000 for the first packet)
ISAKMP Payload
The Next Payload field contains a number indicating one of the following payload
types:
In Phase 1, IDii indicates the initiator ID, and IDir indicates the responder
ID.
In Phase 2, IDui indicates the user initiator, and IDur indicates the user
responder.
The IDs are IKE ID types such as FQDN, U-FQDN, IP address, and
ASN.1_DN.
0800—Notify Payload.
Each ISAKMP payload begins with the same generic header, as shown in Figure 8.
Payload
There can be multiple ISAKMP payloads chained together, with each subsequent
payload type indicated by the value in the Next Header field. A value of 0000
indicates the last ISAKMP payload. See Figure 9 on page 15 for an example.
Initiator’s SPI
IPSec Packets
After IKE negotiations complete and the two IKE gateways have established Phase 1
and Phase 2 security associations (SAs), the security device applies IPSec protection
to subsequent clear-text IP packets that hosts behind one IKE gateway send to hosts
behind the other gateway (assuming that policies permit the traffic). If the Phase 2
SA specifies the Encapsulating Security Protocol (ESP) in Tunnel mode, the packet
looks like the one shown below. The security device adds two additional headers to
the original packet that the initiating host sends.
NOTE: For information about ESP, see “Encapsulating Security Payload” on page 6. For
information about Tunnel mode, see “Tunnel Mode” on page 4.
As shown in Figure 10, the packet that the initiating host constructs includes the
payload, the TCP header, and the inner IP header (IP1).
The outer IP header (IP2), which the security device adds, contains the IP address of
the remote gateway as the destination IP address and the IP address of the local
security device as the source IP address. The security device also adds an ESP
header between the outer and inner IP headers. The ESP header contains
information that allows the remote peer to properly process the packet when it
receives it. This is illustrated in Figure 11 on page 16.
Payload
ESP Header
Sequence Number*
The Next Header field indicates the type of data in the payload field. In Tunnel
mode, this value is 4, indicating IP-in-IP. If ESP is applied in Transport mode, this
value indicates a Transport Layer protocol such as 6 for TCP or 17 for UDP.
Payload
TCP Header
Sequence Number
Acknowledgement Number
Header U A P R S F
Length Reserved R C S S Y I Window Size
G K H T N N
Data
IKE Version 2
Juniper Networks security devices support a newer version of the Internet Key
Exchange protocol (IKE), known as IKE version 2 (IKEv2). IKEv2 brings together
various aspects of exchanging keys between IPSec endpoints, such as NAT-T,
extended authentication (xauth), and ISAKMP configuration, into a single protocol
and preserves most of the features of the earlier version, including identity hiding,
PFS, two phases of establishing SAs, and cryptographic negotiation.
Initial Exchanges
The IPSec endpoints start an IKEv2 SA through an initial exchange. This consists of
two exchanges: IKE_SA_INIT and IKE_AUTH.
IKE_SA_INIT Exchange
An IKE_SA_INIT exchange negotiates security suites, establishes the IKE_SA, and
generates the SKEYSEED from which all keys are derived for the IKE_SA. Separate
keys are computed for each direction. The initiator sends the following:
Ni—Initiator’s nonce
The responder sends the response to the initiator request with the following:
HDR—Responder’s header
Nr—Responder’s nonce
IKE_AUTH Exchange
The IKE_AUTH exchange authenticates IKE endpoints and establishes the
CHILD_SA. This exchange consists of a single request/response pair. The initiator
starts using the new CHILD_SA immediately after receiving the responder's
response; similarly, the responder starts using the new CHILD_SA immediately after
sending the response to the initiator.
All messages following the initial exchange are cryptographically protected using
the cryptographic algorithms and keys negotiated in the first two messages of the
key exchange. These subsequent messages use the syntax of the encrypted
payload. During the IKE_AUTH exchange, the endpoints exchange the following:
HDR—Initiator’s header
IDi—Initiator’s ID
[CERT]—[Optional] Certificate
IDr—Responder’s ID
SAi2—Initiator’s SA
HDR—Responder’s header
IDr—Initiator’s ID
[CERT]—[Optional] Certificate
SAr2—Responder's SA
Of these messages, except the Header, all other payload are encrypted with the
secret key generated by the endpoints.
CREATE_CHILD_SA Exchange
After the IPSec endpoints complete the initial exchanges, either endpoint can
initiate the CREATE_CHILD_SA. This exchange rekeys a CHILD_SA or IKE_SA. This
exchange consists of a single request/response pair and was referred to as a Phase 2
exchange in IKEv1.
All messages following the initial exchange are cryptographically protected using
the cryptographic algorithms and keys negotiated in the first two messages of the
IKE.
Informational Exchanges
IKEv2 uses informational exchanges to send and receive control messages,
including dead peer detection (DPD).
Unlike IKEv1, where the IPSec endpoints negotiate the Diffie-Hellman (DH)
group before agreeing on the DH group number, the IKEv2 initiator sends the
DH group number in the first message of the IKE_INIT_SA exchange. If the
initiator has multiple DH group proposals in its SA payload, the DH group that
the initiator sends may not match the DH group the responder expects. In such
cases, the responder notifies the initiator with the expected DH group number.
The initiator responds to this message with the correct DH group number and
restarts the IKE_INIT_SA exchange.
The two endpoints in an IKEv2 SA do not negotiate the IKE_SA and CHILD_SA
lifetimes; each endpoint can have its own lifetime. The endpoint with the
shorter lifetime will rekey before the current IKE_SA or CHILD_SA expires (by
default, 10 seconds earlier for IKE_SA and 60 seconds earlier for CHILD_SA), as
long as the connection between the endpoints still needs this IKE_SA or
The two endpoints maintain only one IKE_SA; all other exchanges are carried
out through CHILD_SAs.
Tunnel.10
Ethernet3/1 Ethernet3/2
External Router
Internet
LAN LAN
Device A Device B
External Router
Ethernet0/1
Ethernet0/2
Tunnel.10
WebUI (Device A)
1. Configuring the IKEv2 Gateway
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
> Advanced: Enter the following advanced settings, then click Return to set
the advanced options and return to the basic configuration page:
Security Level
Predefined: (select, Basic)
3. Configuring the Route
Network > Routing > Routing Entries > Configuration: Enter the following,
then click OK:
Source Address:
New Address: 10.30.0.3/16
Destination Address:
New address: 10.10.0.1/16
Service: (select), Any
Policy > Policies (From: Trust, To: Untrust) New: Enter the following, then click
OK:
Source Address:
New Address: 10.10.0.1/16
Destination Address:
New address: 10.30.0.3/16
Service: (select), Any
Action: (select), Tunnel
Tunnel: (select), Device B
WebUI (Device B)
1. Configuring the IKEv2 Gateway
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
> Advanced: Enter the following advanced settings, then click Return to set
the advanced options and return to the basic configuration page:
Security Level
Predefined: (select, Basic)
Bind to: Tunnel Interface (select): Select tunnel.10, Untrust-Tun from the
drop-down list
Proxy-ID: (select)
Local IP / Netmask: 10.30.0.0/16
Remote IP / Netmask: 10.10.0.0/16
Service: ANY
4. Configuring the Route
Network > Routing > Routing Entries > Configuration: Enter the following,
then click OK:
CLI (Device A)
1. Configuring Addresses
set address trust 10.10.0.1 10.10.0.1/16
set address untrust 10.30.0.3 10.30.0.3/16
2. Configuring the IKEv2 Gateway
set ike gateway ikev2 "Device B" address 201.23.0.3 outgoing-interface
"ethernet3/2" preshare "GsbBPO0MNXYgXGsOetCXf8qaR8n5AUVILQ=="
proposal "standard"
set ike gateway ikev2 "Device B" auth-method self rsa-sig peer preshare
set ike gateway ikev2 "Device B" cert my-cert-hash
361A26F4CDE8696D10FF1C767D00AD8CCC3BF4CE
set ike gateway ikev2 "Device B" cert peer-ca-hash
0E9290B27AA8BAF65D3C9229AFE8F31DB953B2DA
NOTE: The local and peer certificates are generated by the device. The certificates will not
work if you copy this part to the device.
CLI (Device B)
1. Configuring the IKEv2 Gateway
set ike gateway ikev2 "Device A" address 201.12.0.1 outgoing-interface
"ethernet0/2" preshare "3to5BAFpNn3thBsncQCmBYF5ThnQVfMlEQ=="
proposal "standard"
set ike gateway ikev2 "Device A" auth-method self preshare peer rsa-sig
set ike gateway ikev2 "Device A" cert peer-ca-hash
5BA819E4775F1DBAB039C48A0DAE21583DC5A916
2. Configuring the VPN
set vpn "Device A" gateway "Device A" no-replay tunnel idletime 0 proposal
"basic"
3. Binding the VPN to a Tunnel
set vpn "Device A" id 0x2 bind interface tunnel.10
4. Creating a VPN Proxy Configuration
set vpn "Device A" proxy-id local-ip 10.30.0.0/16 remote-ip 10.10.0.0/16 any
5. Configuring the Route
set route 10.10.0.1/16 interface tunnel.10
6. Setting Policy Permit
set policy id 4 from untrust to trust 10.30.0.3 10.10.0.1 any permit
set policy id 3 from trust to untrust 10.10.0.1 10.30.0.3 any permit
Juniper Networks security devices support authentication using EAP in the following
ways:
Security device as the VPN gateway—When the security device acts as the
VPN gateway, it provides only EAP passthrough and supports a RADIUS server
as the authentication server. In this implementation, the security device
supports EAP-Message Digest 5 (EAP-MD5), EAP-Transport Layer Security
(EAP-TLS), EAP-Tunneled TLS (EAP-TTLS), and EAP-Protected EAP (EAP-PEAP)
passthrough. The security device neither times out for the connections nor
provides accounting support.
Security device as the VPN client—When the security device acts as the VPN
client, it supports only the EAP-MD5 supplicant (client) functionality for IKEv2.
When the RADIUS server responds to the authentication requests, the security
device decapsulates the EAP messages, encapsulates them into IKEv2 messages,
and sends them to the peer. After the RADIUS server has authenticated the client, if
there is a shared secret generated during the exchange, the security device extracts
the shared secret from the RADIUS Access-Accept message and uses it to generate
the AUTH payload. In this way, the security device passes the EAP messages
between a client and an authentication server.
Example
The following example explains the steps involved in setting up IKEv2 EAP
authentication for an authenticator and a supplicant.
PKI
2.2.2.1
Authenticator (M)
20.20.20.1
20.20.20.2
You can set up the IKEv2 EAP using the WebUI or the CLI.
WebUI (Authenticator)
1. Setting Up Auth-Server
Select Configuration > Auth > Auth Servers > New: Enter the following, then
click OK:
Name: rad1
Auth-server IP address: 10.155.43.201
RADIUS secret: netscreen
Account Type: IKEv2EAP (check)
2. Setting Up IKE
Select VPN >AutoKey Advanced >Gateway >New: Enter the following, then
click OK:
> Click Advanced. Configure the following advanced setting, then click
Return to return to the basic Gateway configuration page:
Select VPN >AutoKey Advanced > Gateway >Edit: Perform the following
actions, then click OK:
> Click Advanced. Configure the following advanced settings, then click
Return to return to the basic Gateway configuration page:
CLI (Authenticator)
1. Auth-Server Configuration
set auth-server "rad1" server-name "10.155.43.201"
set auth-server "rad1" account-type eap-ikev2
set auth-server "rad1" radius secret netscreen
2. IKE Configuration
set ike gateway ikev2 "v2-gw3" dialup "Peer2" outgoing-interface "loopback.3"
preshare abcd1234 proposal "rsa-g2-3des-sha"
set ike gateway ikev2 "v2-gw3" cert my-cert 1
set ike gateway ikev2 "v2-gw3" cert peer-ca all
set ike gateway ikev2 v2-gw3 eap authenticator passthrough rad1 send-id-req
set ike gateway ikev2 "v2-gw3" auth-method self rsa-sig peer eap
set vpn "v2-vpn3" gateway "v2-gw3" no-replay tunnel idletime 0 proposal
"g2-esp-3des-sha"
WebUI (Supplicant)
1. Setting Up IKE
Select VPN > AutoKey Advanced > Gateway>New: Enter the following, then
click OK:
> Click Advanced. Configure the following advanced setting, then click
Return to return to the basic Gateway configuration page:
Select VPN >AutoKey Advanced > Gateway > Edit: Perform the following
actions, then click OK:
Gateway: (select)
> Click Advanced. Configure the following advanced setting, then click
Return to return to the basic Gateway configuration page:
CLI (Supplicant)
IKE Configuration
set ike gateway ikev2 "v2-gw3" address 203.203.203.1 local-id
"[email protected]" outgoing-interface "loopback.3" preshare abcd1234
proposal "rsa-g2-3des-sha"
set ike gateway ikev2 "v2-gw3" cert my-cert 1
set ike gateway ikev2 "v2-gw3" cert peer-ca all
set ike gateway ikev2 v2-gw3 eap supplicant md5 username test1 password abcd1
set ike gateway ikev2 "v2-gw3" auth-method self eap peer rsa-sigset vpn “v2-vpn3”
gateway “v2-gw3” no-replay tunnel idleitem 0 proposal “g2-esp-3des-sha”
This chapter provides an introduction to public key cryptography and the use of
certificates and certificate revocation lists (CRLs) within the context of Public Key
Infrastructure (PKI). This chapter includes the following topics:
29
Concepts & Examples ScreenOS Reference Guide
The reverse is also useful; that is, encrypting data with a private key and decrypting
it with the corresponding public key. This is known as creating a digital signature.
For example, if Alice wants to present her identity as the sender of a message, she
can encrypt the message with her private key and send the message to Bob. Bob
then decrypts the message with Alice’s public key, thus verifying that Alice is indeed
the sender.
Public/private key pairs also play an important role in the use of digital certificates.
The procedure for signing a certificate (by a CA) and then verifying the signature (by
the recipient) works as shown in the following subsections.
Signing a Certificate
1. The Certificate Authority (CA) that issues a certificate hashes the certificate by
using a hash algorithm (MD5 or SHA-1) to generate a digest.
2. The CA then “signs” the certificate by encrypting the digest with its private key.
The result is a digital signature.
3. The CA then sends the digitally signed certificate to the person who requested
it.
2. The recipient uses the CA’s public key to decrypt the digital signature.
3. The recipient compares the decrypted digest with the digest just generated. If
the two match, the recipient can confirm the integrity of the CA’s signature and,
by extension, the integrity of the accompanying certificate.
Sender (CA)
1. Using either the MD5 or SHA-1 hash algorithm, the CA makes Digest A
digest A from the certificate. Cert
Hash Algorithm
2. Using the its private key, the CA encrypts digest A. The result is (MD5 or SHA-1)
digest B, the digital signature.
Recipient
1. Using either MD5 or SHA-1, the recipient makes digest A from the Digest A Cert
certificate.
Compare Hash Algorithm
2. Using the CA’s public key, the recipient decrypts digest B. (MD5 or SHA-1)
3. The recipient compares digest A with digest B. If they match, the
recipient knows that the certificate has not been tampered with.
Digest B
The procedure for digitally signing messages sent between two participants in an
IKE session works very similarly, with the following differences:
Instead of making a digest from the CA certificate, the sender makes it from the
data in the IP packet payload.
Instead of using the CA’s public/private key pair, the participants use the
sender’s public/private key pair.
If certificates are used solely within an organization, that organization can have its
own CA domain within which a company CA issues and validates certificates
among its employees. If that organization later wants its employees to be able to
exchange their certificates with those from another CA domain (for example, with
employees at another organization that also has its own CA domain), the two CAs
can develop cross-certification; that is, they can agree to trust the authority of each
other. In this case, the PKI structure does not extend vertically but does extend
horizontally.
CA Domain – A CA Domain – B
Cross-certification
Users in CA domain A can use their certificates and key pairs with users
in CA domain B because the CAs have cross-certified each other.
For convenience and practicality, the PKI must be transparently managed and
implemented. Toward this goal, ScreenOS does the following:
2. Supplies that public key as part of the certificate request in the form of a text
file for transmission to a Certificate Authority (CA) for certificate enrollment
(PKCS10 file).
3. Supports loading the local certificate, the CA certificate, and the certificate
revocation list (SubinterfaceCRL) into the unit.
NOTE: The Certificate Authority usually provides a CRL. Although you can load a CRL into
the security device, you cannot view it once loaded.
You can also specify an interval for refreshing the CRL online. For more
information about CRLs, see “Certificates and CRLs” on page 34.
6. Supports the PKCS #7 cryptographic standard, which means the security device
can accept X.509 certificates and CRLs packaged within a PKCS #7 envelope.
PKCS #7 support allows you to submit multiple X.509 certificates within a
single PKI request. You can now configure PKI to validate all the submitted
certificates from the issuing CA at one time.
NOTE: ScreenOS supports the following CAs: Baltimore, Entrust, Microsoft, Netscape, RSA
Keon, and Verisign.
Obtain a CA certificate for the CA that issued the personal certificate (basically
verifying the identity of the CA verifying you), and load the CA certificate in the
security device. You can perform this task manually, or you can perform this
task automatically using Simple Certificate Enrollment Protocol (SCEP).
During the course of business, there are several events that make it necessary to
revoke a certificate. You might wish to revoke a certificate if you suspect that it has
been compromised or when a certificate holder leaves a company. Managing
certificate revocations and validation can be accomplished locally (which is a
limited solution) or by referencing a CA’s CRL, which you can automatically access
online at daily, weekly, or monthly intervals or at the default interval set by the CA.
To obtain a signed digital certificate using the manual method, you must complete
several tasks in the following order:
4. After you receive your signed certificate, you must load it into the security
device along with the CA certificate.
You now have the following items for the following uses:
A local certificate for the security device, to authenticate your identity with each
tunnel connection
If the Certificate Revocation List (CRL) was included with the CA certificate, a
CRL to identify invalid certificates
NOTE: A CRL might accompany a CA certificate and be stored in the ScreenOS database.
Alternatively, the CA certificate might contain the CRL URL (either LDAP or HTTP)
for a CRL that is stored in the CA’s database. If the CRL is unobtainable by either
method, you can manually enter a CRL URL in the security device, as explained in
“Configuring CRL Settings” on page 39.
When you receive these files (the certificate files typically have the extension .cer,
and the CRL typically has the extension .crl), load them into your security device
using the procedure described in “Requesting a Certificate Manually” on page 36.
NOTE: If you are planning to use email to submit a PKCS10 file to obtain your certificates,
you must properly configure your ScreenOS settings so that you can send email to
your system administrator. You have to set your primary and secondary DNS
servers and specify the SMTP server and email address settings.
Before generating a certificate request, make sure that you have set the system
clock and assigned a hostname and domain name to the security device. (If the
security device is in an NSRP cluster, replace the hostname with a cluster name.
For more information, see “Creating an NSRP Cluster” on page 11-29.)
WebUI
1. Certificate Generation
Objects > Certificates > New: Enter the following, then click Generate:
The device generates a PKCS #10 file and prompts you to send the file through
email, save the file to disk, or automatically enroll through the Simple
Certificate Enrollment Protocol (SCEP).
NOTE: Some CAs do not support an email address in a certificate. If you do not include an
email address in the local certificate request, you cannot use an email address as
the local IKE ID when configuring the security device as a dynamic peer. Instead,
you can use a fully qualified domain name (if it is in the local certificate), or you
can leave the local ID field empty. By default the security device sends its
hostname.domainname. If you do not specify a local ID for a dynamic peer, enter
the hostname.domainname of that peer on the device at the other end of the IPSec
tunnel in the peer ID field.
The value 1024 indicates the bit length of the key pair. If you are using the
certificate for SSL (see “Secure Sockets Layer” on page 3-5), be sure to use a bit
length that your browser also supports.
Using the email address assumes that you have already configured the IP address
for your SMTP server: set admin mail server-name { ip_addr | dom_name }.
2. Certificate Request
The security administrator opens the file and copies its contents, taking care to
copy the entire text but not any blank spaces before or after the text. (Start at
“-----BEGIN CERTIFICATE REQUEST-----”, and end at “-----END CERTIFICATE
REQUEST-----”.)
The security administrator then follows the certificate request directions at the
CA’s website, pasting the PKCS #10 file in the appropriate field when required.
3. Certificate Retrieval
When the security administrator receives the certificate from the CA through
email, the administrator forwards it to you. Copy it to a text file, and save it to
your workstation (to be loaded to the security device later through the WebUI)
or to a TFTP server (to be loaded later through the CLI).
CLI
1. Certificate Generation
set pki x509 dn country-name US
set pki x509 dn email [email protected]
set pki x509 dn ip 10.10.5.44
set pki x509 dn local-name “Santa Clara”
set pki x509 dn name “Michael Zhang”
set pki x509 dn org-name “Juniper Networks”
set pki x509 dn org-unit-name Development
set pki x509 phone 408-730-6000
set pki x509 dn state-name CA
set pki x509 default send-to [email protected]
exec pki rsa new-key 1024
NOTE: Using the email address assumes that you have already configured the IP address
for your SMTP server: set admin mail server-name { ip_addr | dom_name }.
2. Certificate Request
The security administrator opens the file and copies its contents, taking care to
copy the entire text but not any blank spaces before or after the text. (Start at
“-----BEGIN CERTIFICATE REQUEST-----”, and end at “-----END CERTIFICATE
REQUEST-----”.)
The security administrator then follows the certificate request directions at the
CA’s website, pasting the PKCS #10 file in the appropriate field when required.
3. Certificate Retrieval
When the security administrator receives the certificate from the CA through
email, the administrator forwards it to you. Copy it to a text file, and save it to
your workstation (to be loaded to the security device later through the WebUI)
or to a TFTP server (to be loaded later through the CLI).
A local certificate that identifies your local machine (your public key)
For the WebUI example, you have downloaded the files to a directory named
C:\certs\ns on the administrator’s workstation. For the CLI example, you have
downloaded the TFTP root directory on a TFTP server with IP address 198.168.1.5.
NOTE: Juniper Networks security devices (including virtual systems) configured with
ScreenOS 2.5 or later support loading multiple local certificates from different
CAs.
This example illustrates how to load two certificate files named auth.cer (CA
certificate) and local.cer (your public key), along with the CRL file named
distrust.crl.
WebUI
1. Objects > Certificates: Select Load Cert, then click Browse.
The directory path and filename (C:\certs\ns\auth.cer) appear in the File Browse
field.
3. Click Load.
The directory path and filename (C:\certs\ns\local.cer) appear in the File Browse
field.
6. Click Load.
9. Click Load.
CLI
exec pki x509 tftp 198.168.1.5 cert-name auth.cer
exec pki x509 tftp 198.168.1.5 cert-name local.cer
exec pki x509 tftp 198.168.1.5 crl-name distrust.crl
NOTE: The CRL distribution point extension (.cdp) in an X509 certificate can be either an
HTTP URL or an LDAP URL.
With ScreenOS 2.5 and later, you can disable the checking of a CRL’s digital
signature when you load the CRL. However, disabling CRL certificate checking
compromises the security of your device.
In this example, you first configure the Entrust CA server to check the CRL daily by
connecting to the LDAP server at 2.2.2.121 and locating the CRL file. You then
configure default certificate-validation settings to use the company’s LDAP server at
10.1.1.200, also checking the CRL every day.
NOTE: The index (IDX) number for the Entrust CA certificate is 1. To view a list of the IDX
numbers for all the CA certificates loaded on a security device, use the following
CLI command: get pki x509 list ca-cert.
WebUI
Objects > Certificates (Show: CA) > Server Settings (for NetScreen): Enter the
following, then click OK:
Objects > Certificates > Default Cert Validation Settings: Enter the following,
then click OK:
CLI
set pki authority 1 cert-path full
set pki authority 1 cert-status crl url “ldap:///CN=Entrust,CN=en2001,
CN=PublicKeyServices,CN=Services,CN=Configuration,DC=EN2000,DC=com?
CertificateRevocationList?base?objectclass=CRLDistributionPoint”
set pki authority 1 cert-status crl server-name 2.2.2.121
set pki authority 1 cert-status crl refresh daily
set pki authority default cert-path full
set pki authority default cert-status crl url “ldap:///CN=NetScreen,
CN=safecert,CN=PublicKeyServices,CN=Services,CN=Configuration,DC=SAFE
CERT,
DC=com?CertificateRevocationList?base?objectclass=CRLDistributionPoint”
set pki authority default cert-status crl server-name 10.1.1.200
set pki authority default cert-status crl refresh daily
save
Obtain a certificate authority (CA) certificate from which you intend to obtain a
personal certificate, and then load the CA certificate in the security device.
Because the manual method of requesting local certificates has steps requiring you
to copy information from one certificate to another, it can be a somewhat lengthy
process. To bypass these steps, you can use the automatic method.
Note that, before using SCEP, you must perform the following tasks:
Assign a hostname and domain name to the security device. (If the security
device is in an NSRP cluster, replace the hostname with a cluster name. For
more information, see “Creating an NSRP Cluster” on page 11-29.)
In this example, you use the automatic method to request a local certificate. You use
SCEP with the Verisign CA. You set the following CA settings:
RA CGI: http://ipsec.verisign.com/cgi-bin/pkiclient.exe
NOTE: The Common Gateway Interface (CGI) is a standard way for a webserver to pass a
user request to an application program and to receive data back. CGI is part of the
HyperText Transfer Protocol (HTTP). You must specify an RA CGI path even if the
RA does not exist. If the RA does not exist, use the value specified for the CA CGI.
CA CGI: http://ipsec.verisign.com/cgi-bin/pkiclient.exe
CA ID, which identifies a SCEP server, where Verisign SCEP server uses a
domain name, such as juniper.net or a domain set up by Verisign for your
company
Challenge password
You then generate an RSA key pair, specifying a key length of 1024 bits, and initiate
the SCEP operation to request a local certificate from the Verisign CA with the above
CA settings.
When using the WebUI, you refer to CA certificates by name. When using the CLI,
you refer to CA certificates by index (IDX) number. In this example, the IDX number
for the Verisign CA is “1.” To see the IDX numbers for CA certificates, use the
following command: get pki x509 list ca-cert. The output displays an IDX number
and an ID number for each certificate. Note the IDX number and use that when
referencing the CA certificate in commands.
WebUI
1. CA Server Settings
Objects > Certificates > Show CA > Server Settings (for Verisign): Enter the
following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic CA Server Settings configuration page:
Polling Interval: 30
Certificate Authentication: Auto
Certificate Renew: 14
2. Local Certificate Request
Objects > Certificates > New: Enter the following, then click Generate:
NOTE: The value 1024 indicates the bit length of the key pair. If you are using the
certificate for SSL, be sure to use a bit length that your browser also supports.
Issue the get pki x509 pkcs CLI command to have the security device generate
a PKCS #10 file and then, do one of the following:
Save it to disk
3. Automatic Enrollment
Select the Automatically enroll to option, select the Existing CA server
settings option, then select Verisign from the drop-down list.
CLI
1. CA Server Settings
set pki authority 1 cert-path full
set pki authority 1 scep ca-cgi “http://ipsec.verisign.com/cgi-bin
/pkiclient.exe”
set pki authority 1 scep ra-cgi “http://ipsec.verisign.com/cgi-bin
/pkiclient.exe”
set pki authority 1 scep polling-int 30
set pki authority 1 scep renew-start 14
NOTE: The Common Gateway Interface (CGI) is a standard way for a webserver to pass a
user request to an application program, and to receive data back. CGI is part of the
HyperText Transfer Protocol (HTTP).
You must specify an RA CGI path even if the RA does not exist. If the RA does not
exist, use the value specified for the CA CGI.
If this is the first certificate request from this CA, a prompt appears presenting a
fingerprint value for the CA certificate. You must contact the CA to confirm that this
is the correct CA certificate.
Contact Verisign to inform them of your certificate request. They must authorize the
certificate request before you can download the certificate.
This feature is disabled by default. You can configure the security device to
automatically send out a request to renew a certificate before it expires. You can set
the time when you want the security device to send out the certificate renewal
request in number of days and minutes before the expiration date. By setting
different times for each certificate, you prevent the security device from having to
renew all certificates at the same time.
For this feature to work, the security device must be able to reach the SCEP server,
and the certificate must be present on the security device during the renewal
process. Furthermore, for this feature to work, you must also ensure that the CA
issuing the certificate can do the following:
Return the same DN (Domain Name). In other words, the CA cannot modify the
subject name and SubjectAltName extension in the new certificate.
You can enable and disable the automatic SCEP certificate-renewal feature for all
SCEP certificates or for individual certificates.
Key-Pair Generation
A security device holds pregenerated keys in memory. The number of pregenerated
keys depends on the device model. During normal operation, the security device
can manage to have enough keys available to renew certificates by generating a
new key every time it uses one. The process of generating a key usually goes
unnoticed as the device has time to generate a new key before one is needed. In the
event that the security device renews a great number of certificates at once, thus
using up keys rapidly, it might run out of pregenerated keys and have to generate
them promptly for each new request. In this case, the generation of keys might
affect the performance of the security device, especially in a high-availability (HA)
environment where the performance of the security device might slow down for a
number of minutes.
The number of pregenerated key pairs on a security device depends on the model.
For more information, refer to the datasheet for your Juniper Networks security
product.
When a security device uses OCSP, it is referred to as the OCSP client (or requester).
This client sends a verification request to a server device called the OCSP responder.
ScreenOS supports RSA Keon and Verisign as OCSP responders. The client’s request
contains the identity of the certificate to check. Before the security device can
perform any OCSP operation, you must configure it to recognize the location of the
OCSP responder.
NOTE: We have also successfully tested with the Valicert OCSP responder during an
extensive evaluation in the past.
After receiving the request, the OCSP responder confirms that the status
information for the certificate is available, then returns the current status to the
security device. The response of the OCSP responder contains the certificate’s
revocation status, the name of the responder, and the validity interval of the
response. Unless the response is an error message, the responder signs the
response using the responder’s private key. The security device verifies the validity
of the responder’s signature by using the certificate of the responder. The certificate
of the responder may either be embedded in the OCSP response, or stored locally
and specified in the OCSP configuration. If the certificate is stored locally, use the
following command to specify the locally stored certificate:
id_num1 identifies the CA certificate that issued the certificate being verified,
and id_num2 identifies the locally stored certificate the device uses to verify the
signature on the OCSP response.
If the certificate of the responder is not embedded in the OCSP response or stored
locally, then the security device verifies the signature by using the CA certificate that
issued the certificate in question.
You can use CLI commands to configure a security device for OCSP. Most of these
commands use an identification number to associate the revocation reference URL
with the CA certificate. You can obtain this ID number using the following CLI
command:
NOTE: The security device dynamically assigns the ID number to the CA certificate when
you list the CA certificates. This number might change after you modify the
certificate store.
where id_num is the identification number for the certificate issued by the CA.
To display the status check attributes for the CA that issued certificate 7:
Self-Signed Certificates
A self-signed certificate is a certificate that is signed by and issued to the same
entity; that is, the issuer and the subject of the certificate are the same. For
example, the CA certificates of all root certificate authorities (CAs) are self-signed.
Although you cannot export an auto-generated self-signed certificate, you can copy
its subject name and fingerprint. You can then deliver this to a remote admin who
can later use the subject name and fingerprint to verify the self-signed certificate
received during SSL negotiations. Checking the subject name and fingerprint is an
important precaution against man-in-the-middle attacks in which someone
intercepts an SSL connection attempt and pretends to be the targeted security
device by responding with his own self-signed certificate. (For more information
about verifying a self-signed certificate, see “Certificate Validation” on page 48.)
You can use a self-signed certificate when making a Secure Sockets Layer (SSL)
connection to the security device. When you manage the device through the WebUI,
SSL can provide authentication and encryption to secure your administrative traffic.
You can even configure a security device to redirect an administrative connection
attempt using HTTP (default port 80) to SSL (default port 443).
NOTE: For more information about SSL, including the HTTP-to-SSL redirect mechanism,
see “Secure Sockets Layer” on page 3-5.
NOTE: To learn how to create another self-signed certificate, see “Manually Creating
Self-Signed Certificates” on page 49. To learn how to delete an auto-generated
self-signed certificate, see “Deleting Self-Signed Certificates” on page 55.
Self-Signed Certificates 47
Concepts & Examples ScreenOS Reference Guide
Certificate Validation
During an SSL handshake, the security device authenticates itself by sending a
certificate to the SSL client. When the security device sends a self-signed certificate,
the SSL client cannot validate it by checking the issuing CA’s signature because no
CA issued it. When the security device presents a self-signed certificate for use in
establishing an SSL session, the browser on the admin’s computer tries to validate it
with a CA certificate in its CA store. When it fails to find such an authority, the
browser displays a message such as that shown in Figure 18, prompting the admin
to accept or refuse the certificate.
If this is the first time connecting to the security device after its initial bootup, the
system clock might be inaccurate. Consequently, the validity period on the
certificate might also be inaccurate. Even if you set the system clock and then
regenerate a self-signed certificate, the browser can never find an authenticating
CA, so the administrator must be prepared to see one of the above messages each
time the security device uses a self-signed certificate for an SSL connection.
48 Self-Signed Certificates
Chapter 2: Public Key Cryptography
NOTE: You cannot view the details of an auto-generated self-signed certificate through the
WebUI.
After viewing the subject name and fingerprint, you can copy and deliver them
(using a secure out-of-band method of your choice) to the admin that is later going
to connect to the security device through SSL. When the admin’s SSL client receives
the certificate from the security device during the SSL handshake, the admin can
compare the subject name and fingerprint in the received certificate with those that
received earlier out-of-band. If they match, the admin knows that the certificate is
authentic. Because there is no trusted third-party CA authority to authenticate the
certificate, wIthout the subject name and fingerprint to compare, the remote admin
cannot know for sure if the certificate is genuine.
The auto-generated self-signed certificate uses a fixed key size of 1024 bits.
Your needs might require a larger or smaller key size, which you can control
when generating your own self-signed key.
You might want to use a certificate with a different subject name from the one
that is automatically created.
You might have a need for multiple self-signed certificates. On security devices
that support virtual systems, the root system can share the auto-generated
self-signed certificate with all the virtual systems. However, vsys administrators
might prefer to generate their own self-signed certificates and then require their
administrators to check the subject name and fingerprint of these specific
certificates instead of the attributes of a shared certificate.
NOTE: Unlike an auto-generated self-signed certificate, which never passes outside the
device in which it is created, a manually generated self-signed certificate is
included with other certificates when a security device in an NSRP cluster
synchronizes PKI objects with other members in the cluster.
Self-Signed Certificates 49
Concepts & Examples ScreenOS Reference Guide
NOTE: For the current ScreenOS release, we support self-signed certificates only for use
with SSL.
Name: 4ssl
Organization: jnpr
FQDN: www.juniper.net
After defining it, you generate the certificate and view it. You can then copy the
subject name and fingerprint (also referred to as a “thumbprint”) for distribution to
other admins logging in through SSL to manage the security device.
When an admin attempts to log in using SSL, the security device sends him this
certificate. The admin can open the certificate and compare the subject name and
fingerprint in the certificate with the information received previously. If they match,
the admin knows that the certificate is authentic.
50 Self-Signed Certificates
Chapter 2: Public Key Cryptography
WebUI
1. Define the Certificate Attributes
Objects > Certificates > New: Enter the following, then click Generate:
You can copy the subject name and fingerprint from this page and communicate it
to other administrators who intend to use SSL when managing the security device.
When they initiate an SSL connection, they can then use this information to ensure
that the certificate they receive is indeed from the security device.
Self-Signed Certificates 51
Concepts & Examples ScreenOS Reference Guide
CLI
1. Define the Certificate Attributes
set pki x509 dn name 4ssl
set pki x509 dn org-name jnpr
set pki x509 cert-fqdn www.juniper.net
save
2. Generate the Self-Signed Certificate
To generate a public/private key pair, which the Juniper Networks security device
uses in its certificate request, enter the following command:
After the security device generates a key pair, it composes the following certificate
request:
To learn the ID number for the key pair, use the following command:
52 Self-Signed Certificates
Chapter 2: Public Key Cryptography
To view the certificate in more detail, enter the following command using the ID
number of the certificate:
You can copy the subject name and fingerprint from this output and communicate
it to other administrators who intend to use SSL when managing the security
device. When they initiate an SSL connection, they can then use this information to
ensure that the certificate they receive is indeed from the security device.
Self-Signed Certificates 53
Concepts & Examples ScreenOS Reference Guide
Certificate Auto-Generation
The first time the security device powers up, it automatically generates a self-signed
certificate. The primary purpose of this certificate is to support SSL immediately
after the initial bootup of a security device. To see this certificate, use the following
CLI command:
You can use the following command to see if a certificate is already configured for
SSL:
get ssl
web SSL enable.
web SSL port number(443).
web SSL cert: Default - System Self-Signed Cert.
web SSL cipher(RC4_MD5).
In the above output, you can see that SSL is using the automatically generated
(“System”) self-signed certificate.
Figure 20 shows the decision path for certificate generation that the security device
takes when booting up.
54 Self-Signed Certificates
Chapter 2: Public Key Cryptography
Auto-gen
self-signed Yes
cert exists
Yes
Do not automatically
Cert for SSL generate a self-signed
exists Yes certificate.
No
Automatically generate a
self-signed certificate.
If you delete the auto-generated self-signed certificate and then later want the
security device to generate another one, do the following:
Assign no other certificate for SSL (You can use the following command: unset
ssl cert).
Self-Signed Certificates 55
Concepts & Examples ScreenOS Reference Guide
The security device can redirect HTTP traffic (default port 80) sent to the device
itself to SSL (default port 443). Therefore, to ensure that a certificate is available for
SSL, during the bootup process, the security device always checks if an
auto-generated self-signed certificate exists or if another certificate has been
assigned for SSL to use. If there is no auto-generated self-signed certificate and no
other certificate is assigned for SSL use, the security device automatically generates
a self-signed certificate.
NOTE: You can only delete an automatically generated self-signed certificate through the
CLI.
To learn the ID number for a certificate, use the following command: get pki x509
list local-cert.
For information about the redirection of HTTP traffic to SSL, see “Redirecting
HTTP to SSL” on page 3-8.
56 Self-Signed Certificates
Chapter 3
Virtual Private Network Guidelines
The second half of the chapter explores the difference between policy-based and
route-based VPN tunnels. It also examines the packet flow for a route-based and
policy-based site-to-site AutoKey IKE VPN tunnel to see the outbound and inbound
processing stages that a packet undergoes. The chapter concludes with some VPN
configuration tips to keep in mind when configuring a tunnel.
57
Concepts & Examples ScreenOS Reference Guide
Cryptographic Options
When configuring a VPN, you must make many decisions about the cryptography
you want to use. Questions arise about which Diffie-Hellman group is the right one
to choose, which encryption algorithm provides the best balance between security
and performance, and so on. This section presents all the cryptographic options
required to configure a basic site-to-site VPN tunnel and a basic dialup VPN tunnel
and explains one or more benefits about each one to help you make your decisions.
The first decision that you must make is whether the tunnel is for a site-to-site VPN
tunnel (between two security devices) or whether it is for a dialup VPN (from the
NetScreen-Remote VPN client to a security device). Although this is a networking
decision, the distinction between the two types of tunnels affects some
cryptographic options. Therefore, the options are presented in two different figures:
“Dialup VPN Options” explains Figure 22, “Cryptographic Options for a Dialup
VPN Tunnel,” on page 65.
After you decide whether you are going to configure a site-to-site tunnel or a dialup
tunnel, you can refer to either Figure 21 on page 59 or Figure 22 on page 65 for
guidance. Each figure presents the cryptographic choices that you must make while
configuring the tunnel. Following each figure are reasons for choosing each option
that appears in the figure.
NOTE: Examples for configuring both kinds of tunnels are in Chapter 4, “Site-to-Site
Virtual Private Networks,” and Chapter 5, “Dialup Virtual Private Networks.”
58 Cryptographic Options
Chapter 3: Virtual Private Network Guidelines
2. Mode:
Aggressive or Main?
14. Mode:
4. Certificate Type: 7. IKE Encryption and Tunnel or Transport
RSA or DSA? Authentication Algorithms:
AES or DES or 3DES 15. ESP Options:
5. Bit Length: and
512 or 768 Encrypt or Encrypt/Auth or
MD5 or SHA-1?
or 1024 or 2048?
16. Encrypt Algorithms: 17. Auth Algorithms:
AES or DES or 3DES? MD5 or SHA-1?
8. Local IKE ID: 9. Remote IKE ID: 10. Anti-Replay
IP Address or U-FQDN IP Address or U-FQDN Checking:
or FQDN or ASN1-DN? or FQDN or ASN1-DN?
11. Perfect Forward Secrecy:
Yes or No?
Provides automatic key renewal and key freshness, thereby increasing security
Manual Key
Useful for debugging IKE problems
Main
Recommended
Can be used when the dialup user has a static IP address or if certificates are
used for authentication
Cryptographic Options 59
Concepts & Examples ScreenOS Reference Guide
Greater security than provided by preshared keys because you can validate
certificates with a certificate authority (CA). (For more information, see “Public
Key Cryptography” on page 29.)
Preshared Key
Easier to use and faster to set up because it does not require a Public Key
Infrastructure (PKI)
768
Provides more security than 512 bits
1024
Recommended
2048
Provides the most security
Diffie-Hellman Group 2
Recommended
Diffie-Hellman Group 5
Provides more security that Diffie-Hellman Groups 1 and 2
60 Cryptographic Options
Chapter 3: Virtual Private Network Guidelines
Diffie-Hellman Group 14
Provides the most security
7. IKE Encrypt and Auth Algorithms: AES or DES or 3DES and MD5 or SHA-1?
AES
Recommended
Cryptographically stronger than DES and 3DES if key lengths are all equal
DES
Incurs less processing overhead than 3DES and AES
3DES
Provides more cryptographic security than DES
MD5
Incurs less processing overhead than SHA-1
SHA-1
Recommended
Can only be used if the local security device has a static IP address
U-FQDN
User-Fully Qualified Domain Name (U-FQDN—an email address): Can be used with
a preshared key or a certificate if the U-FQDN appears in the SubjectAltName field
FQDN
Fully Qualified Domain Name (FQDN): Can be used with a preshared key or a
certificate if the FQDN appears in the SubjectAltName field
Cryptographic Options 61
Concepts & Examples ScreenOS Reference Guide
ASN1-DN
Can be used only with certificates
Useful if the CA does not support the SubjectAltName field in the certificates it
issues
Does not require you to enter a remote IKE ID for a peer at a static IP address
when using preshared keys for authentication and the peer is a security device
U-FQDN
User-Fully Qualified Domain Name (U-FQDN—an email address): Can be used with
a preshared key or a certificate if the U-FQDN appears in the SubjectAltName field
FQDN
Fully Qualified Domain Name (FQDN): Can be used with a preshared key or a
certificate if the FQDN appears in the SubjectAltName field
Does not require you to enter a remote IKE ID when using certificates for
authentication and the peer is a security device
ASN1-DN
Can be used only with certificates
Useful if the CA does not support the SubjectAltName field in the certificates it
issues
No
Disabling this might resolve compatibility issues with third-party peers
62 Cryptographic Options
Chapter 3: Virtual Private Network Guidelines
Perfect Forward Secrecy (PFS): Provides increased security because the peers
perform a second Diffie-Hellman exchange to produce the key used for IPSec
encryption/decryption
No
Provides faster tunnel setup
Diffie-Hellman Group 2
Recommended
Diffie-Hellman Group 5
Provides more security that Diffie-Hellman Groups 1 and 2
Diffie-Hellman Group 14
Provides the most security
AH
Authentication Header (AH): Provides authentication of the entire IP packet,
including the IPSec header and outer IP header
Cryptographic Options 63
Concepts & Examples ScreenOS Reference Guide
Transport
Required for L2TP-over-IPSec tunnel support
Encrypt/Auth
Recommended
Auth
Useful when you want authentication but do not require confidentiality. Perhaps
when the information is not secret, but it is important to establish that the
information truly comes from the person who claims to send it and that nobody
tampered with the content while in transit.
Cryptographically stronger than DES and 3DES if key lengths are all equal
Approved encryption algorithm for FIPS and Common Criteria EAL4 standards
DES
Incurs less processing overhead than 3DES and AES
3DES
Provides more cryptographic security than DES
SHA-1
Recommended
64 Cryptographic Options
Chapter 3: Virtual Private Network Guidelines
Using the recommended options from the previous list, a generic site-to-site VPN
configuration between two security devices with static IP addresses would consist
of the following components:
1. Mode:
Aggressive or Main?
Cryptographic Options 65
Concepts & Examples ScreenOS Reference Guide
Required when the IP address of one of the IPSec peers is dynamically assigned
and a preshared key is used
Main
Provides identity protection
Greater security than provided by preshared keys because you can validate
certificates with a certificate authority (CA). (For more information, see “Public
Key Cryptography” on page 29.)
Preshared Key
Easier to use and faster to set up because it does not require a Public Key
Infrastructure (PKI)
768
Provides more security than 512 bits
1024
Recommended
2048
Provides the most security
66 Cryptographic Options
Chapter 3: Virtual Private Network Guidelines
Diffie-Hellman Group 2
Recommended
Diffie-Hellman Group 5
Provides more security that Diffie-Hellman Groups 1 and 2
Diffie-Hellman Group 14
Provides the most security
6. IKE Encrypt and Auth Algorithms: AES or DES or 3DES and MD5 or SHA-1?
AES
Recommended
Cryptographically stronger than DES and 3DES if key lengths are all equal
Approved encryption algorithm for FIPS and Common Criteria EAL4 standards
DES
Incurs less processing overhead than 3DES and AES
3DES
Provides more cryptographic security than DES
MD5
Incurs less processing overhead than SHA-1
SHA-1
Recommended
Cryptographic Options 67
Concepts & Examples ScreenOS Reference Guide
U-FQDN
Recommended
FQDN
Fully Qualified Domain Name (FQDN): Can be used with a preshared key or a
certificate if the FQDN appears in the SubjectAltName field
ASN1-DN
Can be used only with certificates
Useful if the CA does not support the SubjectAltName field in the certificates it
issues
U-FQDN
Recommended
FQDN
Fully Qualified Domain Name (FQDN): Can be used with a preshared key or a
certificate if the FQDN appears in the SubjectAltName field
ASN1-DN
Can be used only with certificates
Useful if the CA does not support the SubjectAltName field in the certificates it
issues
68 Cryptographic Options
Chapter 3: Virtual Private Network Guidelines
No
Disabling this might resolve compatibility issues with third-party peers
Perfect Forward Secrecy (PFS): Provides increased security because the peers
perform a second Diffie-Hellman exchange to produce the key used for IPSec
encryption/decryption
No
Provides faster tunnel setup
Diffie-Hellman Group 2
Recommended
Diffie-Hellman Group 5
Provides more security that Diffie-Hellman Groups 1 and 2
Diffie-Hellman Group 14
Provides the most security
Cryptographic Options 69
Concepts & Examples ScreenOS Reference Guide
AH
Authentication Header (AH): Provides authentication of the entire IP packet,
including the IPSec header and outer IP header.
Transport
Required for L2TP-over-IPSec tunnel support
Encrypt/Auth
Recommended
Auth
Useful when you want authentication but do not require confidentiality. Perhaps
when the information is not secret, but it is important to establish that the
information truly comes from the person who claims to send it and that nobody
tampered with the content while in transit.
70 Cryptographic Options
Chapter 3: Virtual Private Network Guidelines
Cryptographically stronger than DES and 3DES if key lengths are all equal
Approved encryption algorithm for FIPS and Common Criteria EAL4 standards
DES
Incurs less processing overhead than 3DES and AES
3DES
Provides more cryptographic security than DES
SHA-1
Recommended
Using the recommended options from the above list, a generic dialup VPN
configuration between two security devices with static IP addresses would consist
of the following components:
Cryptographic Options 71
Concepts & Examples ScreenOS Reference Guide
With policy-based VPN tunnels, a tunnel is treated as an object (or a building block)
that together with source, destination, service, and action, comprises a policy that
permits VPN traffic. (Actually, the VPN policy action is tunnel, but the action permit
is implied, if unstated). In a policy-based VPN configuration, a policy specifically
references a VPN tunnel by name.
With route-based VPNs, the policy does not specifically reference a VPN tunnel.
Instead, the policy references a destination address. When the security device does
a route lookup to find the interface through which it must send traffic to reach that
address, it finds a route through a tunnel interface, which is bound to a specific VPN
tunnel.
NOTE: Typically, a tunnel interface is bound to a single tunnel. You can also bind a tunnel
interface to multiple tunnels. For more information, see “Multiple Tunnels per
Tunnel Interface” on page 265.
Thus, with a policy-based VPN tunnel, you can consider a tunnel as an element in
the construction of a policy. With a route-based VPN tunnel, you can consider a
tunnel as a means for delivering traffic, and the policy as a method for either
permitting or denying the delivery of that traffic.
The number of policy-based VPN tunnels that you can create is limited by the
number of policies that the device supports. The number of route-based VPN
tunnels that you create is limited by the number of route entries or the number of
tunnel interfaces that the device supports—whichever number is lower.
Another advantage that route-based VPNs offer is the exchange of dynamic routing
information through VPN tunnels. You can enable an instance of a dynamic routing
protocol, such as Border Gateway Protocol (BGP), on a tunnel interface that is bound
to a VPN tunnel. The local routing instance exchanges routing information through
the tunnel with a neighbor enabled on a tunnel interface bound to the other end.
When a tunnel does not connect large networks running dynamic routing protocols
and you do not need to conserve tunnels or define various policies to filter traffic
through the tunnel, a policy-based tunnel makes sense. Also, because there is no
network beyond a dialup VPN client, policy-based VPN tunnels can be a good
choice for dialup VPN configurations.
That said, when the dialup client supports a virtual internal IP address—which the
NetScreen-Remote does—there are also compelling reasons for using a route-based
VPN configuration. A route-based dialup VPN tunnel offers the following benefits:
You can bind its tunnel interface to any zone to require or not require policy
enforcement.
You can define routes to force traffic through the tunnel, unlike a policy-based
VPN configuration.
You can adjust the proxy ID to accept any IP address from the dialup VPN client
by configuring the remote client’s address as 255.255.255.255/32.
You can define one or more mapped IP (MIP) addresses on the tunnel interface.
NOTE: For an example of a route-based VPN configuration for a dialup client, see
“Route-Based Dialup VPN, Dynamic Peer” on page 176.
A company based in Tokyo has just opened a branch office in Paris and needs to
connect the two sites through an IPSec tunnel. The tunnel uses AutoKey IKE, the
ESP protocol, AES for encryption, SHA-1 for authentication using a preshared key,
and has anti-replay checking enabled. The security devices protecting each site are
in NAT mode, and all the zones are in the trust-vr routing domain. The addresses
are as shown in Figure 23 on page 74.
tunnel.1, 10.1.2.1/24
Outgoing Interface: ethernet3, 1.1.1.1/24
ethernet1
10.1.1.1/24 External Router: 1.1.1.250
10.1.1.5
Internet Paris
Tokyo
LAN VPN1 LAN
10.2.2.5
External Router: 2.2.2.250
ethernet1
Outgoing Interface: ethernet3, 2.2.2.2/24 10.2.2.1/24
tunnel.2, 10.2.1.1/24
Paris
Untrust Zone Office Trust Zone
The path of a packet coming from 10.1.1.5/32 in the Tokyo LAN and going to
10.2.2.5/32 in the Paris LAN through an IPSec tunnel proceeds as described in the
following subsections.
Tokyo (Initiator)
1. The host at 10.1.1.5 sends a packet destined for 10.2.2.5 to 10.1.1.1, which is
the IP address ethernet1 and is the default gateway configured in the TCP/IP
settings of host.
3. If you have enabled SCREEN options such as IP spoof detection for the Trust
zone, the security device activates the SCREEN module at this point. SCREEN
checking can produce one of the following three results:
If you have not enabled any SCREEN options for the Trust zone, the security
device immediately proceeds to the next step.
4. The session module performs a session lookup, attempting to match the packet
with an existing session.
If the packet does not match an existing session, the security device performs
First Packet Processing, a procedure involving the remaining steps.
If the packet matches an existing session, the security device performs Fast
Processing, using the information available from the existing session entry to
process the packet. Fast Processing bypasses the route and policy lookups
because the information generated by the bypassed steps has already been
obtained during the processing of the first packet in the session.
6. To determine the destination zone, the route module does a route lookup for
10.2.2.5. (The route module uses the ingress interface to determine which
virtual router to use for the route lookup.) It finds a route entry directing traffic
to 10.2.2.5 through the tunnel.1 interface bound to a VPN tunnel named
“vpn1”. The tunnel interface is in the Untrust zone. By determining the ingress
and egress interfaces, the security device has thereby determined the source
and destination zones and can now do a policy lookup.
7. The policy engine does a policy lookup between the Trust and Untrust zones (as
determined by the corresponding ingress and egress interfaces). The action
specified in the policy matching the source address and zone, destination
address and zone, and service is permit.
8. The IPSec module checks if an active Phase 2 security association (SA) exists
with the remote peer. The Phase 2 SA check can produce either of the following
results:
If the IPSec module does not discover an active Phase 2 SA with that peer,
it drops the packet and triggers the IKE module.
9. The IKE module checks if an active Phase 1 SA exists with the remote peer. The
Phase 1 SA check can produce either of the following results:
If the IKE module discovers an active Phase 1 SA with the peer, it uses this
SA to negotiate a Phase 2 SA.
If the IKE module does not discover an active Phase 1 SA with that peer, it
begins Phase 1 negotiations in Main mode, and then Phase 2 negotiations.
10. The IPSec module puts an ESP header and then an outer IP header on the
packet. Using the address specified as the outgoing interface, it puts 1.1.1.1 as
the source IP address in the outer header. Using the address specified for
remote gateway, it puts 2.2.2.2 as the destination IP address in the outer
header. Next, it encrypts the packet from the payload to the next header field in
the original IP header. Then, it authenticates the packet from the ESP trailer to
the ESP header.
11. The security device sends the encrypted and authenticated packet destined for
2.2.2.2 through the outgoing interface (ethernet3) to the external router at
1.1.1.250.
Paris (Recipient)
1. The packet arrives at 2.2.2.2, which is the IP address of ethernet3, an interface
bound to the Untrust zone.
2. Using the SPI, destination IP address, and IPSec protocol contained in the outer
packet header, the IPSec module attempts to locate an active Phase 2 SA with
the initiating peer along with the keys to authenticate and decrypt the packet.
The Phase 2 SA check can produce one of the following three results:
If the IPSec module does not discover an active Phase 2 SA with the peer
but it can match an inactive Phase 2 SA using the source IP address but not
the SPI, it drops the packet, makes an event log entry, and sends a
notification that it received a bad SPI to the initiating peer.
If the IPSec module does not discover an active Phase 2 SA with that peer,
it drops the packet and triggers the IKE module.
3. The IKE module checks if an active Phase 1 SA exists with the remote peer. The
Phase 1 SA check can produce either of the following results:
If the IKE module discovers an active Phase 1 SA with the peer, it uses this
SA to negotiate a Phase 2 SA.
If the IKE module does not discover an active Phase 1 SA with that peer, it
begins Phase 1 negotiations in Main mode, and then Phase 2 negotiations.
4. The IPSec module performs an anti-replay check. This check can produce one
of two results:
If the packet passes the anti-replay check, the security device proceeds to
the next step.
If the packet fails the authentication check, the security device drops the
packet.
If the packet passes the authentication check, the security device proceeds
to the next step.
6. Using the Phase 2 SA and keys, the IPSec module decrypts the packet,
uncovering its original source address (10.1.1.5) and its ultimate destination
(10.2.2.5). It learns that the packet came through vpn1, which is bound to
tunnel.1. From this point forward, the security device treats the packet as if its
ingress interface is tunnel.1 instead of ethernet3. It also adjusts the anti-replay
sliding window at this point.
7. If you have enabled SCREEN options for the Untrust zone, the security device
activates the SCREEN module at this point. SCREEN checking can produce one
of the following three results:
8. The session module performs a session lookup, attempting to match the packet
with an existing session. It then either performs First Packet Processing or Fast
Processing.
If the packet matches an existing session, the security device performs Fast
Processing, using the information available from the existing session entry to
process the packet. Fast Processing bypasses all but the last two steps
(encrypting the packet and forwarding it) because the information generated by
the bypassed steps has already been obtained during the processing of the first
packet in the session.
10. The route module first uses the ingress interface to determine the virtual router
to use for the route lookup; in this case, the trust-vr. It then performs a route
lookup for 10.2.2.5 in the trust-vr and discovers that it is accessed through
ethernet1. By determining the ingress interface (tunnel.1) and the egress
interface (ethernet1), the security device can thereby determine the source and
destination zones. The tunnel.1 interface is bound to the Untrust zone, and
ethernet1 is bound to the Trust zone. The security device can now do a policy
lookup.
11. The policy engine checks its policy list from the Untrust zone to the Trust zone
and finds a policy that grants access.
12. The security device forwards the packet through ethernet1 to its destination at
10.2.2.5.
Tokyo (Initiator)
The first stages of the outbound packet flow are the same for both route-based and
policy-based VPN configurations until the route lookup and subsequent policy
lookup occur:
Route Lookup: To determine the destination zone, the route module does a
route lookup for 10.2.2.5. Not finding an entry for that specific address, the
route module resolves it to a route through ethernet3, which is bound to the
Untrust zone. By determining the ingress and egress interfaces, the security
device has thereby determined the source and destination zones, and can now
perform a policy lookup.
Policy Lookup: The policy engine does a policy lookup between the Trust and
Untrust zones. The lookup matches the source address and zone, destination
address and zone, and service and finds a policy that references a VPN tunnel
named vpn1.
The security device then forwards the packet through ethernet1 to its destination at
10.2.2.5.
Paris (Recipient)
Most stages of the inbound packet flow on the recipient’s end are the same for both
route-based and policy-based VPN configurations except that the tunnel is not
bound to a tunnel interface, but to a tunnel zone. The security device learns that the
packet came through vpn1, which is bound to the Untrust-Tun tunnel zone, whose
carrier zone is the Untrust zone. Unlike route-based VPNs, the security device
considers ethernet3 to be the ingress interface of the decrypted packet—not
tunnel.1.
The flow changes after packet decryption is complete. At this point, the route and
policy lookups differ:
Route Lookup: The route module performs a route lookup for 10.2.2.5 and
discovers that it is accessed through ethernet1, which is bound to the Trust
zone. By learning that the Untrust zone is the source zone (because vpn1 is
bound to the Untrust-Tun tunnel zone, whose carrier zone is the Untrust zone)
and by determining the destination zone based on the egress interface
(ethernet1 is bound to the Trust zone), the security device can now check for a
policy from the Untrust to the Trust zones that references vpn1.
Policy Lookup: The policy engine checks its policy list from the Untrust zone to
the Trust zone and finds a policy that references a VPN tunnel named vpn1 and
that grants access to 10.2.2.5.
If you want to use certificates for authentication and there is more than one
local certificate loaded on the security device, you must specify which
certificate you want each VPN tunnel configuration to use. For more
information about certificates, see “Public Key Cryptography” on page 29.
Use user-defined addresses in the policy, not the pre-defined address “Any”.
The proxy ID for both peers must match, which means that the service
specified in the proxy ID for both peers is the same, and the local IP address
specified for one peer is the same as the remote IP address specified for the
other peer.
The simplest way to ensure that the proxy IDs match is to use 0.0.0.0/0 for the local
address, 0.0.0.0/0 for the remote address, and “any” for the service. Instead of
using the proxy ID for access control, you use policies to control the traffic to and
from the VPN. For examples of VPN configurations with user-configurable proxy
IDs, see the route-based VPN examples in “Site-to-Site Virtual Private Networks” on
page 89.
NOTE: When the remote address is the virtual internal address of a dialup VPN client, use
255.255.255.255/32 for the remote IP address /netmask in the proxy ID.
As long as the peers’ proxy ID settings match, it does not matter if one peer
defines a route-based VPN and the other defines a policy-based VPN. If peer-1
uses a policy-based VPN configuration and peer-2 uses a route-based VPN
configuration, then peer-2 must define a proxy ID that matches the proxy ID
derived from peer-1’s policy. If peer-1 performs Source Network Address
Translation (NAT-src) using a DIP pool, use the address and netmask for the DIP
pool as the remote address in peer-2’s proxy ID. For example:
When the DIP Pool Is: Use This in the Proxy ID:
1.1.1.8 – 1.1.1.8 1.1.1.8/32
1.1.1.20 – 1.1.1.50 1.1.1.20/26
1.1.1.100 – 1.1.1.200 1.1.1.100/25
1.1.1.0 – 1.1.1.255 1.1.1.0/24
For more information about proxy IDs when used with NAT-src and NAT-dst, see
“VPN Sites with Overlapping Addresses” on page 150.
NOTE: Peer-1 can also define a proxy ID that matches peer-2’s proxy ID. Peer-1’s
user-defined proxy ID supersedes the proxy ID that the security device derives
from the policy components.
Because proxy IDs support either a single service or all services, the service in a
proxy ID derived from a policy-based VPN referencing a service group is
considered as “any”.
When both peers have static IP addresses, they can each use the default IKE ID,
which is their IP addresses. When a peer or dialup user has a dynamically
assigned IP address, that peer or user must use another type of IKE ID. An
FQDN is a good choice for a dynamic peer and a U-FQDN (email address) is a
good choice for a dialup user. You can use both FQDN and U-FQDN IKE ID
types with preshared keys and certificates (if the FQDN or U-FQDN appears in
the SubjectAltName field in the certificate). If you use certificates, the dynamic
peer or dialup user can also use all or part of the ASN1-DN as the IKE ID.
However, when using VPN monitoring with a route-based VPN tunnel configuration,
the state of a tunnel might change from up to down. When this occurs, all route
table entries referencing the tunnel interface bound to that tunnel change to
inactive. Then, when the security device does a route lookup for traffic originally
intended to be encrypted and sent through a tunnel bound to that tunnel interface,
it bypasses the route referencing the tunnel interface and searches for a route with
the next longest match. The route that it finds might be the default route. Using this
route, the security device would then send the traffic unencrypted (that is, in clear
or plain text) out through a non-tunnel interface to the public WAN.
To avoid rerouting traffic originally intended for a VPN tunnel to the public WAN in
clear text, you can configure the security device to reroute such traffic to another
tunnel, reroute it to a leased line, or just drop it, by using one of the following
work-arounds:
“Null Route” on page 81 (drops traffic when the route to the tunnel interface
becomes inactive)
“Decoy Tunnel Interface” on page 86 (drops traffic when the route to the tunnel
interface becomes inactive)
“Virtual Router for Tunnel Interfaces” on page 87 (drops traffic when the route
to the tunnel interface becomes inactive)
Null Route
If the state of a VPN tunnel changes to “down,” the security device changes any
route referencing that tunnel interface to “inactive.” If the route to the tunnel
interface becomes unavailable and the next choice is the default route (for
example), then the security device uses the default route to forward the traffic
originally intended for the VPN tunnel. To avoid sending traffic in plain text out to
the public WAN when a route change occurs, you can make use of a null route. A
null route targets the same destination address as the route through the tunnel
interface, but it instead points the traffic to the Null interface. The Null interface is a
logical interface that drops traffic sent to it. You give the null route a higher metric
(farther from zero) than the route using the tunnel interface so that the null route is
less preferred.
NOTE: Releases prior to ScreenOS 5.1.0 do not support a null interface. However, you can
use a decoy tunnel interface to accomplish the same objective. For information,
see “Decoy Tunnel Interface” on page 86.
For example, if you create a static route through tunnel.1 to a remote LAN with the
IP address 10.2.2.0/24, it automatically receives the default value of 1 for its metric:
In the routing table above, the security device has two routes to reach any address
in the 10.2.2.0/24 subnet. The first choice is route #4 because it has the longest
match with that address. The second choice is the default route (0.0.0.0/0).
If you then add another route to 10.2.2.0/24 through the Null interface and give it a
value greater than 1, that route becomes the second routing choice to any address
in the 10.2.2.0/24 subnet. If the route to 10.2.2.0/24 through tunnel.1 becomes
inactive, then the security device uses the route to the Null interface. The security
device forwards traffic for 10.2.2.0/24 to that interface, and then drops it.
In the routing table above, the route to 10.2.2.0/24 through tunnel.1 is inactive
(indicated by the absence of an asterisk in the far left column). Therefore, the
security device searches for the next route that has the longest match to the
destination address, and it finds route #5. (The next choice after route #5 is the
default route with ID #3.) The security device then forwards traffic for 10.2.2.0/24 to
the null interface, which drops the traffic. As a result, if the route using tunnel.1
becomes inactive, the security device drops traffic for 10.2.2.0/24 rather than using
route #3 to forward it out ethernet3 as clear text to the router at 1.1.1.250.
When using a dialup or leased line as the next-choice route, there is still the
possibility that both the first- and second-choice routes can become inactive at the
same time. Then the security device resorts to the third choice, which might be the
default route. In anticipation of such a situation, you can make the dialup or leased
line route the second choice and the null route the third choice (see “Null Route” on
page 81). Figure 24 shows how these options for handling a routing failover can
work together.
Drop
Third Choice: A null route with a metric Traffic
greater than that of the dialup or leased
line. This option drops the traffic.
You create three routes on Device A to reach 10.2.2.0/24 and assign each a different
metric:
Secondary Route—use ethernet4 and the gateway at 1.2.2.5 to use the leased
line (metric = 2)
When you create the preferred route, you use the default metric for a static route,
which is 1. You assign a metric of 2 to the secondary route; that is, the backup route
over the leased line (shown in Figure 25 on page 84). The metric is less than that of
the preferred route through the VPN tunnel. The security device does not use the
secondary route unless the preferred route through the VPN tunnel fails.
Finally, you add a NULL route with a metric of 10. If the preferred route fails and
then the secondary route fails, the security device drops all packets. All the security
zones are in the trust-vr routing domain.
NOTE: This example shows only the configuration for four routes—three for the failovers
plus the default route—on Device A.
Figure 25: Routing Failover to a Leased Line and Then to a Null Route
WebUI (Device A)
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following and
then click OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following and
then click OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following and
then click OK:
CLI (Device A)
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
set vrouter trust-vr route 10.2.2.0/24 interface tunnel.1
set vrouter trust-vr route 10.2.2.0/24 interface ethernet4 gateway 1.2.2.5 metric
2
set vrouter trust-vr route 10.2.2.0/24 interface null metric 10
save
You can verify that the new routes are present by executing the get route
command.
The route table entry with ID 5 directs traffic for 10.2.2.0/24 to tunnel.1 and then
through the VPN tunnel. It is the preferred route for traffic to reach the 10.2.2.0
network. If that tunnel fails, the next best route is route entry 6 over a leased line
through a gateway at 1.2.2.5. If the connection for route entry 6 fails, route entry 7
becomes the next best route, and the security device directs traffic for 10.2.2.0/24
to the null interface, which then drops it.
NOTE: Releases prior to ScreenOS 5.1.0 do not support a null interface (see “Null Route”
on page 81). However, you can use a decoy tunnel interface to accomplish the
same objective.
1. Create a second tunnel interface, but do not bind it to a VPN tunnel. Instead,
bind it to a tunnel zone that is in the same virtual routing domain as the first
tunnel interface.
NOTE: If a tunnel interface is bound to a tunnel zone, its status is always up.
2. Define a second route to the same destination using this second tunnel
interface, and assign it a higher metric (farther from zero) than the preferred
route.
If the state of the functioning tunnel interface changes from up to down and the
route table entry referencing that interface becomes inactive, all subsequent
route lookups find this second route to the nonfunctioning tunnel interface. The
security device forwards traffic to the second tunnel interface and because it is
not bound to a VPN tunnel, the device drops the traffic.
1. Create a separate virtual router to use for all routes pointing to tunnel interfaces
and name it, for example, “VR-VPN.”
3. Bind all tunnel interfaces to the VPN zone, and also put all addresses for remote
sites that you want to reach through VPN tunnels in this zone.
4. Configure static routes in all other virtual routers to VR-VPN for traffic that you
want encrypted and sent through the tunnels. If necessary, define static routes
for decrypted traffic from VR-VPN to the other virtual routers. Such routes are
necessary to allow inbound VPN traffic through the tunnel if it is initiated from
the remote site.
If the state of a tunnel interface changes from up to down, the security device
still forwards traffic to VR-VPN, where—because the state of the route to that
interface is now inactive and there are no other matching routes—the security
device drops the traffic.
This chapter explains how to configure a site-to-site virtual private network (VPN)
tunnel between two Juniper Networks security devices. It examines route-based and
policy-based VPN tunnels, presents the various elements that you must consider
when setting up a tunnel, and offers several examples.
89
Concepts & Examples ScreenOS Reference Guide
When one gateway has a static address and the other has a dynamically assigned
address, you can configure the following kind of tunnel:
Dynamic Peer Site-to-Site VPN, AutoKey IKE tunnel (with a preshared key or
certificates)
As used here, a static site-to-site VPN involves an IPSec tunnel connecting two sites,
each with a security device operating as a secure gateway. The physical interface or
subinterface used as the outgoing interface on both devices has a fixed IP address,
and the internal hosts also have static IP addresses. If the security device is in
Transparent mode, it uses the VLAN1 address as the IP address for the outgoing
interface. With a static site-to-site VPN, hosts at either end of the tunnel can initiate
the VPN tunnel setup because the IP address of the remote gateway remains
constant and thus reachable.
If the outgoing interface of one of the security devices has a dynamically assigned
IP address, that device is termed a dynamic peer and the VPN is configured
differently. With a dynamic peer site-to-site VPN, only hosts behind the dynamic
peer can initiate the VPN tunnel setup because only their remote gateway has a
fixed IP address and is thus reachable from their local gateway. However, after a
tunnel is established between a dynamic peer and a static peer, hosts behind either
gateway can initiate VPN traffic if the destination hosts have fixed IP addresses.
NOTE: For background information about the available VPN options, see “Internet
Protocol Security” on page 1. For guidance when choosing among the various
options, see “Virtual Private Network Guidelines” on page 57.
The configuration of a site-to-site VPN tunnel requires the coordination of the tunnel
configuration with that of other settings—interfaces, addresses, routes, and policies.
The three example VPN configurations in this section are set in the following
context: an office in Tokyo wants to communicate securely with an office in Paris
through an IPSec VPN tunnel.
tunnel.1, Unnumbered
ethernet1
10.1.1.1/24 ethernet3, 1.1.1.1/24
NAT
external router, 1.1.1.250
Tokyo
Security Device
LAN Internet LAN
10.1.1.0/24 10.2.2.0/24
Tunnel:vpn1 Paris
Security Device
external router, 2.2.2.250
ethernet1
ethernet3, 2.2.2.2/24 10.2.2.1/24
tunnel.1, Unnumbered
Addresses
AutoKey IKE
Dynamic Peer
Manual Key
Routes
Policies
tunnel.1, Unnumbered
ethernet1
10.1.1.1/24 Eth3, 1.1.1.1/24
NAT
Tokyo
Security Device
Internet
Paris
Security Device
ethernet1
Eth3, 2.2.2.2/24 10.2.2.1/24
NAT
tunnel.1, Unnumbered
Ethernet3 is going to be the outgoing interface for VPN traffic and the remote
gateway for VPN traffic sent from the other end of the tunnel.
Ethernet1 is in NAT mode so each admin can assign IP addresses to all the internal
hosts, yet when traffic passes from the Trust zone to the Untrust zone, the security
device translates the source IP address in the packet headers to the address of the
Untrust zone interface, ethernet3—1.1.1.1 for Tokyo, and 2.2.2.2 for Paris.
For a route-based VPN, each admin binds the tunnel interface tunnel.1 to the VPN
tunnel vpn1. By defining a route to the address space of the remote office LAN, the
security device can direct all traffic bound for that LAN to the tunnel.1 interface and
thus through the tunnel to which tunnel.1 is bound.
Because policy-based NAT services are not needed, a route-based VPN configuration
does not require tunnel.1 to have an IP address/netmask, and a policy-based VPN
configuration does not even require a tunnel interface.
2. Addresses
The admins define addresses for later use in inbound and outbound policies. The
admin at the Tokyo office defines the addresses that appear in the upper half of
Figure 28. The admin at the Paris office does likewise with the addresses that
appear in the lower half of the figure.
For policy-based VPNs, the security device derives proxy IDs from policies. Because
the proxy IDs used by the security devices at both ends of the VPN tunnel must
match perfectly, you cannot use the predefined address “ANY,” whose IP address is
0.0.0.0/0, at one end of the tunnel if you use a more specific address at the other
end. For example:
From: 0.0.0.0/0
To: 10.2.2.0/24
Service: ANY
To: 10.1.1.0/24
From: 10.2.2.0/24
Service: ANY
Then the proxy IDs do not match, and IKE negotiations will fail.
NOTE: Beginning with ScreenOS 5.0.0, you can also define proxy IDs for VPN tunnels
referenced in policy-based VPN configurations.
For route-based VPNs, you can use “0.0.0.0/0–0.0.0.0/0–any” to define the local
and remote IP addresses and service type for a proxy ID. You can then use more
restrictive policies to filter the inbound and outbound VPN traffic by source address,
destination address, and service type.
3. VPN
You can configure one of the following three VPNs:
AutoKey IKE
Dynamic Peer
Manual Key
The Manual Key method requires you to set and update the encryption and
authentication keys manually. This method is a viable option for a small set of
VPN tunnels.
trust-vr Tokyo
Dst 10.2.2.0/24 Trust Zone Untrust Zone
Use tunnel. 1 Office
tunnel.1, Unnumbered Trust_LAN
Dst 10.2.2.0/24 ethernet1 ethernet3, 1.1.1.1/24 Trust, 10.2.2.0/24
Use NULL 10.1.1.1/24 Paris
Metric: 50 Null Interface External router, 1.1.1.250 Untrust,
NAT
10.2.2.0/24
Dst 0.0.0.0/0 Internet trust-vr
LAN LAN
Use eth3 Tunnel:vpn1 Dst 10.1.1.0/24
gateway: 1.1.1.250 Use tunnel. 1
4. Routes
The admins at each site must configure at least the following routes:
A route for traffic to reach an address on the remote LAN to use tunnel.1
A default route for all other traffic, including the outer VPN tunnel traffic, to
reach the internet through ethernet3 and then the external router beyond
it—1.1.1.250 for the Tokyo office and 2.2.2.250 for Paris. The external router is
the default gateway to which the security device forwards any traffic for which
it does not have a specific route in its routing table.
NOTE: If the security device at the Tokyo office receives its external IP address
dynamically from its ISP (that is, from the point of view of the Paris office, the
security device at the Tokyo office is its dynamic peer), then the ISP automatically
provides the Tokyo device with its default gateway IP address.
A null route so that if the state of tunnel.1 ever changes to “down” and any
route referencing tunnel.1 becomes deactivated, the security device does not
use the default route to forward traffic destined to the remote LAN unencrypted
out ethernet3. A null route uses the remote LAN as the destination address, but
it points traffic to the Null interface, a logical interface that drops traffic sent to
it. You give the null route a higher metric (farther from zero) than the route to
the remote LAN using tunnel.1, making the null route less preferred than the
route referencing the tunnel.1 interface.
5. Policies
The admins at each site define policies to permit traffic between the two offices:
A policy permitting any kind of traffic from “Trust_LAN” in the Trust zone to
“Paris” or “Tokyo” in the Untrust zone
A policy permitting any kind of traffic from “Paris” or “Tokyo” in the Untrust
zone to “Trust_LAN” in the Trust zone
Because the preferred route to the remote site specifies tunnel.1, which is bound to
the VPN tunnel vpn1, the policy does not need to reference the VPN tunnel.
Outgoing Interface
Outgoing Interface
Untrust Zone
Untrust Zone
eth3, 1.1.1.1/24
Tokyo eth3, 2.2.2.2/24 Paris
Gateway 1.1.1.250
Trust Zone Gateway 2.2.2.250 Trust Zone
eth1, 10.1.1.1/24 eth1, 10.2.2.1/24
Internet
VPN Tunnel
1. Assign IP addresses to the physical interfaces bound to the security zones and
to the tunnel interface.
2. Configure the VPN tunnel, designate its outgoing interface in the Untrust zone,
bind it to the tunnel interface, and configure its proxy-ID.
3. Enter the IP addresses for the local and remote endpoints in the address books
for the Trust and Untrust zones.
4. Enter a default route to the external router in the trust-vr, a route to the
destination through the tunnel interface, and a null route to the destination. You
assign a higher metric (farther from zero) to the null route so that it becomes
the next-choice route to the destination. Then, if the state of the tunnel
interface changes to “down” and the route referencing that interface becomes
inactive, the security device uses the null route, which essentially drops any
traffic sent to it, rather than the default route, which forwards unencrypted
traffic.
WebUI (Tokyo)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Policy > Policy Elements> > Addresses > List > New: Enter the following,
then click OK:
Preshared Key
Preshared Key: h1p8A24nG5
Outgoing Interface: ethernet3
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
(or)
Certificates
Outgoing Interface: ethernet3
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Name: To Paris
Source Address: Trust_LAN
Destination Address: Paris_Office
Service: ANY
Action: Permit
Position at Top: (select)
Policies > (From: Untrust, To: Trust) > New: Enter the following, then click OK:
WebUI (Paris)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
2. Addresses
Policy > Policy Elements> > Addresses > List > New: Enter the following,
then click OK:
Policy > Policy Elements> > Addresses > List > New: Enter the following,
then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
(or)
Certificates
Outgoing Interface: ethernet3
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
Name: Paris_Tokyo
Security Level: Compatible
Remote Gateway:
Predefined: (select), To_Tokyo
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Name: To_Tokyo
Source Address:
Address Book Entry: (select), Trust_LAN
Destination Address:
Address Book Entry: (select), Tokyo_Office
Service: ANY
Action: Permit
Position at Top: (select)
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Name: From_Tokyo
Source Address:
Address Book Entry: (select), Tokyo_Office
Destination Address:
Address Book Entry: (select), Trust_LAN
Service: ANY
Action: Permit
Position at Top: (select)
CLI (Tokyo)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface tunnel.1 zone untrust
set interface tunnel.1 ip unnumbered interface ethernet3
2. Addresses
set address trust Trust_LAN 10.1.1.0/24
set address untrust Paris_Office 10.2.2.0/24
3. VPN
Preshared Key
set ike gateway To_Paris address 2.2.2.2 main outgoing-interface ethernet3
preshare h1p8A24nG5 proposal pre-g2-3des-sha
set vpn Tokyo_Paris gateway To_Paris sec-level compatible
set vpn Tokyo_Paris bind interface tunnel.1
set vpn Tokyo_Paris proxy-id local-ip 10.1.1.0/24 remote-ip 10.2.2.0/24 any
(or)
Certificate
set ike gateway To_Paris address 2.2.2.2 main outgoing-interface ethernet3
proposal rsa-g2-3des-sha
set ike gateway To_Paris cert peer-ca 1
set ike gateway To_Paris cert peer-cert-type x509-sig
set vpn Tokyo_Paris gateway To_Paris sec-level compatible
set vpn Tokyo_Paris bind interface tunnel.1
set vpn Tokyo_Paris proxy-id local-ip 10.1.1.0/24 remote-ip 10.2.2.0/24 any
NOTE: The number 1 is the CA ID number. To discover the CA’s ID number, use the
following command: get ike ca.
4. Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
set vrouter trust-vr route 10.2.2.0/24 interface tunnel.1
set vrouter trust-vr route 10.2.2.0/24 interface null metric 10
5. Policies
set policy top name “To Paris” from trust to untrust Trust_LAN Paris_Office any
permit
set policy top name “From Paris” from untrust to trust Paris_Office Trust_LAN any
permit
save
CLI (Paris)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.2.2.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 2.2.2.2/24
set interface tunnel.1 zone untrust
set interface tunnel.1 ip unnumbered interface ethernet3
2. Addresses
set address trust Trust_LAN 10.2.2.0/24
set address untrust Tokyo_Office 10.1.1.0/24
3. VPN
Preshared Key
set ike gateway To_Tokyo address 1.1.1.1 main outgoing-interface ethernet3
preshare h1p8A24nG5 proposal pre-g2-3des-sha
set vpn Paris_Tokyo gateway To_Tokyo sec-level compatible
set vpn Paris_Tokyo bind interface tunnel.1
set vpn Paris_Tokyo proxy-id local-ip 10.2.2.0/24 remote-ip 10.1.1.0/24 any
(or)
Certificate
set ike gateway To_Tokyo address 1.1.1.1 main outgoing-interface ethernet3
proposal rsa-g2-3des-sha
set ike gateway To_Tokyo cert peer-ca 1
set ike gateway To_Tokyo cert peer-cert-type x509-sig
set vpn Paris_Tokyo gateway To_Tokyo sec-level compatible
set vpn Paris_Tokyo bind interface tunnel.1
set vpn Paris_Tokyo proxy-id local-ip 10.2.2.0/24 remote-ip 10.1.1.0/24 any
4. Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 2.2.2.250
set vrouter trust-vr route 10.1.1.0/24 interface tunnel.1
set vrouter trust-vr route 10.1.1.0/24 interface null metric 10
5. Policies
set policy top name “To Tokyo” from trust to untrust Trust_LAN Tokyo_Office any
permit
set policy top name “From Tokyo” from untrust to trust Tokyo_Office Trust_LAN any
permit
save
VPN Tunnel
Setting up the AutoKey IKE tunnel using AutoKey IKE, with either a preshared secret
or certificates, involves the following steps:
2. Make address book entries for the local and remote end entities.
3. Define the remote gateway and key exchange mode, and specify either a
preshared secret or a certificate.
6. Configure policies.
WebUI (Tokyo)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
> Advanced: Enter the following advanced settings, then click OK to return
to the basic Gateway configuration page:
(or)
Certificates
Outgoing Interface: ethernet3
> Advanced: Enter the following advanced settings, then click OK to return
to the basic Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
WebUI (Paris)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements> Addresses > List > New: Enter the following, then
click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
(or)
Certificates
Outgoing Interface: ethernet3
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
CLI (Tokyo)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Addresses
set address trust Trust_LAN 10.1.1.0/24
set address untrust paris_office 10.2.2.0/24
3. VPN
Preshared Key
set ike gateway to_paris address 2.2.2.2 main outgoing-interface ethernet3
preshare h1p8A24nG5 proposal pre-g2-3des-sha
set vpn tokyo_paris gateway to_paris sec-level compatible
(or)
Certificates
set ike gateway to_paris address 2.2.2.2 main outgoing-interface ethernet3
proposal rsa-g2-3des-sha
set ike gateway to_paris cert peer-ca 1
set ike gateway to_paris cert peer-cert-type x509-sig
set vpn tokyo_paris gateway to_paris sec-level compatible
NOTE: The number 1 is the CA ID number. To discover the CA’s ID number, use the
following command: get ike ca.
4. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
5. Policies
set policy top name “To/From Paris” from trust to untrust Trust_LAN paris_office
any tunnel vpn tokyo_paris
set policy top name “To/From Paris” from untrust to trust paris_office Trust_LAN
any tunnel vpn tokyo_paris
save
CLI (Paris)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.2.2.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 2.2.2.2/24
2. Addresses
set address trust Trust_LAN 10.2.2.0/24
set address untrust tokyo_office 10.1.1.0/24
3. VPN
Preshared Key
set ike gateway to_tokyo address 1.1.1.1 main outgoing-interface ethernet3
preshare h1p8A24nG5 proposal pre-g2-3des-sha
set vpn paris_tokyo gateway to_tokyo sec-level compatible
(or)
Certificates
set ike gateway to_tokyo address 1.1.1.1 main outgoing-interface ethernet3
proposal rsa-g2-3des-sha
set ike gateway to_tokyo cert peer-ca 1
set ike gateway to_tokyo cert peer-cert-type x509-sig
set vpn paris_tokyo gateway to_tokyo tunnel proposal nopfs-esp-3des-sha
4. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 2.2.2.250
5. Policies
set policy top name “To/From Tokyo” from trust to untrust Trust_LAN tokyo_office
any tunnel vpn paris_tokyo
set policy top name “To/From Tokyo” from untrust to trust tokyo_office Trust_LAN
any tunnel vpn paris_tokyo
save
Untrust Trust
Trust Untrust Zone
Zone Zone
Zone
Outgoing Interface
Untrust Zone Outgoing Interface
Tokyo eth3 and gateway Untrust Zone Paris
Trust Zone dynamically assigned eth3, 2.2.2.2/24 Trust Zone
eth1, 10.1.1.1/24 by ISP Gateway 2.2.2.250 eth1, 10.2.2.1/24
Internet
VPN Tunnel
You enter three routes on the security devices at each end of the VPN tunnel:
A null route to the destination. You assign a higher metric (farther from zero) to
the null route so that it becomes the next-choice route to the destination. Then,
if the state of the tunnel interface changes to “down” and the route referencing
that interface becomes inactive, the security device uses the null route, which
essentially drops any traffic sent to it, rather than the default route, which
forwards unencrypted traffic.
Finally, you configure policies to permit bidirectional traffic between the two sites.
WebUI (Tokyo)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
Apply:
NOTE: You cannot specify the IP address of the DHCP server through the WebUI;
however, you can do so through the CLI.
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
3. VPN
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
(or)
Certificates
Local ID: [email protected]
Outgoing Interface: ethernet3
NOTE: The U-FQDN “[email protected]” must appear in the SubjectAltName field in the
certificate.
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
4. Routes
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
NOTE: The ISP provides the gateway IP address dynamically through DHCP.
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Source Address:
Address Book Entry: (select), Trust_LAN
Destination Address:
Address Book Entry: (select), Paris_Office
Service: Any
Action: Permit
Position at Top: (select)
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Paris_Office
Destination Address:
Address Book Entry: (select), Trust_LAN
Service: Any
Action: Permit
Position at Top: (select)
WebUI (Paris)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Preshared Key
Preshared Key: h1p8A24nG5
Outgoing Interface: ethernet3
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
(or)
Certificates
Outgoing Interface: ethernet3
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Source Address:
Address Book Entry: (select), Trust_LAN
Destination Address:
Address Book Entry: (select), Tokyo_Office
Service: Any
Action: Permit
Position at Top: (select)
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Tokyo_Office
Destination Address:
Address Book Entry: (select), Trust_LAN
Service: Any
Action: Permit
Position at Top: (select)
CLI (Tokyo)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 dhcp client
set interface ethernet3 dhcp client settings server 1.1.1.5
set interface tunnel.1 zone untrust
set interface tunnel.1 ip unnumbered interface ethernet3
2. Addresses
set address trust Trust_LAN 10.1.1.0/24
set address untrust Paris_Office 10.2.2.0/24
3. VPN
Preshared Key
set ike gateway To_Paris address 2.2.2.2 aggressive local-id [email protected]
outgoing-interface ethernet3 preshare h1p8A24nG5 proposal pre-g2-3des-sha
set vpn Tokyo_Paris gateway To_Paris tunnel sec-level compatible
set vpn Tokyo_Paris bind interface tunnel.1
set vpn Tokyo_Paris proxy-id local-ip 10.1.1.0/24 remote-ip 10.2.2.0/24 any
(or)
Certificates
set ike gateway To_Paris address 2.2.2.2 aggressive local-id [email protected]
outgoing-interface ethernet3 proposal rsa-g2-3des-sha
set ike gateway To_Paris cert peer-ca 1
set ike gateway To_Paris cert peer-cert-type x509-sig
set vpn Tokyo_Paris gateway To_Paris tunnel sec-level compatible
set vpn Tokyo_Paris bind interface tunnel.1
set vpn Tokyo_Paris proxy-id local-ip 10.1.1.0/24 remote-ip 10.2.2.0/24 any
NOTE: The U-FQDN “[email protected]” must appear in the SubjectAltName field in the
certificate.
The number 1 is the CA ID number. To discover the CA’s ID number, use the
following command: get ike ca.
4. Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3
set vrouter trust-vr route 10.2.2.0/24 interface tunnel.1
set vrouter trust-vr route 10.2.2.0/24 interface null metric 10
NOTE: The ISP provides the gateway IP address dynamically through DHCP, so you
cannot specify it here.
5. Policies
set policy top from trust to untrust Trust_LAN Paris_Office any permit
set policy top from untrust to trust Paris_Office Trust_LAN any permit
save
CLI (Paris)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.2.2.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 2.2.2.2/24
set interface tunnel.1 zone untrust
set interface tunnel.1 ip unnumbered interface ethernet3
2. Addresses
set address trust Trust_LAN 10.2.2.0/24
set address untrust Tokyo_Office 10.1.1.0/24
3. VPN
Preshared Key
set ike gateway To_Tokyo dynamic [email protected] aggressive outgoing-interface
ethernet3 preshare h1p8A24nG5 proposal pre-g2-3des-sha
set vpn Paris_Tokyo gateway To_Tokyo tunnel sec-level compatible
set vpn Paris_Tokyo bind interface tunnel.1
set vpn Paris_Tokyo proxy-id local-ip 10.2.2.0/24 remote-ip 10.1.1.0/24 any
(or)
Certificates
set ike gateway To_Tokyo dynamic [email protected] aggressive outgoing-interface
ethernet3 proposal rsa-g2-3des-sha
set ike gateway To_Tokyo cert peer-ca 1
set ike gateway To_Tokyo cert peer-cert-type x509-sig
set vpn Paris_Tokyo gateway To_Tokyo tunnel sec-level compatible
set vpn Paris_Tokyo bind interface tunnel.1
set vpn Paris_Tokyo proxy-id local-ip 10.2.2.0/24 remote-ip 10.1.1.0/24 any
NOTE: The number 1 is the CA ID number. To discover the CA’s ID number, use the
following command: get ike ca.
4. Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 2.2.2.250
set vrouter trust-vr route 10.1.1.0/24 interface tunnel.1
set vrouter trust-vr route 10.1.1.0/24 interface null metric 10
5. Policies
set policy top from trust to untrust Trust_LAN Tokyo_Office any permit
set policy top from untrust to trust Tokyo_Office Trust_LAN any permit
save
A B A B
In this example, the local auth user Phil (login name: pmason; password: Nd4syst4)
wants to get his email from the mail server at the corporate site. When he attempts
to do so, he is authenticated twice: first, Device A authenticates him locally before
allowing traffic from him through the tunnel; second, the mail server program
authenticates him, sending the IDENT request through the tunnel.
NOTE: Because Phil is an authentication user, before he can make an SMTP of POP3
request, he must first initiate an HTTP, FTP, or Telnet connection so that Device A
can respond with a firewall user/login prompt to authenticate him. After Device A
authenticates him, he has permission to contact the corporate mail server through
the VPN tunnel.
The mail server can send the IDENT request through the tunnel only if the
Device A and B administrators add a custom service for it (TCP, port 113) and set
up policies allowing that traffic through the tunnel to the 10.10.10.0/24 subnet.
WebUI (Device A)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
NOTE: You cannot specify the IP address of the DHCP server through the WebUI;
however, you can do so through the CLI.
2. User
Objects > Users > Local > New: Enter the following, then click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
4. Services
Policy > Policy Elements > Services > Custom > New: Enter the following,
then click OK:
Policy > Policy Elements > Services > Group > New: Enter the following,
move the following services, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
(or)
Certificates
Local ID: [email protected]
Outgoing Interface: ethernet3
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
Name: branch_corp
Security Level: Compatible
Remote Gateway Tunnel: To_Mail
6. Route
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
NOTE: The ISP provides the gateway IP address dynamically through DHCP.
7. Policies
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Trusted_network
Destination Address:
Address Book Entry: (select), Mail_Server
Service: Remote_Mail
Action: Tunnel
VPN Tunnel: branch_corp
Modify matching bidirectional VPN policy: (select)
Position at Top: (select)
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Policy configuration page:
Authentication: (select)
Auth Server: Local
User: (select), Local Auth User - pmason
WebUI (Device B)
1. Interfaces
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Services > Groups > New: Enter the following,
move the following services, then click OK:
4. VPN
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
(or)
Certificates
Outgoing Interface: ethernet3
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
6. Policies
Policies > (From: DMZ, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Mail_Server
Destination Address:
Address Book Entry: (select), branch_office
Service: Remote_Mail
Action: Tunnel
VPN Tunnel: corp_branch
Modify matching bidirectional VPN policy: (select)
Position at Top: (select)
CLI (Device A)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 dhcp client
set interface ethernet3 dhcp client settings server 1.1.1.5
2. User
set user pmason password Nd4syst4
3. Addresses
set address trust “trusted network” 10.1.1.0/24
set address untrust “mail server” 3.3.3.5/32
4. Services
set service ident protocol tcp src-port 0-65535 dst-port 113-113
set group service remote_mail
set group service remote_mail add http
set group service remote_mail add ftp
set group service remote_mail add telnet
set group service remote_mail add ident
set group service remote_mail add mail
set group service remote_mail add pop3
5. VPN
Preshared Key
set ike gateway to_mail address 2.2.2.2 aggressive local-id [email protected]
outgoing-interface ethernet3 preshare h1p8A24nG5 proposal pre-g2-3des-sha
set vpn branch_corp gateway to_mail sec-level compatible
(or)
Certificates
set ike gateway to_mail address 2.2.2.2 aggressive local-id [email protected]
outgoing-interface ethernet3 proposal rsa-g2-3des-sha
set ike gateway to_mail cert peer-ca 1
set ike gateway to_mail cert peer-cert-type x509-sig
set vpn branch_corp gateway to_mail sec-level compatible
NOTE: The U-FQDN “[email protected]” must appear in the SubjectAltName field in the
certificate.
The number 1 is the CA ID number. To discover the CA’s ID number, use the
following command: get ike ca.
6. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3
NOTE: The ISP provides the gateway IP address dynamically through DHCP.
7. Policies
set policy top from trust to untrust “trusted network” “mail server” remote_mail
tunnel vpn branch_corp auth server Local user pmason
set policy top from untrust to trust “mail server” “trusted network” remote_mail
tunnel vpn branch_corp
save
CLI (Device B)
1. Interfaces
set interface ethernet2 zone dmz
set interface ethernet2 ip 3.3.3.3/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 2.2.2.2/24
2. Addresses
set address dmz “mail server” 3.3.3.5/32
set address untrust “branch office” 10.1.1.0/24
3. Services
set service ident protocol tcp src-port 0-65535 dst-port 113-113
set group service remote_mail
set group service remote_mail add ident
set group service remote_mail add mail
set group service remote_mail add pop3
4. VPN
Preshared Key
set ike gateway to_branch dynamic [email protected] aggressive
outgoing-interface ethernet3 preshare h1p8A24nG5 proposal pre-g2-3des-sha
set vpn corp_branch gateway to_branch tunnel sec-level compatible
(or)
Certificates
set ike gateway to_branch dynamic [email protected] aggressive
outgoing-interface ethernet3 proposal rsa-g2-3des-sha
set ike gateway to_branch cert peer-ca 1
set ike gateway to_branch cert peer-cert-type x509-sig
set vpn corp_branch gateway to_branch sec-level compatible
NOTE: The number 1 is the CA ID number. To discover the CA’s ID number, use the
following command: get ike ca.
5. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 2.2.2.250
6. Policies
set policy top from dmz to untrust “mail server” “branch office” remote_mail
tunnel vpn corp_branch
set policy top from untrust to dmz “branch office” “mail server” remote_mail
tunnel vpn corp_branch
save
Tokyo:
Paris:
The Trust and Untrust security zones are all in the trust-vr routing domain. The
Untrust zone interface (ethernet3) serves as the outgoing interface for the VPN
tunnel.
To set up the tunnel, perform the following steps on the security devices at both
ends of the tunnel:
1. Assign IP addresses to the physical interfaces bound to the security zones and
to the tunnel interface.
2. Configure the VPN tunnel, designate its outgoing interface in the Untrust zone,
and bind it to the tunnel interface.
3. Enter the IP addresses for the local and remote endpoints in the address books
for the Trust and Untrust zones.
4. Enter a default route to the external router in the trust-vr, a route to the
destination through the tunnel interface, and a null route to the destination. You
assign a higher metric (farther from zero) to the null route so that it becomes
the next-choice route to the destination. Then, if the state of the tunnel
interface changes to “down” and the route referencing that interface becomes
inactive, the security device uses the null route, which essentially drops any
traffic sent to it, rather than the default route, which forwards unencrypted
traffic.
WebUI (Tokyo)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
2. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
> Advanced: Enter the following advanced settings, then click Return to return
to the basic Manual Key tunnel configuration page:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Name: To Paris
Source Address:
Address Book Entry: (select), Trust_LAN
Destination Address:
Address Book Entry: (select), Paris_Office
Service: ANY
Action: Permit
Position at Top: (select)
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
WebUI (Paris)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Manual Key tunnel configuration page:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Name: To_Tokyo
Source Address:
Address Book Entry: (select), Trust_LAN
Destination Address:
Address Book Entry: (select), Tokyo_Office
Service: ANY
Action: Permit
Position at Top: (select)
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Name: From_Tokyo
Source Address:
Address Book Entry: (select), Tokyo_Office
Destination Address:
Address Book Entry: (select), Trust_LAN
Service: ANY
Action: Permit
Position at Top: (select)
CLI (Tokyo)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface tunnel.1 zone untrust
set interface tunnel.1 ip unnumbered interface ethernet3
2. Addresses
set address trust Trust_LAN 10.1.1.0/24
set address untrust Paris_Office 10.2.2.0/24
3. VPN
set vpn Tokyo_Paris manual 3020 3030 gateway 2.2.2.2 outgoing-interface
ethernet3 esp 3des password asdlk24234 auth sha-1 password PNas134a
set vpn Tokyo_Paris bind interface tunnel.1
4. Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
set vrouter trust-vr route 10.2.2.0/24 interface tunnel.1
set vrouter trust-vr route 10.2.2.0/24 interface null metric 10
5. Policies
set policy top name “To Paris” from trust to untrust Trust_LAN Paris_Office any
permit
set policy top name “From Paris” from untrust to trust Paris_Office Trust_LAN any
permit
save
CLI (Paris)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.2.2.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 2.2.2.2/24
set interface tunnel.1 zone untrust
set interface tunnel.1 ip unnumbered interface ethernet3
2. Addresses
set address trust Trust_LAN 10.2.2.0/24
set address untrust Tokyo_Office 10.1.1.0/24
3. VPN
set vpn Paris_Tokyo manual 3030 3020 gateway 1.1.1.1 outgoing-interface
ethernet3 esp 3des password asdlk24234 auth sha-1 password PNas134a
set vpn Paris_Tokyo bind interface tunnel.1
4. Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 2.2.2.250
set vrouter trust-vr route 10.1.1.0/24 interface tunnel.1
set vrouter trust-vr route 10.1.1.0/24 interface null metric 10
5. Policies
set policy top name “To Tokyo” from trust to untrust Trust_LAN Tokyo_Office any
permit
set policy top name “From Tokyo” from untrust to trust Tokyo_Office Trust_LAN any
permit
save
Tokyo:
Paris:
The Trust and Untrust security zones and the Untrust-Tun tunnel zone are in the
trust-vr routing domain. The Untrust zone interface (ethernet3) serves as the
outgoing interface for the VPN tunnel.
VPN Tunnel
To set up the tunnel, perform the following five steps on the security devices at both
ends of the tunnel:
2. Configure the VPN tunnel, and designate its outgoing interface in the Untrust
zone.
3. Enter the IP addresses for the local and remote endpoints in the Trust and
Untrust address books.
5. Set up policies for VPN traffic to pass bidirectionally through the tunnel.
WebUI (Tokyo)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Manual Key tunnel configuration page:
5. Policies
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
WebUI (Paris)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
ESP-CBC: (select)
Encryption Algorithm: 3DES-CBC
Generate Key by Password: asdlk24234
Authentication Algorithm: SHA-1
Generate Key by Password: PNas134a
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Manual Key tunnel configuration page:
CLI (Tokyo)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Addresses
set address trust Trust_LAN 10.1.1.0/24
set address untrust paris_office 10.2.2.0/24
3. VPN
set vpn tokyo_paris manual 3020 3030 gateway 2.2.2.2 outgoing-interface
ethernet3 esp 3des password asdlk24234 auth sha-1 password PNas134a
set vpn tokyo_paris bind zone untrust-tun
4. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
5. Policies
set policy top name “To/From Paris” from trust to untrust Trust_LAN paris_office
any tunnel vpn tokyo_paris
set policy top name “To/From Paris” from untrust to trust paris_office Trust_LAN
any tunnel vpn tokyo_paris
save
CLI (Paris)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.2.2.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 2.2.2.2/24
2. Addresses
set address trust Trust_LAN 10.2.2.0/24
set address untrust tokyo_office 10.1.1.0/24
3. VPN
set vpn paris_tokyo manual 3030 3020 gateway 1.1.1.1 outgoing-interface
ethernet3 esp 3des password asdlk24234 auth sha-1 password PNas134a
set vpn paris_tokyo bind zone untrust-tun
4. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 2.2.2.250
5. Policies
set policy top name “To/From Tokyo” from trust to untrust Trust_LAN tokyo_office
any tunnel vpn paris_tokyo
set policy top name “To/From Tokyo” from untrust to trust tokyo_office Trust_LAN
any tunnel vpn paris_tokyo
save
If the remote IKE peer is a security device, the admin can manually notify the
DNS server to update its FQDN-to-IP address mapping each time the security
device receives a new IP address from its ISP.
If the remote IKE peer is another kind of VPN termination device that has
dynamic DNS software running on it, that software can automatically notify the
DNS server of its address changes so the server can update its FQDN-to-IP
address mapping table.
If the remote IKE peer is a security device or any other kind of VPN termination
device, a host behind it can run an FQDN-to-IP address automatic update
program that alerts the DNS server of address changes.
www.jnpr.net
VPN Tunnel
1.1.1.202 = www.jnpr.net
1. The DHCP server draws 1.1.1.202 from its pool of IP addresses IP Pool
and assigns that address to the IKE peer.
2. The IKE peer notifies the DNS server of the new address in order
for the server to update its FQDN-to-IP address mapping table.
1.1.1.10 – DHCP Server DNS Server
1.1.7.9
Without needing to know the current IP address of a remote IKE peer, you can now
configure an AutoKey IKE VPN tunnel to that peer using its FQDN instead of an IP
address.
Aliases
You can also use an alias for the FQDN of the remote IKE peer if the DNS server that
the local security device queries returns only one IP address. If the DNS server
returns several IP addresses, the local device uses the first one it receives. Because
there is no guarantee for the order of the addresses in the response from the DNS
server, the local security device might use the wrong IP address, and IKE
negotiations might fail.
Figure 39: Multiple DNS Replies Leading to IKE Negotiation Success or Failure
Local Security Device The local security device wants to Remote IKE Peer
establish an IKE VPN tunnel with its
remote peer. It uses www.jnpr.net as the
remote gateway address.
DNS Reply:
The device uses this IP
address. www.jnpr.net = 1.1.1.202
www.jnpr.net = 1.1.1.114
www.jnpr.net = 1.1.1.20
Local Security Device If the remote IKE peer is at 1.1.1.202, IKE Remote IKE Peer
negotiations succeed.
The configuration shown in Figure 40 is for a route-based VPN tunnel. For the
Phase 1 and Phase 2 security levels, you specify one Phase 1 proposal—either
pre-g2-3des-sha for the preshared key method or rsa-g2-3des-sha for
certificates—and select the predefined “Compatible” set of proposals for Phase 2.
All zones are in the trust-vr.
Outgoing Interface
Outgoing Interface Untrust Zone
Untrust Zone ethernet3, IP and gateway
ethernet3, 1.1.1.1/24 via DHCP
Tokyo www.nspar.com Paris
Trust Zone Gateway 1.1.1.250 Trust Zone
ethernet1, 10.1.1.1/24 ethernet1, 10.2.2.1/24
Internet
VPN Tunnel
1. Assign IP addresses to the physical interfaces bound to the security zones and
to the tunnel interface.
2. Define the remote gateway and key exchange mode, and specify either a
preshared secret or a certificate.
3. Configure the VPN tunnel, designate its outgoing interface in the Untrust zone,
bind it to the tunnel interface, and configure its proxy-ID.
4. Enter the IP addresses for the local and remote endpoints in the Trust and
Untrust address books.
5. Enter a default route to the external router in the trust-vr, a route to the
destination through the tunnel interface, and a null route to the destination. You
assign a higher metric (farther from zero) to the null route so that it becomes
the next-choice route to the destination. Then, if the state of the tunnel
interface changes to “down” and the route referencing that interface becomes
inactive, the security device uses the null route, which essentially drops any
traffic sent to it, rather than the default route, which forwards unencrypted
traffic.
WebUI (Tokyo)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Preshared Key
Preshared Key: h1p8A24nG5
Outgoing Interface: ethernet3
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
(or)
Certificates
Outgoing Interface: ethernet3
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
NOTE: The ISP provides the gateway IP address dynamically through DHCP.
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Name: To Paris
Source Address: Trust_LAN
Destination Address: Paris_Office
Service: ANY
Action: Permit
Position at Top: (select)
Policies > Policy (From: Untrust, To: Trust) > New Policy: Enter the following,
then click OK:
WebUI (Paris)
1. Host Name and Domain Name
Network > DNS: Enter the following, then click Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
(or)
Certificates
Outgoing Interface: ethernet3
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
Name: Paris_Tokyo
Security Level: Custom
Remote Gateway:
Predefined: (select), To_Tokyo
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
6. Policies
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Name: To Tokyo
Source Address: Trust_LAN
Destination Address: Tokyo_Office
Service: ANY
Action: Permit
Position at Top: (select)
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
CLI (Tokyo)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface tunnel.1 zone untrust
set interface tunnel.1 ip unnumbered interface ethernet3
2. Addresses
set address trust Trust_LAN 10.1.1.0/24
set address untrust paris_office 10.2.2.0/24
3. VPN
Preshared Key
set ike gateway to_paris address www.nspar.com main outgoing-interface
ethernet3 preshare h1p8A24nG5 proposal pre-g2-3des-sha
set vpn tokyo_paris gateway to_paris sec-level compatible
set vpn tokyo_paris bind interface tunnel.1
set vpn tokyo_paris proxy-id local-ip 10.1.1.0/24 remote-ip 10.2.2.0/24 any
(or)
Certificate
set ike gateway to_paris address www.nspar.com main outgoing-interface
ethernet3 proposal rsa-g2-3des-sha
set ike gateway to_paris cert peer-ca 1
set ike gateway to_paris cert peer-cert-type x509-sig
set vpn tokyo_paris gateway to_paris sec-level compatible
set vpn tokyo_paris bind interface tunnel.1
set vpn tokyo_paris proxy-id local-ip 10.1.1.0/24 remote-ip 10.2.2.0/24 any
NOTE: The number 1 is the CA ID number. To discover the CA’s ID number, use the
following command: get ike ca.
4. Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
set vrouter trust-vr route 10.2.2.0/24 interface tunnel.1
set vrouter trust-vr route 10.2.2.0/24 interface null metric 10
5. Policies
set policy top name “To Paris” from trust to untrust Trust_LAN paris_office any
permit
set policy top name “From Paris” from untrust to trust paris_office Trust_LAN any
permit
save
CLI (Paris)
1. Host Name and Domain Name
set hostname www
set domain nspar.com
2. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.2.2.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip dhcp-client enable
set interface tunnel.1 zone untrust
set interface tunnel.1 ip unnumbered interface ethernet3
3. Addresses
set address trust Trust_LAN 10.2.2.0/24
set address untrust tokyo_office 10.1.1.0/24
4. VPN
Preshared Key
set ike gateway to_tokyo address 1.1.1.1 main outgoing-interface ethernet3
preshare h1p8A24nG5 proposal pre-g2-3des-sha
set vpn paris_tokyo gateway to_tokyo sec-level compatible
set vpn paris_tokyo bind interface tunnel.1
set vpn paris_tokyo proxy-id local-ip 10.2.2.0/24 remote-ip 10.1.1.0/24 any
(or)
Certificate
set ike gateway to_tokyo address 1.1.1.1 main outgoing-interface ethernet3
proposal rsa-g2-3des-sha
set ike gateway to_tokyo cert peer-ca 1
set ike gateway to_tokyo cert peer-cert-type x509-sig
set vpn paris_tokyo gateway to_tokyo sec-level compatible
set vpn paris_tokyo bind interface tunnel.1
set vpn paris_tokyo proxy-id local-ip 10.2.2.0/24 remote-ip 10.1.1.0/24 any
5. Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 2.2.2.250
set vrouter trust-vr route 10.1.1.0/24 interface tunnel.1
set vrouter trust-vr route 10.1.1.0/24 interface null metric 10
6. Policies
set policy top name “To Tokyo” from trust to untrust Trust_LAN tokyo_office any
permit
set policy top name “From Tokyo” from untrust to trust tokyo_office Trust_LAN any
permit
save
NOTE: An overlapping address space is when the IP address range in two networks are
partially or completely the same.
For NAT-src, the interfaces at both ends of the tunnel must have IP addresses in
mutually unique subnets, with a dynamic IP (DIP) pool in each of those subnets.
The policies regulating outbound VPN traffic can then apply NAT-src using DIP pool
addresses to translate original source addresses to those in a neutral address space.
NOTE: The range of addresses in a DIP pool must be in the same subnet as the tunnel
interface, but the pool must not include the interface IP address or any MIP or VIP
addresses that might also be in that subnet. For security zone interfaces, you can
also define an extended IP address and an accompanying DIP pool in a different
subnet from that of the interface IP address. For more information, see “Using DIP
in a Different Subnet” on page 2-145.
Mapped IP (MIP): A policy can reference a MIP as the destination address. The
MIP uses an address in the same subnet as the tunnel interface—but not in the
same range as the local DIP pool used for outbound VPN traffic. (For
information about MIPs, see “Mapped IP Addresses” on page 8-63.)
VPN traffic between sites with overlapping addresses requires address translation in
both directions. Because the source address on outbound traffic cannot be the same
as the destination address on inbound traffic—the NAT-dst address or MIP cannot
be in the DIP pool—the addresses referenced in the inbound and outbound policies
cannot be symmetrical.
When you want the security device to perform source and destination address
translation on bidirectional VPN traffic through the same tunnel, you have two
choices:
You can define a proxy ID for a policy-based VPN configuration. When you
specifically reference a VPN tunnel in a policy, the security device derives a
proxy ID from the components in the policy that references that tunnel. The
security device derives the proxy ID when you first create the policy, and each
time the device reboots thereafter. However, if you manually define a proxy ID
for a VPN tunnel that is referenced in a policy, the security device applies the
user-defined proxy ID, not the proxy ID derived from the policy.
NOTE: A proxy ID is a kind of agreement between IKE peers to permit traffic through a
tunnel if the traffic matches a specified tuple of local address, remote address, and
service.
You can use a route-based VPN tunnel configuration, which must have a
user-defined proxy ID. With a route-based VPN tunnel configuration, you do not
specifically reference a VPN tunnel in a policy. Instead, the policy controls
access (permit or deny) to a particular destination. The route to that destination
points to a tunnel interface that in turn is bound to a VPN tunnel. Because the
VPN tunnel is not directly associated with a policy from which it can derive a
proxy ID from the source address, destination address, and service, you must
manually define a proxy ID for it. (Note that a route-based VPN configuration
also allows you to create multiple policies that make use of a single VPN tunnel;
that is, a single Phase 2 SA.)
Consider the addresses in Figure 41, which illustrates a VPN tunnel between two
sites with overlapping address spaces.
Addresses in Policies
If the security devices in Figure 41 derive proxy IDs from the policies, as they do in
policy-based VPN configurations, then the inbound and outbound policies produce
the following proxy IDs:
Device A Device B
Local Remote Service Local Remote Service
Outbound 10.10.1.2/32 10.20.2.5/32 Any Inbound 10.20.2.5/32 10.10.1.2/32 Any
Inbound 10.10.1.5/32 10.20.2.2/32 Any Outbound 10.20.2.2/32 10.10.1.5/32 Any
As shown in the table, there are two proxy IDs: one for outbound VPN traffic and
another for inbound. When Device A first sends traffic from 10.10.1.2/32 to
10.20.2.5/32, the two peers perform IKE negotiations and produce Phase 1 and
Phase 2 security associations (SAs). The Phase 2 SA results in the above outbound
proxy ID for Device A, and the inbound proxy ID for Device B.
If Device B then sends traffic to Device A, the policy lookup for traffic from
10.20.2.2/32 to 10.10.1.5/32 indicates that there is no active Phase 2 SA for such a
proxy ID. Therefore, the two peers use the existing Phase 1 SA (assuming that its
lifetime has not yet expired) to negotiate a different Phase 2 SA. The resulting proxy
IDs are shown above as the inbound proxy ID for Device A and the outbound proxy
ID for Device B. There are two Phase 2 SAs—two VPN tunnels—because the
addresses are asymmetrical and require different proxy IDs.
To create just one tunnel for bidirectional VPN traffic, you can define the following
proxy IDs with addresses whose scope includes both the translated source and
destination addresses at each end of the tunnel:
Device A Device B
Local Remote Service Local Remote Service
10.10.1.0/24 10.20.2.0/24 Any 10.20.2.0/24 10.10.1.0/24 Any
or
0.0.0.0/0 0.0.0.0/0 Any 0.0.0.0/0 0.0.0.0/0 Any
The above proxy IDs encompass addresses appearing in both inbound and
outbound VPN traffic between the two sites. The address 10.10.1.0/24 includes both
the DIP pool 10.10.1.2 – 10.10.1.2 and the MIP 10.10.1.5. Likewise, the address
10.20.2.0/24 includes both the DIP pool 10.20.2.2 – 10.20.2.2 and the MIP
10.20.2.5. The above proxy IDs are symmetrical; that is, the local address for
Device A is the remote address for Device B, and vice versa. If Device A sends
traffic to Device B, the Phase 2 SA and proxy ID also apply to traffic sent from
Device B to Device A. Thus, a single Phase 2 SA—that is, a single VPN tunnel—is all
that is required for bidirectional traffic between the two sites.
NOTE: The address 0.0.0.0/0 includes all IP addresses, and thus the addresses of the DIP
pool and MIP.
To create one VPN tunnel for bidirectional traffic between sites with overlapping
address spaces when the addresses for NAT-src and NAT-dst configured on the same
device are in different subnets from each other, the proxy ID for the tunnel must be
(local IP) 0.0.0.0/0 – (remote IP) 0.0.0.0/0 – service type. If you want to use more
restrictive addresses in the proxy ID, then the addresses for NAT-src and NAT-dst
must be in the same subnet.
In this example, you configure a VPN tunnel between Device A at a corporate site
and Device B at a branch office. The address space for the VPN end entities
overlaps; they both use addresses in the 10.1.1.0/24 subnet. To overcome this
conflict, you use NAT-src to translate the source address on outbound VPN traffic
and NAT-dst to translate the destination address on inbound VPN traffic. The
policies permit all addresses in the corporate LAN to reach an FTP server at the
branch site, and for all addresses at the branch office site to reach an FTP server at
the corporate site.
NOTE: For more information about Source Network Address Translation (NAT-src) and
Destination Network Address Translation (NAT-dst), see Volume 8: Address
Translation.
The tunnel configurations at both ends of the tunnel use the following parameters:
AutoKey IKE, preshared key (“netscreen1”), and the security level predefined as
“Compatible” for both Phase 1 and Phase 2 proposals. (For details about these
proposals, see “Tunnel Negotiation” on page 8.)
The outgoing interface on Device A at the corporate site is ethernet3, which has IP
address 1.1.1.1/24 and is bound to the Untrust zone. Device B at the branch office
uses this address as its remote IKE gateway.
The outgoing interface on Device B at the branch office is ethernet3, which has IP
address 2.2.2.2/24 and is bound to the Untrust zone. Device A at the corporate site
uses this address as its remote IKE gateway.
The Trust zone interface on both security devices is ethernet1 and has IP address
10.1.1.1/24. All zones on both security devices are in the trust-vr routing domain.
A B B A
serverB
Gateway Gateway 10.1.1.5
1.1.1.250 2.2.2.250
network A Internet network B
10.1.1.0/24 Device A 10.1.1.0/24
Device B
serverA
Tunnel.1 10.10.1.1/24 Tunnel.1 10.20.1.1/24
10.1.1.5
Users at network A can access server B. Users at network B can access server A.
All traffic flows through the VPN tunnel between the two sites.
WebUI (Device A)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
ID: 5
IP Address Range: (select), 10.10.1.2 ~ 10.10.1.2
Port Translation: (select)
In the same subnet as the interface IP or its secondary IPs: (select)
3. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
NOTE: The outgoing interface does not have to be in the same zone to which the tunnel
interface is bound, although in this case they are in the same zone.
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Source Address:
Address Book Entry: (select), corp
Destination Address:
Address Book Entry: (select), serverB
Service: FTP
Action: Permit
Position at Top: (select)
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Policy configuration page:
NAT:
Source Translation: (select)
DIP On: 5 (10.10.1.2–10.10.1.2)/X-late
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), branch1
Destination Address:
Address Book Entry: (select), virtualA
Service: FTP
Action: Permit
Position at Top: (select)
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Policy configuration page:
NAT:
Destination Translation: (select)
Translate to IP: (select), 10.1.1.5
Map to Port: (clear)
WebUI (Device B)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
ID: 6
IP Address Range: (select), 10.20.1.2 ~ 10.20.1.2
Port Translation: (select)
In the same subnet as the interface IP or its secondary IPs: (select)
3. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
4. VPN
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
NOTE: The outgoing interface does not have to be in the same zone to which the tunnel
interface is bound, although in this case they are in the same zone.
5. Routes
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
6. Policies
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), corp
Destination Address:
Address Book Entry: (select), serverA
Service: FTP
Action: Permit
Position at Top: (select)
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Policy configuration page:
NAT:
Source Translation: (select)
DIP on: 6 (10.20.1.2–10.20.1.2)/X-late
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), corp
Destination Address:
Address Book Entry: (select), virtualB
Service: FTP
Action: Permit
Position at Top: (select)
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Policy configuration page:
NAT:
Destination Translation: (select)
Translate to IP: 10.1.1.5
Map to Port: (clear)
CLI (Device A)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface tunnel.1 zone untrust
set interface tunnel.1 ip 10.10.1.1/24
2. DIP
set interface tunnel.1 dip 5 10.10.1.2 10.10.1.2
3. Addresses
set address trust corp 10.1.1.0/24
set address trust virtualA 10.10.1.5/32
set address untrust branch1 10.20.1.2/32
set address untrust serverB 10.20.1.5/32
4. VPN
set ike gateway branch1 address 2.2.2.2 outgoing-interface ethernet3 preshare
netscreen1 sec-level compatible
set vpn vpn1 gateway branch1 sec-level compatible
set vpn vpn1 bind interface tunnel.1
set vpn vpn1 proxy-id local-ip 10.10.1.0/24 remote-ip 10.20.1.0/24 any
NOTE: The outgoing interface does not have to be in the same zone to which the tunnel
interface is bound, although in this case they are in the same zone.
5. Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
set vrouter trust-vr route 10.20.1.0/24 interface tunnel.1
set vrouter trust-vr route 10.20.1.0/24 interface null metric 10
6. Policies
set policy top from trust to untrust corp serverB ftp nat src dip-id 5 permit
set policy top from untrust to trust branch1 virtualA ftp nat dst ip 10.1.1.5 permit
save
CLI (Device B)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 2.2.2.2/24
set interface tunnel.1 zone untrust
set interface tunnel.1 ip 10.20.1.1/24
2. DIP
set interface tunnel.1 dip 6 10.20.1.2 10.20.1.2
3. Addresses
set address trust branch1 10.1.1.0/24
set address trust virtualB 10.20.1.5/32
set address untrust corp 10.10.1.2/32
set address untrust serverA 10.10.1.5/32
4. VPN
set ike gateway corp address 1.1.1.1 outgoing-interface ethernet3 preshare
netscreen1 sec-level compatible
set vpn vpn1 gateway corp sec-level compatible
set vpn vpn1 bind interface tunnel.1
set vpn vpn1 proxy-id local-ip 10.20.1.0/24 remote-ip 10.10.1.0/24 any
NOTE: The outgoing interface does not have to be in the same zone to which the tunnel
interface is bound, although in this case they are in the same zone.
5. Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 2.2.2.250
set vrouter trust-vr route 10.10.1.0/24 interface tunnel.1
set vrouter trust-vr route 10.10.1.0/24 interface null metric 10
6. Policies
set policy top from trust to untrust branch1 serverA ftp nat src dip-id 6 permit
set policy top from untrust to trust corp virtualB ftp nat dst ip 10.1.1.5 permit
save
NOTE: The OSI Model is a networking industry standard model of network protocol
architecture. The OSI Model consists of seven layers, in which Layer 2 is the
Data-Link Layer and Layer 3 is the Network Layer.
At the time of this release, a security device whose interfaces are in Transparent
mode supports only policy-based VPNs. For more information about Transparent
mode, see “Transparent Mode” on page 2-80.
In this example, you set up a policy-based AutoKey IKE VPN tunnel between two
security devices with interfaces operating in Transparent mode.
NOTE: It is not necessary that the interfaces of both security devices be in Transparent
mode. The interfaces of the device at one end of the tunnel can be in Transparent
mode and those of the other device can be in Route or NAT mode.
The key elements of the configuration for the security devices at both ends of the
tunnel are as follows:
1.You can separate administrative from VPN traffic by using the manage IP address to receive administrative traffic
and the VLAN1 address to terminate VPN traffic.
1. Remove any IP addresses from the physical interfaces, and bind them to the
Layer 2 security zones.
3. Enter the IP addresses for the local and remote endpoints in the address books
for the V1-Trust and V1-Untrust zones.
4. Configure the VPN tunnel and designate its outgoing zone as the V1-Untrust
zone.
WebUI (Device A)
1. Interfaces
NOTE: Moving the VLAN1 IP address to a different subnet causes the security device to
delete any routes involving the previous VLAN1 interface. When configuring a
security device through the WebUI, your workstation must reach the first VLAN1
address and then be in the same subnet as the new address. After changing the
VLAN1 address, you must then change the IP address of your workstation so that
it is in the same subnet as the new VLAN1 address. You might also have to relocate
your workstation to a subnet physically adjacent to the security device.
Network > Interfaces > Edit (for the VLAN1 interface): Enter the following,
then click OK:
IP Address/Netmask: 1.1.1.1/24
Manage IP: 1.1.1.2
Management Services: WebUI, Telnet, Ping
NOTE: You enable the management options for WebUI, Telnet, and Ping on both the
V1-Trust zone and the VLAN1 interface so that a local admin in the V1-Trust zone
can reach the VLAN1 manage IP address. If management through the WebUI is
not already enabled on VLAN1 and the V1-Trust zone interfaces, you cannot reach
the security device through the WebUI to make these settings. Instead, you must
first set WebUI manageability on these interfaces through a console connection.
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), local_lan
Destination Address:
Address Book Entry: (select), peer_lan
Service: ANY
Action: Tunnel
Tunnel VPN: vpn1
Modify matching bidirectional VPN policy: (select)
Position at Top: (select)
WebUI (Device B)
1. Interfaces
NOTE: Moving the VLAN1 IP address to a different subnet causes the security device to
delete any routes involving the previous VLAN1 interface. When configuring a
security device through the WebUI, your workstation must reach the first VLAN1
address and then be in the same subnet as the new address. After changing the
VLAN1 address, you must then change the IP address of your workstation so that
it is in the same subnet as the new VLAN1 address. You might also have to relocate
your workstation to a subnet physically adjacent to the security device.
Network > Interfaces > Edit (for the VLAN1 interface): Enter the following,
then click OK:
IP Address/Netmask: 2.2.2.2/24
Manage IP: 2.2.2.3
Management Services: WebUI, Telnet, Ping
NOTE: If management through the WebUI is not already enabled on VLAN1 and the
V1-Trust zone interfaces, you cannot reach the security device through the WebUI
to make these settings. Instead, you must first set WebUI manageability on these
interfaces through a console connection.
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
4. Route
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Source Address:
Address Book Entry: (select), local_lan
Destination Address:
Address Book Entry: (select), peer_lan
Service: ANY
Action: Tunnel
Tunnel VPN: vpn1
Modify matching bidirectional VPN policy: (select)
Position at Top: (select)
CLI (Device A)
1. Interfaces and Zones
unset interface ethernet1 ip
unset interface ethernet1 zone
set interface ethernet1 zone v1-trust
set zone v1-trust manage web
set zone v1-trust manage telnet
set zone v1-trust manage ping
unset interface ethernet3 ip
unset interface ethernet3 zone
set interface ethernet3 zone v1-untrust
set interface vlan1 ip 1.1.1.1/24
set interface vlan1 manage-ip 1.1.1.2
set interface vlan1 manage web
set interface vlan1 manage telnet
set interface vlan1 manage ping
NOTE: You enable the management options for WebUI, Telnet, and Ping on both the
V1-Trust zone and the VLAN1 interface so that a local admin in the V1-Trust zone
can reach the VLAN1 manage IP address.
2. Addresses
set address v1-trust local_lan 1.1.1.0/24
set address v1-untrust peer_lan 2.2.2.0/24
3. VPN
set ike gateway gw1 address 2.2.2.2 main outgoing-interface v1-untrust preshare
h1p8A24nG5 sec-level compatible
set vpn vpn1 gateway gw1 sec-level compatible
4. Routes
set vrouter trust-vr route 0.0.0.0/0 interface vlan1 gateway 1.1.1.250
5. Policies
set policy top from v1-trust to v1-untrust local_lan peer_lan any tunnel vpn vpn1
set policy top from v1-untrust to v1-trust peer_lan local_lan any tunnel vpn vpn1
save
CLI (Device B)
1. Interfaces and Zones
unset interface ethernet1 ip
unset interface ethernet1 zone
set interface ethernet1 zone v1-trust
set zone v1-trust manage
unset interface ethernet3 ip
unset interface ethernet3 zone
set interface ethernet3 zone v1-untrust
set interface vlan1 ip 2.2.2.2/24
set interface vlan1 manage-ip 2.2.2.3
set interface vlan1 manage
2. Addresses
set address v1-trust local_lan 2.2.2.0/24
set address v1-untrust peer_lan 1.1.1.0/24
3. VPN
set ike gateway gw1 address 1.1.1.1 main outgoing-interface v1-untrust preshare
h1p8A24nG5 sec-level compatible
set vpn vpn1 gateway gw1 sec-level compatible
4. Routes
set vrouter trust-vr route 0.0.0.0/0 interface vlan1 gateway 2.2.2.250
5. Policies
set policy top from v1-trust to v1-untrust local_lan peer_lan any tunnel vpn vpn1
set policy top from v1-untrust to v1-trust peer_lan local_lan any tunnel vpn vpn1
save
Juniper Networks security devices can support dialup virtual private network (VPN)
connections. You can configure a security device that has a static IP address to
secure an IPSec tunnel with a NetScreen-Remote client or with another security
device with a dynamic IP address.
169
Concepts & Examples ScreenOS Reference Guide
Dialup
You can configure tunnels for VPN dialup users individually, or you can form users
into a VPN dialup group for which you need only configure one tunnel. You can also
create a group IKE ID user that allows you to define one user whose IKE ID is used
as part of the IKE IDs of dialup IKE users. This approach is particularly timesaving
when there are large groups of dialup users because you do not have to configure
each IKE user individually.
NOTE: For more information about creating IKE user groups, see “IKE Users and User
Groups” on page 9-67. For more information about the Group IKE ID feature, see
“Group IKE ID” on page 193.
If the dialup client can support a virtual internal IP address, which the
NetScreen-Remote does, you can also create a dynamic peer dialup VPN, AutoKey
IKE tunnel (with a preshared key or certificates). You can configure a Juniper
Networks security gateway with a static IP address to secure an IPSec tunnel with a
NetScreen-Remote client or with another security device with a dynamic IP address.
NOTE: For background information about the available VPN options, see “Internet
Protocol Security” on page 1. For guidance when choosing among the various
options, see “Virtual Private Network Guidelines” on page 57.
You can configure policy-based VPN tunnels for VPN dialup users. For a dialup
dynamic peer client, you can configure either a policy-based or route-based VPN.
Because a dialup dynamic peer client can support a virtual internal IP address,
which the NetScreen-Remote does, you can configure a routing table entry to that
virtual internal address through a designated tunnel interface. Doing so allows you
to configure a route-based VPN tunnel between the security device and that peer.
NOTE: A dialup dynamic peer client is a dialup client that supports a virtual internal IP
address.
The dialup dynamic peer is nearly identical to the Site-to-Site dynamic peer except
that the internal IP address for the dialup client is a virtual address.
NOTE: The preshared key is h1p8A24nG5. It is assumed that both participants already
have certificates. For more information about certificates, see “Certificates and
CRLs” on page 34.
170 Dialup
Chapter 5: Dialup Virtual Private Networks
Setting up the AutoKey IKE tunnel using AutoKey IKE with either a preshared key or
certificates requires the following configuration at the corporate site:
1. Configure interfaces for the Trust and Untrust zones, both of which are in the
trust-vr routing domain.
2. Enter the address of the UNIX server in the Trust zone address book.
6. Create a policy from the Untrust zone to the Trust zone permitting access to the
UNIX from the dialup user.
Untrust Trust
Zone Zone
The preshared key is h1p8A24nG5. This example assumes that both participants
already have RSA certificates issued by Verisign and that the local certificate on the
NetScreen-Remote contains the U-FQDN [email protected]. (For information
about obtaining and loading certificates, see “Certificates and CRLs” on page 34.)
For the Phase 1 and 2 security levels, you specify one Phase 1 proposal—either
pre-g2-3des-sha for the preshared key method or rsa-g2-3des-sha for
certificates—and select the predefined “Compatible” set of proposals for Phase 2.
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Dialup 171
Concepts & Examples ScreenOS Reference Guide
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
172 Dialup
Chapter 5: Dialup Virtual Private Networks
VPNs > AutoKey IKE > New: Enter the following, then click OK:
(or)
Preshared Key
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
Source Address:
Address Book Entry: (select), Dial-Up VPN
Destination Address:
Address Book Entry: (select), UNIX
Service: ANY
Action: Tunnel
Tunnel VPN: Wendy_UNIX
Modify matching bidirectional VPN policy: (clear)
Position at Top: (select)
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
Dialup 173
Concepts & Examples ScreenOS Reference Guide
2. Address
set address trust unix 10.1.1.5/32
3. User
set user wendy ike-id u-fqdn [email protected]
4. VPN
Certificates
set ike gateway wendy_nsr dialup wendy aggressive outgoing-interface ethernet3
proposal rsa-g2-3des-sha
set ike gateway wendy_nsr cert peer-ca 1
set ike gateway wendy_nsr cert peer-cert-type x509-sig
set vpn wendy_unix gateway wendy_nsr sec-level compatible
NOTE: The number 1 is the CA ID number. To discover the CA’s ID number, use the
following command: get pki x509 list ca-cert.
(or)
Preshared Key
2. Click Add a new connection, and type UNIX next to the new connection icon
that appears.
4. Click the PLUS symbol, located to the left of the UNIX icon, to expand the
connection policy.
174 Dialup
Chapter 5: Dialup Virtual Private Networks
Click Pre-shared Key > Enter Key: Type h1p8A24nG5, then click OK.
(or)
NOTE: The email address from the certificate automatically appears in the identifier field.
6. Click the Security Policy icon, then select Aggressive Mode and clear Enable
Perfect Forward Secrecy (PFS).
7. Click the PLUS symbol, located to the left of the Security Policy icon, and then
the PLUS symbol to the left of Authentication (Phase 1) and Key Exchange
(Phase 2) to expand the policy further.
(or)
9. Click Key Exchange (Phase 2) > Proposal 1: Select the following IPSec
Protocols:
10. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
Dialup 175
Concepts & Examples ScreenOS Reference Guide
11. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
12. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
The admin can create a route linking the address with a tunnel interface bound
to an appropriate tunnel.
After the NetScreen-Remote client establishes the tunnel, traffic through the tunnel
can then originate from either end. All zones on the security device are in the
trust-vr routing domain.
In this example, Phil wants to get his email from the mail server at the company
site. When he attempts to do so, he is authenticated by the mail server program,
which sends him an IDENT request through the tunnel.
176 Dialup
Chapter 5: Dialup Virtual Private Networks
NOTE: The mail server can send the IDENT request through the tunnel only if the security
administrator adds a custom service for it (TCP, port 113) and sets up an outgoing
policy allowing that traffic through the tunnel to 10.10.10.1.
A null route to the destination. You assign a higher metric (farther from zero) to
the null route so that it becomes the next-choice route to the destination. Then,
if the state of the tunnel interface changes to “down” and the route referencing
that interface becomes inactive, the security device uses the null route, which
essentially drops any traffic sent to it, rather than the default route, which
forwards unencrypted traffic.
Finally, you create policies allowing traffic to flow in both directions between Phil
and the mail server.
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Dialup 177
Concepts & Examples ScreenOS Reference Guide
2. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Services > Group > New: Enter the following,
move the following services, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
(or)
178 Dialup
Chapter 5: Dialup Virtual Private Networks
Certificates
Outgoing Interface: ethernet3
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Dialup 179
Concepts & Examples ScreenOS Reference Guide
6. Policies
Policies > (From: Untrust, To: DMZ) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Phil
Destination Address:
Address Book Entry: (select), Mail Server
Service: Remote_Mail
Action: Permit
Position at Top: (select)
Policies > (From: DMZ, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Mail Server
Destination Address:
Address Book Entry: (select), Phil
Service: Remote_Mail
Action: Permit
Position at Top: (select)
CLI
1. Interfaces
set interface ethernet2 zone dmz
set interface ethernet2 ip 1.2.2.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface tunnel.1 zone untrust
set interface tunnel.1 ip unnumbered interface ethernet3
2. Addresses
set address dmz “Mail Server” 1.2.2.5/32
set address untrust phil 10.10.10.1/32
3. Services
set service ident protocol tcp src-port 1-65535 dst-port 113-113
set group service remote_mail
set group service remote_mail add ident
set group service remote_mail add mail
set group service remote_mail add pop3
4. VPN
Preshared Key
set ike gateway to_phil dynamic [email protected] aggressive outgoing-interface
ethernet3 preshare h1p8A24nG5 proposal pre-g2-3des-sha
set vpn corp_phil gateway to_phil sec-level compatible
set vpn corp_phil bind interface tunnel.1
set vpn corp_phil proxy-id local-ip 1.2.2.5/32 remote-ip 10.10.10.1/32 any
(or)
180 Dialup
Chapter 5: Dialup Virtual Private Networks
Certificates
set ike gateway to_phil dynamic [email protected] aggressive outgoing-interface
ethernet3 proposal rsa-g2-3des-sha
set ike gateway to_phil cert peer-ca 1
set ike gateway to_phil cert peer-cert-type x509-sig
set vpn corp_phil gateway to_phil sec-level compatible
set vpn corp_phil bind interface tunnel.1
set vpn corp_phil proxy-id local-ip 1.2.2.5/32 remote-ip 10.10.10.1/32 any
NOTE: The number 1 is the CA ID number. To discover the CA’s ID number, use the
following command: get pki x509 list ca-cert.
5. Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
set vrouter trust-vr route 10.10.10.1/32 interface tunnel.1
set vrouter trust-vr route 10.10.10.1/32 interface null metric 10
6. Policies
set policy top from dmz to untrust “Mail Server” phil remote_mail permit
set policy top from untrust to dmz phil “Mail Server” remote_mail permit
save
NetScreen-Remote
1. Click Options > Global Policy Settings, and select the Allow to Specify Internal
Network Address check box.
3. Click the Add a new connection button, and type Mail next to the new
connection icon that appears.
5. Click the PLUS symbol, located to the left of the UNIX icon, to expand the
connection policy.
6. Click the Security Policy icon, then select Aggressive Mode and clear Enable
Perfect Forward Secrecy (PFS).
Click Pre-shared Key > Enter Key: Type h1p8A24nG5, then click OK.
(or)
Dialup 181
Concepts & Examples ScreenOS Reference Guide
Select the certificate that contains the email address “[email protected]” from
the Select Certificate drop-down list.
8. Click the PLUS symbol, located to the left of the Security Policy icon, and then
the PLUS symbol to the left of Authentication (Phase 1) and Key Exchange
(Phase 2) to expand the policy further.
(or)
10. Click Key Exchange (Phase 2) > Proposal 1: Select the following IPSec
Protocols:
11. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
12. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
13. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
182 Dialup
Chapter 5: Dialup Virtual Private Networks
In this example, Phil wants to get his email from the mail server at the company
site. When he attempts to do so, he is authenticated by the mail server program,
which sends him an IDENT request through the tunnel.
NOTE: The mail server can send the IDENT request through the tunnel only if the security
administrator adds a custom service for it (TCP, port 113) and sets up an outgoing
policy allowing that traffic through the tunnel to 10.10.10.1.
The preshared key is h1p8A24nG5. This example assumes that both participants
have RSA certificates issued by Verisign and that the local certificate on the
NetScreen-Remote contains the U-FQDN [email protected]. (For more information
about obtaining and loading certificates, see “Certificates and CRLs” on page 34.)
For the Phase 1 and Phase 2 security levels, you specify one Phase 1
proposal—either pre-g2-3des-sha for the preshared key method or rsa-g2-3des-sha
for certificates—and select the predefined “Compatible” set of proposals for
Phase 2.
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
OK:
Dialup 183
Concepts & Examples ScreenOS Reference Guide
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Services > Group > New: Enter the following,
move the following services, then click OK:
184 Dialup
Chapter 5: Dialup Virtual Private Networks
Preshared Key
Preshared Key: h1p8A24nG5
Outgoing Interface: ethernet3
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
(or)
Certificates
Outgoing Interface: ethernet3
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Phil
Destination Address:
Address Book Entry: (select), Mail Server
Service: Remote_Mail
Action: Tunnel
VPN Tunnel: corp_Phil
Modify matching bidirectional VPN policy: (select)
Position at Top: (select)
Dialup 185
Concepts & Examples ScreenOS Reference Guide
CLI
1. Interfaces
set interface ethernet2 zone dmz
set interface ethernet2 ip 1.2.2.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Addresses
set address dmz “mail server” 1.2.2.5/32
set address untrust phil 10.10.10.1/32
3. Services
set service ident protocol tcp src-port 1-65535 dst-port 113-113
set group service remote_mail
set group service remote_mail add ident
set group service remote_mail add mail
set group service remote_mail add pop3
4. VPN
Preshared Key
set ike gateway to_phil dynamic [email protected] aggressive outgoing-interface
ethernet3 preshare h1p8A24nG5 proposal pre-g2-3des-sha
set vpn corp_phil gateway to_phil sec-level compatible
(or)
Certificates
set ike gateway to_phil dynamic [email protected] aggressive outgoing-interface
ethernet3 proposal rsa-g2-3des-sha
set ike gateway to_phil cert peer-ca 1
set ike gateway to_phil cert peer-cert-type x509-sig
set vpn corp_phil gateway to_phil sec-level compatible
NOTE: The number 1 is the CA ID number. To discover the CA’s ID number, use the
following command: get pki x509 list ca-cert.
5. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
6. Policies
set policy top from untrust to dmz phil “mail server” remote_mail tunnel vpn
corp_phil
set policy top from dmz to untrust “mail server” phil remote_mail tunnel vpn
corp_phil
save
NetScreen-Remote
1. Click Options > Global Policy Settings, and select Allow to Specify Internal
Network Address.
3. Click Add a new connection, and type Mail next to the new connection icon
that appears.
186 Dialup
Chapter 5: Dialup Virtual Private Networks
5. Click the PLUS symbol, located to the left of the UNIX icon, to expand the
connection policy.
6. Click the Security Policy icon, then select Aggressive Mode and clear Enable
Perfect Forward Secrecy (PFS).
Click Pre-shared Key > Enter Key: Type h1p8A24nG5, then click OK.
(or)
8. Click the PLUS symbol, located to the left of the Security Policy icon, and then
the PLUS symbol to the left of Authentication (Phase 1) and Key Exchange
(Phase 2) to expand the policy further.
(or)
10. Click Key Exchange (Phase 2) > Proposal 1: Select the following IPSec
Protocols:
Dialup 187
Concepts & Examples ScreenOS Reference Guide
11. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
12. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
13. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
The ability to create bidirectional policies for a dialup VPN tunnel allows traffic to
originate from the LAN end of the VPN connection after the connection has been
established. (The remote end must first initiate the tunnel creation.) Note that
unlike a dialup dynamic peer VPN tunnel, this feature requires that the services on
the incoming and outgoing policies be identical.
NOTE: ScreenOS does not support service groups and address groups in bidirectional
policies that reference a dialup VPN configuration.
The internal address space of two or more concurrently connected dialup VPN
users might overlap. For example, dialup users A and B might both have an internal
IP address space of 10.2.2.0/24. If that happens, the security device sends all
outbound VPN traffic to both user A and user B through the VPN referenced in the
first policy it finds in the policy list. For example, if the outbound policy referencing
the VPN to user A appears first in the policy list, then the security device sends all
outbound VPN traffic intended for users A and B to user A.
188 Dialup
Chapter 5: Dialup Virtual Private Networks
Similarly, the internal address of a dialup user might happen to overlap an address
in any other policy—whether or not that other policy references a VPN tunnel. If
that occurs, the security device applies the first policy that matches the basic traffic
attributes of source address, destination address, source port number, destination
port number, service. To avoid a bidirectional dialup VPN policy with a dynamically
derived address superseding another policy with a static address, Juniper Networks
recommends positioning the bidirectional dialup VPN policy lower in the policy list.
In this example, you configure bidirectional policies for a dialup AutoKey IKE VPN
tunnel named VPN_dial for IKE user dialup-j with IKE ID [email protected]. For Phase 1
negotiations, you use the proposal pre-g2-3des-sha, with the preshared key
Jf11d7uU. You select the predefined “Compatible” set of proposals for Phase 2
negotiations.
The IKE user initiates a VPN connection to the security device from the Untrust
zone to reach corporate servers in the Trust zone. After the IKE user establishes the
VPN connection, traffic can initiate from either end of the tunnel.
The Trust zone interface is ethernet1, has IP address 10.1.1.1/24, and is in NAT
mode. The Untrust zone interface is ethernet3 and has IP address 1.1.1.1/24. The
default route points to the external router at 1.1.1.250.
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Dialup 189
Concepts & Examples ScreenOS Reference Guide
Policy > Policy Elements > Users > Local > New: Enter the following, then
click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Dial-Up VPN
Destination Address:
Address Book Entry: (select), trust_net
Service: ANY
Action: Tunnel
VPN Tunnel: VPN_dial
Modify matching bidirectional VPN policy: (select)
190 Dialup
Chapter 5: Dialup Virtual Private Networks
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Objects
set address trust trust_net 10.1.1.0/24
set user dialup-j ike-id u-fqdn [email protected]
3. VPN
set ike gateway dialup1 dialup dialup-j aggressive outgoing-interface ethernet3
preshare Jf11d7uU proposal pre-g2-3des-sha
set vpn VPN_dial gateway dialup1 sec-level compatible
4. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
5. Policies
set policy from untrust to trust “Dial-Up VPN” trust_net any tunnel vpn VPN_dial
set policy from trust to untrust trust_net “Dial-Up VPN” any tunnel vpn VPN_dial
save
2. Click Add a new connection, and type Corp next to the new connection icon
that appears.
4. Click the PLUS symbol, located to the left of the UNIX icon, to expand the
connection policy.
Click Pre-shared Key > Enter Key: Type Jf11d7uU, then click OK.
6. Click the Security Policy icon, then select Aggressive Mode and clear Enable
Perfect Forward Secrecy (PFS).
Dialup 191
Concepts & Examples ScreenOS Reference Guide
7. Click the PLUS symbol, located to the left of the Security Policy icon, and then
the PLUS symbol to the left of Authentication (Phase 1) and Key Exchange
(Phase 2) to expand the policy further.
(or)
9. Click Key Exchange (Phase 2) > Proposal 1: Select the following IPSec
Protocols:
10. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
11. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
12. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
192 Dialup
Chapter 5: Dialup Virtual Private Networks
Group IKE ID
Some organizations have many dialup VPN users. For example, a sales department
might have hundreds of users, many of whom require secure dialup communication
when off site. With so many users, it is impractical to create a separate user
definition, dialup VPN configuration, and policy for each one.
To avoid this difficulty, the Group IKE ID method makes one user definition
available for multiple users. The group IKE ID user definition applies to all users
having certificates with specified values in the distinguished name (dn) or to all
users whose full IKE ID and preshared key on their VPN client match a partial IKE
ID and preshared key on the security device.
NOTE: When a dialup IKE user connects to the security device, the security device first
extracts and uses the full IKE ID to search its peer gateway records in case the user
does not belong to a group IKE ID user group. If the full IKE ID search produces no
matching entry, the security device then checks for a partial IKE ID match
between the incoming embedded IKE ID and a configured group IKE ID user.
You add a single group IKE ID user to an IKE dialup VPN user group and specify the
maximum number of concurrent connections that the group supports. The
maximum number of concurrent sessions cannot exceed the maximum number of
allowed Phase 1 SAs or the maximum number of VPN tunnels allowed on the
platform.
Certificate
DN:
cn=alice
ou=eng Group IKE ID User
---------- ASN1-DN IKE ID Type
---------- Partial IKE ID: ou=eng
Certificate
DN:
cn=bob To authenticate the user, the device compares a
ou=eng specific element of the distinguished name (dn)
---------- associated with the dialup user group with the
---------- corresponding element in the certificate and the
dn used for the IKE ID payload accompanying
Certificate the initial Phase 1 packet.
DN:
cn=carol
ou=sales
----------
---------- Note: Because the dn in Carol’s certificate
does not include ou=eng, the device rejects
the connection request.
2. Assign the new group IKE ID user to a dialup user group, and name the group.
NOTE: You can put only one group IKE ID user in an IKE user group.
3. In the dialup AutoKey IKE VPN configuration, specify the name of the dialup
user group, that the Phase 1 negotiations be in Aggressive mode and that
certificates (RSA or DSA, depending on the type of certificate loaded on the
dialup VPN clients) be used for authentication.
4. Create a policy permitting inbound traffic through the specified dialup VPN.
2. Configure a VPN tunnel to the security device using Aggressive mode for
Phase 1 negotiations, specify the certificate that you have previously loaded,
and select Distinguished Name for the local IKE ID type.
Thereafter, each individual dialup IKE user with a certificate with distinguished
name elements that match the partial IKE ID defined in the group IKE ID user
profile can successfully build a VPN tunnel to the security device. For example, if the
group IKE ID user has IKE ID OU=sales,O=netscreen, the security device accepts
Phase 1 negotiations from any user with a certificate containing those elements in
its distinguished name. The maximum number of such dialup IKE users that can
connect to the security device depends upon the maximum number of concurrent
sessions that you specify in the group IKE ID user profile.
C=us Legend:
General
C = Country
ST=ca
ST = State
L=sunnyvale L = Locality
O = Organization
O=juniper OU = Organizational Unit
CN = Common Name
OU=sales
CN=jozef
Specific
When configuring the group IKE ID user, you must specify the peer’s ASN1-DN ID
as one of two types:
When configuring an ASN1-DN ID for a remote IKE user, specify the type as either
“wildcard” or “container” and define the ASN1-DN ID that you expect to receive in
the peer’s certificate (for example, “c=us,st=ca,cn=kgreen”). When configuring
an ASN1-DN ID for a local IKE ID, use the following keyword: [DistinguishedName].
Include the brackets and spell it exactly as shown.
then a wildcard ASN1-DN IKE ID successfully matches the two IKE IDs, even though
the order of values in the two IDs is different.
CN=kristine C=us
Authentication
Success
OU=finance ST=
O=juniper L=
L= O=juniper
ST=ca OU=
C=us CN=
Figure 49: Authentication Success and Failure Using Container ASN1-DN IDs
Dialup IKE User’s Group IKE User’s container
ASN1-DN IKE ID ASN1-DN IKE ID
E= E=
The first dialup IKE
user’s ASN1-DN
contains exact matches
of the group IKE user’s C=us C=us
ASN1-DN. The order of
the multiple entries in Authentication
the OU ID field is also ST=ca ST=
identical. Success
L= sf L=
O=juniper O=juniper
OU=mkt,OU=dom,OU=west OU=mkt,OU=dom,OU=west
CN=rick CN=
E= E=
O=juniper O=juniper
OU=mkt,OU=west,OU=dom OU=mkt,OU=dom,OU=west
CN=tony CN=
The dialup IKE users send a distinguished name as their IKE ID. The distinguished
name (dn) in a certificate for a dialup IKE user in this group might appear as the
following concatenated string:
C=us,ST=ca,L=sunnyvale,O=netscreen,OU=marketing,CN=carrie
nowocin,CN=a2010002,CN=ns500,
CN=4085557800,CN=rsa-key,CN=10.10.5.44
Because the values O=netscreen and OU=marketing appear in the peer’s certificate
and the user uses the distinguished name as its IKE ID type, the security device
authenticates the user.
For the Phase 1 and Phase 2 security levels, you specify one Phase 1 proposal —
rsa-g2-3des-sha for certificates—and select the predefined “Compatible” set of
proposals for Phase 2.
You configure a dialup VPN and a policy permitting HTTP traffic through the VPN
tunnel to reach the webserver Web1. The configuration of the remote VPN client
(using NetScreen-Remote) is also included.
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
2. Address
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Objects > User Groups > Local > New: Type office_1 in the Group Name field,
do the following, then click OK:
Select User1 and use the << button to move her from the Available Members
column to the Group Members column.
4. VPN
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
5. Route
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Source Address:
Address Book Entry: (select), Dial-Up VPN
Destination Address:
Address Book Entry: (select), web1
Service: HTTP
Action: Tunnel
Tunnel VPN: Corp_VPN
Modify matching bidirectional VPN policy: (clear)
Position at Top: (select)
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Address
set address trust web1 10.1.1.5/32
3. Users
set user User1 ike-id asn1-dn wildcard o=juniper,ou=marketing share-limit 10
set user-group office_1 user User1
4. VPN
set ike gateway Corp_GW dialup office_1 aggressive outgoing-interface ethernet3
proposal rsa-g2-3des-sha
set ike gateway Corp_GW cert peer-ca 1
set ike gateway Corp_GW cert peer-cert-type x509-sig
set vpn Corp_VPN gateway Corp_GW sec-level compatible
NOTE: The number 1 is the CA ID number. To discover the CA’s ID number, use the
following command: get pki x509 list ca-cert.
5. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
6. Policy
set policy top from untrust to trust “Dial-Up VPN” web1 http tunnel vpn Corp_VPN
save
2. Click Add a new connection, and type web1 next to the new connection icon
that appears.
4. Click the PLUS symbol, located to the left of the web1 icon, to expand the
connection policy.
NOTE: This example assumes that you have already loaded a suitable certificate on the
NetScreen-Remote client. For information about loading certificates on the
NetScreen-Remote, refer to the NetScreen-Remote documentation.
6. Click the Security Policy icon, then select Aggressive Mode and clear Enable
Perfect Forward Secrecy (PFS).
7. Click the PLUS symbol, located to the left of the Security Policy icon, and then
the PLUS symbol to the left of Authentication (Phase 1) and Key Exchange
(Phase 2) to expand the policy further.
9. Click Key Exchange (Phase 2) > Proposal 1: Select the following IPSec
Protocols:
10. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
11. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
12. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
Full IKE ID
Dialup IKE Users +
Preshared Key Dialup User Group
alice.eng.jnpr.net
+
011fg3322eda837c
The IKE ID type that you can use for the Group IKE ID with Preshared Key feature
can be either an email address or a fully qualified domain name (FQDN).
3. In the dialup AutoKey IKE VPN configuration, assign a name for the remote
gateway (such as road1), specify the dialup user group, and enter a preshared
key seed value.
5. Record the preshared key for use when configuring the remote VPN client.
Thereafter, the security device can successfully authenticate each individual user
whose full IKE ID contains a section that matches the partial group IKE ID user
profile. For example, if the group IKE ID user has IKE identity juniper.net, any user
with that domain name in his IKE ID can initiate Phase 1 IKE negotiations in
Aggressive mode with the security device. For example: [email protected],
[email protected], and [email protected]. How many such users can log on
depends upon a maximum number of concurrent sessions specified in the group
IKE ID user profile.
In this example, you create a new group IKE ID user named User2. You configure it
to accept up to 10 Phase 1 negotiations concurrently from VPN clients with
preshared keys containing an IKE ID ending with the string juniper.net. The seed
value for the preshared key is jk930k. You name the dialup IKE user group office_2.
For both the Phase 1 and Phase 2 negotiations, you select the security level
predefined as “Compatible.” All the security zones are in the trust-vr routing
domain.
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > User Groups > Local > New: Type office_2 in the
Group Name field, do the following, then click OK:
Select User2 and use the << button to move him from the Available Members
column to the Group Members column.
4. VPN
NOTE: The WebUI allows you to enter only a value for a preshared key, not a seed value
from which the security device derives a preshared key. To enter a preshared key
seed value when configuring an IKE gateway, you must use the CLI.
VPNs > AutoKey IKE > New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Dial-Up VPN
Destination Address:
Address Book Entry: (select), web1
Service: HTTP
Action: Tunnel
Tunnel VPN: Corp_VPN
Modify matching bidirectional VPN policy: (clear)
Position at Top: (select)
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Address
set address trust web1 10.1.1.5/32
3. Users
set user User2 ike-id u-fqdn juniper.net share-limit 10
set user-group office_2 user User2
4. VPN
set ike gateway Corp_GW dialup office_2 aggressive seed-preshare jk930k
sec-level compatible
set vpn Corp_VPN gateway Corp_GW sec-level compatible
5. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
6. Policy
set policy top from untrust to trust “Dial-Up VPN” web1 http tunnel vpn Corp_VPN
save
The preshared key, based on the preshared key seed value jk930k (as specified
in the configuration for the remote gateway named Corp_GW), and the full
identity of individual user [email protected] is
11ccce1d396f8f29ffa93d11257f691af96916f2.
2. Click Add a new connection, and type web1 next to the new connection icon
that appears.
4. Click the PLUS symbol, located to the left of the web1 icon, to expand the
connection policy.
5. Click the Security Policy icon, then select Aggressive Mode and clear Enable
Perfect Forward Secrecy (PFS).
7. Click the PLUS symbol, located to the left of the Security Policy icon, then click
the PLUS symbol to the left of Authentication (Phase 1) and Key Exchange
(Phase 2) to expand the policy further.
9. Click Authentication (Phase 1) > Create New Proposal: Select the following
IPSec Protocols:
10. Click Authentication (Phase 1) > Create New Proposal: Select the following
IPSec Protocols:
11. Click Authentication (Phase 1) > Create New Proposal: Select the following
IPSec Protocols:
12. Click Key Exchange (Phase 2) > Proposal 1: Select the following IPSec
Protocols:
13. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
14. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
15. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
Shared IKE ID
The shared IKE ID feature facilitates the deployment of a large number of dialup
users. With this feature, the security device authenticates multiple dialup VPN users
using a single group IKE ID and preshared key. Thus, it provides IPSec protection for
large remote user groups through a common VPN configuration.
This feature is similar to the Group IKE ID with pre-shared keys feature, with the
following differences:
With the group IKE ID feature, the IKE ID can be an email address or an FQDN
(fully qualified domain name). For this feature, the IKE ID must be an email
address.
Instead of using the preshared key seed value and the full user IKE ID to
generate a preshared key for each user, you specify a single preshared key for
all users in the group.
1. Create a new group IKE ID user, and specify how many dialup users can use the
group IKE ID to log on. For this feature, use an email address as the IKE ID.
4. Define the XAuth users and enable XAuth on the remote IKE gateway.
Configure a VPN tunnel to the security device using Aggressive mode for Phase 1
negotiations, and enter the preshared key that you previously defined on the
security device.Thereafter, the security device authenticates each remote user as
follows:
During Phase 1 negotiations, the security device first authenticates the VPN client
by matching the IKE ID and preshared key that the client sends with the IKE ID and
preshared key on the security device. If there is a match, then the security device
uses XAuth to authenticate the individual user. It sends a login prompt to the user at
the remote site between Phase 1 and Phase 2 IKE negotiations. If the remote user
successfully logs on with the correct username and password, Phase 2 negotiations
begin.
In this example, you create a new group IKE ID user named Remote_Sales. It
accepts up to 250 Phase 1 negotiations concurrently from VPN clients with the
same preshared key (abcd1234). You name the dialup IKE user group R_S. In
addition, you configure two XAuth users, Joe and Mike.
For both the Phase 1 and Phase 2 negotiations, you select the security level
predefined as Compatible. All the security zones are in the trust-vr routing domain.
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
2. Address
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > User Groups > Local > New: Type R_S in the
Group Name field, do the following, then click OK:
Select Remote_sales and use the << button to move him from the Available
Members column to the Group Members column.
Policy > Policy Elements > Users > Local > New: Enter the following, then
click OK:
Policy > Policy Elements > Users > Local > New: Enter the following, then
click OK:
> Advanced: Enter the following, then click Return to return to the base
Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Source Address:
Address Book Entry: (select), Dial-Up VPN
Destination Address:
Address Book Entry: (select), web1
Service: HTTP
Action: Tunnel
Tunnel VPN: Sales_VPN
Modify matching bidirectional VPN policy: (clear)
Position at Top: (select)
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Address
set address trust web1 10.1.1.5/32
3. Users
set user Remote_Sales ike-id [email protected] share-limit 250
set user-group R_S user Remote_Sales
set user Joe password 1234
set user Joe type xauth
set user Mike password 5678
set user Mike type xauth
4. VPN
set ike gateway sales_gateway dialup R_S aggressive outgoing-interface ethernet3
preshare abcd1234 sec-level compatible
set ike gateway sales_gateway xauth
set vpn sales_vpn gateway sales_gateway sec-level compatible
set vpn sales_vpn bind zone untrust-tun
5. Route
set route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
6. Policy
set policy top from untrust to trust “Dial-Up VPN” web1 http tunnel vpn sales_vpn
save
2. Click Add a new connection, and type web1 next to the new connection icon
that appears.
4. Click the PLUS symbol, located to the left of the web1 icon, to expand the
connection policy.
5. Click the Security Policy icon, then select Aggressive Mode and clear Enable
Perfect Forward Secrecy (PFS).
6. Click My Identity: Click Pre-shared Key > Enter Key: Type abcd1234, then
click OK.
7. Click the PLUS symbol, located to the left of the Security Policy icon, then click
the PLUS symbol to the left of Authentication (Phase 1) and Key Exchange
(Phase 2) to expand the policy further.
9. Click Authentication (Phase 1) > Create New Proposal: Select the following
IPSec Protocols:
10. Click Authentication (Phase 1) > Create New Proposal: Select the following
IPSec Protocols:
11. Click Authentication (Phase 1) > Create New Proposal: Select the following
IPSec Protocols:
12. Click Key Exchange (Phase 2) > Proposal 1: Select the following IPSec
Protocols:
13. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
14. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
15. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
This chapter provides an introduction to Layer 2 Tunneling Protocol (L2TP), its use
alone and with IPSec support, and some configuration examples for L2TP and
L2TP-over-IPSec. It contains the following sections:
Introduction to L2TP
Layer 2 Tunneling Protocol (L2TP) provides a way for a dialup user to make a virtual
Point-to-Point Protocol (PPP) connection to an L2TP network server (LNS), which
can be a security device. L2TP sends PPP frames through a tunnel between an L2TP
access concentrator (LAC) and the LNS.
Originally, L2TP was designed so that a LAC residing at an ISP site tunneled to an
LNS at either another ISP or corporate site. The L2TP tunnel did not extend
completely to the dialup user’s computer, but only to the LAC at the dialup user’s
local ISP. (This is sometimes referred to as a compulsory L2TP configuration.)
Figure 54: L2TP Tunnel Between VPN Client (LAC) and Security Device (LNS)
NetScreen-Remote
or Windows 2000 Security device
(LAC) Internet (LNS)
ISP
Corporate
LAN
L2TP Tunnel
(forwarding PPP sessions
from LAC to LNS)
Because the PPP link extends from the dialup user across the Internet to the
security device (LNS), it is the security device, not the ISP, that assigns the client its
IP address, DNS and WINS servers addresses, and authenticates the user, either
from the local database or from an external auth server (RADIUS, SecurID, or
LDAP).
In fact, the client receives two IP addresses—one for its physical connection to the
ISP, and a logical one from the LNS. When the client contacts its ISP, perhaps using
PPP, the ISP makes IP and DNS assignments, and authenticates the client. This
allows users to connect to the Internet with a public IP address, which becomes the
outer IP address of the L2TP tunnel.
IP Address: 5.5.5.5
DNS: 6.6.6.6, 7.7.7.7
Then, when the L2TP tunnel forwards the encapsulated PPP frames to the security
device, the security device assigns the client an IP address, and DNS and WINS
settings. The IP address can be from the set of private addresses not used on the
Internet. This address becomes the inner IP address of the L2TP tunnel.
Security device
Internet (LNS)
CorporateLAN
10.1.1.0/24
IP Address: 10.10.1.161
DNS: 10.1.1.10, 1.2.2.10 IP Address Pool
WINS: 10.1.1.48, 10.1.1.49 10.10.1.1 – 10.10.1.254
NOTE: The IP addresses assigned to the L2TP client must be in a different subnet from
the IP addresses in the corporate LAN.
NOTE: By default, Windows 2000 performs L2TP-over-IPSec. To force it to use L2TP only,
you must navigate to the ProhibitIPSec key in the registry and change 0
(L2TP-over-IPSec) to 1 (L2TP only). (Before performing this, Juniper Networks
recommends that you back up your registry.) Click Start > Run: Type regedit.
Double-click HKEY_LOCAL_MACHINE > System > CurrentControlSet >
Services > RasMan > Parameters. Double-click ProhibitIPSec: Type 1 in the
Value data field, select Hexadecimal as the base value, then click OK. Reboot. (If
you do not find such an entry in the registry, see Microsoft WIndows
documentation for information about how to create one.)
Outgoing dialup policy for L2TP and L2TP-over-IPSec tunnels (An outgoing
dialup policy can be paired with an incoming policy to provide a bidirectional
tunnel.)
NOTE: The local database and RADIUS servers support both PAP and CHAP. SecurID and
LDAP servers support PAP only.
L2TP tunnels and L2TP-over-IPSec tunnels for the root system and virtual
systems
NOTE: To use L2TP, the security device must be operating at Layer 3, with security zone
interfaces in NAT or Route mode. When the security device is operating at Layer 2,
with security zone interfaces in Transparent mode, no L2TP-related material
appears in the WebUI, and L2TP-related CLI commands elicit error messages.
Encapsulation
When a dialup user on an IP network sends data over an L2TP tunnel, the LAC
encapsulates the IP packet within a series of Layer 2 frames, Layer 3 packets, and
Layer 4 segments. Assuming that the dialup user connects to the local ISP over a
PPP link, the encapsulation proceeds as shown in Figure 57 on page 219.
DATA
IP PAYLOAD
PPP PAYLOAD
L2TP PAYLOAD
UDP PAYLOAD
IP PAYLOAD
PPP PAYLOAD
Decapsulation
When the LAC initiates the PPP link to the ISP, the decapsulation and forwarding of
the nested contents proceed as shown in Figure 58 on page 220.
IP PAYLOAD
UDP PAYLOAD
L2TP PAYLOAD
LNS
PPP PAYLOAD
IP PAYLOAD
DATA
1. The ISP completes the PPP link and assigns the user’s computer an IP address.
2. The ISP removes the PPP header and forwards the IP packet to the LNS.
Inside the IP payload is a UDP segment specifying port 1701, the port number
reserved for L2TP.
5. The LNS processes the L2TP frame, using the tunnel ID and call ID in the L2TP
header to identify the specific L2TP tunnel. The LNS then removes the L2TP
header.
6. The LNS processes the PPP frame, assigning the user’s computer a logical IP
address.
7. The LNS routes the IP packet to its ultimate destination, where the IP header is
removed and the data in the IP packet is extracted.
DNS primary and secondary server IP addresses – The security device provides
these addresses to the dialup user’s computer.
WINS primary and secondary server IP addresses – The security device also
provides these addresses to the dialup user’s computer.
The LNS also authenticates the user through a username and password. You can
enter the user in the local database or in an external auth server (RADIUS, SecurID,
or LDAP).
NOTE: The RADIUS or SecurID server that you use for authenticating L2TP users can be
the same server you use for network users, or it can be a different server.
In addition, you can specify one of the following schemes for the PPP
authentication:
“ANY”, meaning that the security device negotiates CHAP, and then if that fails,
PAP.
You can apply to dialup users and dialup user groups the default L2TP parameters
that you configure on the L2TP Default Configuration page (VPNs > L2TP >
Default Settings) or with the set l2tp default command. You can also apply L2TP
parameters that you configure specifically for L2TP users on the User Configuration
page (Users > Users > Local > New) or with the set user name_str
remote-settings command. The user-specific L2TP settings supersede the default
L2TP settings.
As shown in Figure 59 on page 222, you define an IP address pool with addresses
ranging from 10.1.3.40 to 10.1.3.100. You specify DNS server IP addresses 1.1.1.2
(primary) and 1.1.1.3 (secondary). The security device performs PPP authentication
using CHAP.
RADIUS
10.1.1.245
Trust Zone Untrust Zone DNS 1
1.1.1.2
Note: The L2TP pool addresses Internet DNS 2
must be in a different subnet from 1.1.1.3
those in the Trust zone.
WebUI
1. IP Pool
Objects > IP Pools > New: Enter the following, then click OK:
CLI
1. IP Pool
set ippool sutro 10.1.3.40 10.1.3.100
2. Default L2TP Settings
set l2tp default ippool sutro
set l2tp default ppp-auth chap
set l2tp default dns1 1.1.1.2
set l2tp default dns2 1.1.1.3
save
To encrypt an L2TP tunnel, you need to apply an encryption scheme to the L2TP
tunnel. Because L2TP assumes that the network between the LAC and the LNS is IP,
you can employ IPSec to provide encryption. This combination is called
L2TP-over-IPSec. L2TP-over-IPSec requires setting up both an L2TP tunnel and an
IPSec tunnel with the same endpoints, and then linking them together in a policy.
L2TP-over-IPSec requires that the IPSec tunnel be in Transport mode so that the
tunnel endpoint addresses remain in the clear. (For information about Transport
and Tunnel mode, see “Modes” on page 4.)
You can create an L2TP tunnel between a security device and a host running
Windows 2000 if you change the Windows 2000 registry settings. (For instructions
on how to change the registry, see the note on page 217.)
You can create an L2TP-over-IPSec tunnel between a security device and either of
the following VPN clients:
Configuring L2TP
In this example, as illustrated in Figure 60 on page 224, you create a dialup user
group called “fs” (for “field-sales”) and configure an L2TP tunnel called
“sales_corp,” using ethernet3 (Untrust zone) as the outgoing interface for the L2TP
tunnel. The security device applies the following default L2TP tunnel settings to the
dialup user group:
The addresses in the L2TP IP pool must be in a different subnet than the
addresses in the corporate network.
Trust Zone
Betty
Internet
Carol
L2TP Tunnel:
sales_corp Outgoing Interface ethernet1,
ethernet3, 1.1.1.1/24 10.1.1.1/24
NetScreen-
Remote Clients
The remote L2TP clients are on Windows 2000 operating systems. For information
about how to configure L2TP on the remote clients, refer to your Windows 2000
documentation. Only the configuration for the security device end of the L2TP
tunnel is provided below.
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
2. L2TP Users
Objects > Users > Local > New: Enter the following, then click OK:
Objects > Users > Local > New: Enter the following, then click OK:
Objects > Users > Local > New: Enter the following, then click OK:
Select Adam and use the << button to move him from the Available
Members column to the Group Members column.
Select Betty and use the << button to move her from the Available
Members column to the Group Members column.
Select Carol and use the << button to move her from the Available
Members column to the Group Members column.
VPNs > L2TP > Default Settings: Enter the following, then click OK:
5. L2TP Tunnel
VPNs > L2TP > Tunnel > New: Enter the following, then click OK:
Name: sales_corp
Use Custom Settings: (select)
Authentication Server: Local
Dialup Group: Local Dialup Group - fs
Outgoing Interface: ethernet3
Peer IP: 0.0.0.0
Host Name (optional): Enter the name of the computer acting as the LAC.
Secret (optional): Enter a secret shared between the LAC and the LNS.
Keep Alive: 60
Peer IP: Because the peer’s ISP dynamically assigns it an IP address, you would
enter 0.0.0.0 in the above example.
LAC: To find the name of a computer running Windows 2000, do the following:
Click Start > Settings > Control Panel > System. The System Properties dialog
box appears. Click the Network Identification tab, and see entry following Full
computer name.
To add a secret to the LAC for authenticating the L2TP tunnel, you must modify the
Windows 2000 registry as follows:
1. Click Start > Run, and then type regedit. The Registry Editor opens.
2. Click HKEY_LOCAL_MACHINE.
3. Right-click SYSTEM, and then select Find from the pop-up menu that appears.
5. In the Edit menu, highlight New, and then select String Value.
6. Type Password.
8. Type the password in the Value data field. This must be the same as the word in
the L2TP Tunnel Configuration Secret field on the security device.
Keep-Alive: The Keep Alive value is the number of seconds of inactivity before the
security device sends an L2TP hello signal to the LAC.
6. Route
Network > Routing > Routing Entries > New: Enter the following, then click
OK:
Source Address:
Address Book Entry: (select), Dial-Up VPN
Destination Address:
Address Book Entry: (select), Any
NAT: Off
Service: ANY
Action: Tunnel
Tunnel L2TP: sales_corp
Position at Top: (select)
CLI
1. Dialup Users
set user adam type l2tp
set user adam password AJbioJ15
unset user adam type auth
set user betty type l2tp
set user betty password BviPsoJ1
unset user betty type auth
set user carol type l2tp
set user carol password Cs10kdD3
unset user carol type auth
NOTE: Defining a password for a user automatically classifies the user as an auth user.
Therefore, to define the user type strictly as L2TP, you must unset the auth user
type.
5. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
6. Policy
set policy top from untrust to trust “Dial-Up VPN” any any tunnel l2tp sales_corp
save
Configuring L2TP-over-IPSec
This example uses the same L2TP tunnel created in the previous example
(“Configuring L2TP” on page 223). Additionally, you overlay an IPSec tunnel onto
the L2TP tunnel to provide encryption. The IPSec tunnel negotiates Phase 1 in
Aggressive Mode using a previously loaded RSA certificate, 3DES encryption and
SHA-1 authentication. The certificate authority (CA) is Verisign. (For information
about obtaining and loading certificates, see “Public Key Cryptography” on
page 29.) The Phase 2 negotiation uses the security level predefined as
“Compatible” for Phase 2 proposals. The IPSec tunnel is in Transport mode.
The predefined Trust zone and the user-defined Dialup zone are in the trust-vr
routing domain. The interfaces for the Dialup and Trust zones are ethernet2
(1.3.3.1/24) and ethernet1 (10.1.1.1/24), respectively. The Trust zone is in NAT
mode.
The dialup users Adam, Betty, and Carol use NetScreen-Remote clients on a
Windows 2000 operating system. The NetScreen-Remote configuration for dialup
user Adam is also included below. (The NetScreen-Remote configuration for the
other two dialup users is the same as that for Adam.)
Trust Zone
Betty
Internet
Carol
L2TP Tunnel: sales_corp
VPN Tunnel: from_sales Outgoing Interface ethernet1,
ethernet2, 1.3.3.1/24 10.1.1.1/24
NetScreen-
Remote Clients
WebUI
1. User-Defined Zone
Network > Zones > New: Enter the following, then click OK:
NOTE: The Trust zone is preconfigured. You do not need to create it.
2. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
OK:
NOTE: The IKE ID that you enter must be the same as the one that the NetScreen-Remote
client sends, which is the email address that appears in the certificate that the
client uses for authentication.
Objects > Users > Local > New: Enter the following, then click OK:
Objects > Users > Local > New: Enter the following, then click OK:
Select Adam and use the << button to move him from the Available
Members column to the Group Members column.
Select Betty and use the << button to move her from the Available
Members column to the Group Members column.
Select Carol and use the << button to move her from the Available
Members column to the Group Members column.
5. IP Pool
Objects > IP Pools > New: Enter the following, then click OK:
Name: sales_corp
Dialup Group: (select), Local Dialup Group - fs
Authentication Server: Local
Outgoing Interface: ethernet2
Peer IP: 0.0.0.0
Host Name (optional): If you want to restrict the L2TP tunnel to a specific
host, enter the name of the computer acting as the LAC.
Secret (optional): Enter a secret shared between the LAC and the LNS.
Keep Alive: 60
LAC: To find the name of a computer running Windows 2000, do the following:
Click Start > Settings > Control Panel > System. The System Properties dialog
box appears. Click the Network Identification tab, and see entry following Full
computer name.
Secret: To add a secret to the LAC for authenticating the L2TP tunnel, you must
modify the Windows 2000 registry as follows:
1. Click Start > Run, and then type regedit. The Registry Editor opens.
2. Click HKEY_LOCAL_MACHINE.
3. Right-click SYSTEM, and then select Find from the pop-up menu that appears.
5. In the Edit menu, highlight New, and then select String Value.
6. Type Password.
8. Type the password in the Value data field. This must be the same as the word in
the L2TP Tunnel Configuration Secret field on the security device.
Keep-Alive: The Keep Alive value is the number of seconds of inactivity before the
security device sends an L2TP hello signal to the LAC.
NOTE: The hostname and secret settings can usually be ignored. Only advanced users are
recommended to use these settings.
8. VPN Tunnel
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
Name: from_sales
Security Level: Compatible
Remote Gateway: Predefined: field
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Source Address:
Address Book Entry: (select), Dial-Up VPN
Destination Address:
Address Book Entry: (select), Any
Service: ANY
Action: Tunnel
Tunnel VPN: from_sales
Modify matching bidirectional VPN policy: (clear)
L2TP: sales_corp
Position at Top: (select)
CLI
1. User-Defined Zone
set zone name dialup
set zone dialup vrouter trust-vr
set zone dialup block
2. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet2 zone dialup
set interface ethernet2 ip 1.3.3.1/24
3. L2TP/IKE Users
set user adam type ike l2tp
set user adam password AJbioJ15
unset user adam type auth
set user adam ike-id u-fqdn [email protected]
set user betty type ike l2tp
set user betty password BviPsoJ1
unset user betty type auth
set user betty ike-id u-fqdn [email protected]
set user carol type ike l2tp
set user carol password Cs10kdD3
unset user carol type auth
set user carol ike-id u-fqdn [email protected]
4. IKE/L2TP User Group
set user-group fs location Local
set user-group fs user adam
set user-group fs user betty
set user-group fs user carol
5. IP Pool
set ippool global 10.10.2.100 10.10.2.180
6. Default L2TP Settings
set l2tp default ippool global
set l2tp default ppp-auth chap
set l2tp default dns1 1.1.1.2
set l2tp default dns2 1.1.1.3
7. L2TP Tunnel
set l2tp sales_corp outgoing-interface ethernet2
set l2tp sales_corp auth server Local user-group fs
8. VPN Tunnel
set ike gateway field dialup fs aggressive outgoing-interface ethernet2 proposal
rsa-g2-3des-sha
set ike gateway field cert peer-ca1
set ike gateway field cert peer-cert-type x509-sig
set vpn from_sales gateway field transport sec-level compatible
The number 1 is the CA ID number. To discover the CA’s ID number, use the
following command: get pki x509 list ca-cert.
9. Policy
set policy top from dialup to trust “Dial-Up VPN” any any tunnel vpn from_sales
l2tp sales_corp
save
2. Click Add a new connection, and type AJ next to the new connection icon that
appears.
4. Click the PLUS symbol, located to the left of the AJ icon, to expand the
connection policy.
Select the certificate with the email address specified as the user’s IKE ID on
the security device from the Select Certificate drop-down list:
NOTE: The email address from the certificate appears in the identifier field automatically.
7. Click the PLUS symbol, located to the left of the Security Policy icon, and then
the PLUS symbol to the left of Authentication (Phase 1) and Key Exchange
(Phase 2) to expand the policy further.
9. Click Key Exchange (Phase 2) > Proposal 1: Select the following IPSec
Protocols:
10. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
11. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
12. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
14. You also need to set up the network connection for your Windows 2000
operating system using the Network Connection Wizard.
NOTE: When configuring the Network Connection Wizard, you must enter a destination
hostname or IP address. Enter 1.3.3.1. Later, when initiating a connection and are
prompted for a username and password, enter adam, AJbioJ15. For more
information, consult Microsoft Windows 2000 documentation.
Bidirectional L2TP-over-IPSec
In this example, ethernet1 (10.1.1.1/24) is the Trust zone interface and is in NAT
mode, and ethernet3 (1.1.1.1/24) is the Untrust zone interface. You create
L2TP-over-IPSec tunnels between a NetScreen-Remote dialup user and a corporate
LAN. The remote user is running an X-Windows application, which requires
bidirectional policies.
You configure incoming and outgoing policies for the dialup AutoKey IKE VPN
tunnel named VPN_dial for IKE user dialup-j with IKE ID [email protected]., and the L2TP
tunnel named tun1. The IKE user initiates a IPSec connection to the security device
from the Untrust zone to reach corporate servers in the Trust zone. At this point,
only L2TP communication is allowed. After L2TP/PPP negotiation, the L2TP tunnel
is established. With bidirectional policies configured, traffic can initiate from either
end of the tunnel.
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
3. L2TP/IKE User
Objects > Users > Local > New: Enter the following, then click OK:
NOTE: The IKE ID that you enter must be the same as the one that the NetScreen-Remote
client sends, which is the email address that appears in the certificate that the
client uses for authentication.
4. L2TP
VPNs > L2TP > Tunnel > New: Enter the following, then click OK:
Name: tun1
Use Default Settings: (select)
Secret: netscreen
Keepalive: 60
5. VPN
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
> Advanced: Enter the following, and then click Return to return to the
basic AutoKey IKE Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following, and then click Return to return to the
basic AutoKey IKE configuration page:
6. Route
Network > Routing > Routing Entries > New: Enter the following, then click
OK:
Source Address:
Address Book Entry: (select), Dial-Up VPN
Destination Address:
Address Book Entry: (select), trust_net
Service: ANY
Action: Tunnel
Tunnel VPN: VPN_dial
Modify matching bidirectional VPN policy: (select)
L2tp: (select) tun1
Policies > (From: Trust, To: Untrust) > New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), trust_net
Destination Address:
Address Book Entry: (select), Dial-Up VPN
Service: ANY
Action: Tunnel
Tunnel VPN: VPN_dial
Modify matching bidirectional VPN policy: (select)
L2TP: tun1
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Address
set address trust trust_net 10.1.1.0/24
3. L2TP/IKE User
set user dialup-j ike-id u-fqdn [email protected]
set user dialup-j type auth ike l2tp
set user dialup-j password abc123
4. L2TP
set L2TP tun1 outgoing-interface ethernet3 secret "netscreen" keepalive 60
5. VPN
set ike gateway dialup1 dialup "dialup-j" aggressive outgoing-interface ethernet3
preshare n3TsCr33N sec-level standard
set ike gateway dialup1 nat-traversal udp-checksum
set ike gateway dialup1 nat-traversal keepalive-frequency 5
set vpn VPN_dial gateway dialup1 no-replay transport idletime 0 sec-level standard
6. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
7. Policies
set policy from untrust to trust “Dial-Up VPN” “trust_net” any tunnel vpn VPN_dial
tun1
set policy from trust to untrust trust_net “Dial-Up VPN” any tunnel vpn VPN_dial
l2tp tun1
save
2. Click Add a new connection, and type dialup-j next to the new connection
icon that appears.
4. Click the PLUS symbol, located to the left of the dialup-j icon, to expand the
connection policy.
Select the certificate with the email address specified as the user’s IKE ID on
the security device from the Select Certificate drop-down list
NOTE: The email address from the certificate appears in the identifier field automatically.
7. Click the PLUS symbol, located to the left of the Security Policy icon, and then
the PLUS symbol to the left of Authentication (Phase 1) and Key Exchange
(Phase 2) to expand the policy further.
NOTE: When Perfect Forwarding Secrecy (PFS) is enabled on the security device (DF
Group 1,2 or 5), it must also be enabled for the VPN client in NetScreen-Remote.
9. Click Key Exchange (Phase 2) > Proposal 1: Select the following IPSec
Protocols:
10. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
11. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
12. Click Key Exchange (Phase 2) > Create New Proposal: Select the following
IPSec Protocols:
You also need to set up the network connection for your Windows 2000 operating
system using the Network Connection Wizard.
NOTE: When you configure the Network Connection Wizard, you must enter a
destination hostname or IP address. Enter 1.1.1.1. Later, when you initiate a
connection and are prompted for a username and password, enter dialup-j,
abc123. For more information, consult your Microsoft Windows 2000
documentation.
This chapter covers the following uses of virtual private network (VPN) technology:
241
Concepts & Examples ScreenOS Reference Guide
NAT-Traversal
Network Address Translation (NAT) and Network Address Port Translation (NAPT)
are Internet standards that allow a local-area network (LAN) to use one set of IP
addresses for internal traffic and a second set of addresses for external traffic. NAT
devices generate these external addresses from predetermined pools of IP
addresses.
When setting up an IPSec tunnel, the presence of a NAT device along the data path
has no effect on Phase 1 and Phase 2 IKE negotiations, which always encapsulate
IKE packets within User Datagram Protocol (UDP) segments. However, after the
Phase 2 negotiations complete, performing NAT on the IPSec packets causes the
tunnel to fail. Of the many reasons why NAT causes disruption to IPSec, one reason
is that, for the Encapsulating Security Protocol (ESP), NAT devices cannot discern
the location of the Layer 4 header for port translation (because it is encrypted). For
the Authentication Header (AH) protocol, NAT devices can modify the port number,
but the authentication check, which includes the entire IPSec packet, fails.
To solve these problems, security devices and the NetScreen-Remote client (version
6.0 or later) can apply a NAT-Traversal (NAT-T) feature. NAT-T adds a layer of UDP
encapsulation to IPSec packets after detecting one or more NAT devices along the
data path during Phase 1 exchanges, as prescribed in the IETF drafts
draft-ietf-ipsec-nat-t-ike-00.txt and draft-ietf-ipsec-udp-encaps-00.txt, as well as in
later versions of these drafts.
NAT devices can create another problem if they are also IKE/IPSec-aware and
attempt to process packets with the IKE port number of 500 or the IPSec protocol
numbers 50 (for ESP) and 51 (for AH). To avoid such intermediary processing of IKE
packets, version 2 of the previously mentioned IETF drafts proposes the shifting (or
“floating”) of UDP port numbers for IKE from 500 to 4500. To avoid intermediary
processing of IPSec packets, both drafts 0 and 2 insert a UDP header between the
outer IP header and the ESP or AH header, thereby changing the value in the
242 NAT-Traversal
Chapter 7: Advanced Virtual Private Network Features
NOTE: ScreenOS does not support NAT-T for Manual Key tunnels nor for IPSec traffic
using AH. ScreenOS only supports NAT-T for AutoKey IKE tunnels using ESP.
Both peers must send and receive at least one of these values in the vendor payload
ID for the NAT-T probe to continue. If they send hashes for both drafts, ScreenOS
uses the NAT-T implementation for draft 2.
If the devices at each endpoint support NAT-T, they send each other NAT discovery
(NAT-D) payloads in the third and fourth Phase 1 exchanges (Main mode) or in the
second and third exchanges (Aggressive mode). The NAT discovery (NAT-D) payload
is a IKE payload type for NAT-T. The NAT-D payload type number is 0130. For a list
of other IKE payload types, see “IKE Packets” on page 12.
NAT-Traversal 243
Concepts & Examples ScreenOS Reference Guide
NOTE: NAT-T supports multiple source NAT-D hashes for devices with multiple interfaces
and implementations that do not specify an outgoing interface.
When each peer compares the hashes it receives with the ones it sends, it can tell if
address translation has occurred between them. Distinguishing which packet has
been modified also indicates the location of the NAT device:
If Matches Then
the local peer’s destination at least one of the remote no address translation has
hash peer’s source hashes occurred.
at least one of the local peer’s the remote peer’s destination no address translation has
source hashes hash occurred.
Knowing the location of the NAT device is important because IKE keepalives must
initiate from the peer behind the NAT device. See “Keepalive Packets” on page 247.
If both peers support IETF draft 2, then they also float the IKE port number from
500 to 4500 as soon as they detect a NAT device between themselves during Phase
1 negotiations. In Main mode, the port numbers float to 4500 in the fifth and sixth
exchanges of Phase 1, and then for all Phase 2 exchanges. In Aggressive mode, the
port number floats to 4500 in the third—and final—exchange of Phase 1, and then
for all Phase 2 exchanges. The peers also use 4500 for the UDP port number for all
subsequent IPSec traffic.
244 NAT-Traversal
Chapter 7: Advanced Virtual Private Network Features
NAT device
Security device
Internet
VPN Tunnel
VPN Dialup Client
Encapsulating the IPSec packets within UDP packets—which both the VPN client
and the security device do—solves the problem of the authentication check failure.
The NAT device processes them as UDP packets, changing the source port in the
UDP header and leaving the SPI in the AH or ESP header unmodified. The VPN
participants strip off the UDP layer and process the IPSec packets, which pass the
authentication check because none of the authenticated content has been changed.
As mentioned, NAT-T (v2) adds a non-ESP marker between the header and payload
of the UDP segment encapsulating the ISAKMP packet. The non-ESP marker is 4
bytes of zero (0000), and is added to the UDP segment to distinguish an
encapsulated ISAKMP packet from an encapsulated ESP packet, which does not
have such a marker. Without the non-ESP marker, the recipient would be unsure if
the encapsulated packet was an ISAKMP packet or an ESP packet because the UDP
header uses 4500 for both types. Using this marker indicates the correct type of
packet that is encapsulated so that the recipient can correctly demultiplex it.
As shown in Figure 64 on page 246, after detecting a NAT device in the data path,
the source and destination port numbers in the UDP header of an IKE packet
change from 500 to 4500. Also, the VPN tunnel endpoints insert a non-ESP marker
between the UDP header and payload to distinguish the encapsulated ISAKMP
packet from an ESP packet. The recipient can use this marker to distinguish the
encapsulated ISAKMP packet from an ESP packet and demultiplex it correctly.
NAT-Traversal 245
Concepts & Examples ScreenOS Reference Guide
UDP Segment
Source Port (500 for IKE) Destination Port (500 for IKE)
Length Checksum
Payload
Source Port (4500 for IKE) Destination Port (4500 for IKE)
Length Checksum
Payload
Figure 65 shows how, after detecting a NAT device in the data path, the VPN tunnel
endpoints insert an additional UDP header between the outer IP header and the
ESP header of an IPSec packet. Because there is no non-ESP marker, the recipient
can distinguish the encapsulated ESP packet from an ISAKMP packet and
demultiplex the ESP packet correctly.
Figure 65: IPSec ESP Packet Before and After NAT Detection
IPSec ESP Packet before detecting a NAT device
IPSec Packet
Original Packet
Sent by IKE Gateway Sent by Initiating Host
IP2 ESP IP1 TCP
Payload
Header Header Header Header
UDP Header
Source Port (4500 for IKE) Destination Port (4500 for IKE)
Length Checksum
Payload
246 NAT-Traversal
Chapter 7: Advanced Virtual Private Network Features
UDP Checksum
All UDP packets contain a UDP checksum, a calculated value that ensures UDP
packets are free of transmission errors. A security device does not require use of the
UDP checksum for NAT-T, so the WebUI and CLI present the checksum as an
optional setting. Even so, some NAT devices require a checksum, so you might have
to enable or disable this setting. By default, the UDP checksum is included when
you enable NAT-T.
WebUI
VPNs > AutoKey Advanced > Gateway > New:
Enter the necessary parameters for the new tunnel gateway as described in
“Site-to-Site Virtual Private Networks” on page 89 or “Dialup Virtual Private
Networks” on page 169; enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
CLI
set ike gateway name nat-traversal udp-checksum
unset ike gateway name nat-traversal udp-checksum
Keepalive Packets
When a NAT device assigns an IP address to a host, the NAT device determines how
long the new address remains valid when no traffic occurs. For example, a NAT
device might invalidate any generated IP address that remains unused for 20
seconds. Therefore, it is usually necessary for the IPSec participants to send
periodic keepalive packets—empty UDP packets—through the NAT device, so that
the NAT mapping does not change until the Phase 1 and Phase 2 SAs expire.
NOTE: NAT devices have different session timeout intervals, depending on the
manufacturer and model. It is important to determine what the interval is for the
NAT device and to set the keepalive frequency value below that.
Initiator/Responder Symmetry
When two security devices establish a tunnel in the absence of a NAT device, either
device can serve as initiator or responder. However, if either host resides behind a
NAT device, such initiator/responder symmetry might be impossible. This happens
whenever the NAT device generates IP addresses dynamically.
NAT-Traversal 247
Concepts & Examples ScreenOS Reference Guide
Figure 66: Security Device with a Dynamically Assigned IP Address Behind a NAT Device
Note: Security zones depicted are from the
perspective of Device B. Untrust Zone Trust Zone
NAT
device
Device A Internet Device B
Host A Host B
Tunnel 10.1.1.5
1.2.1.1 1.1.1.250
In Figure 66, Device B resides in a subnet located behind a NAT device. If the NAT
device generates new source IP addresses for packets it receives from
Device B—drawing them dynamically from a pool of IP addresses—Device A
cannot unambiguously identify Device B. Therefore, Device A cannot successfully
initiate a tunnel with Device B. Device A must be the responder, Device B the
initiator, and they must perform Phase 1 negotiations in Aggressive mode.
However, if the NAT device generates the new IP address using a mapped IP (MIP)
address, or some other one-to-one addressing method, Device A can
unambiguously identify Device B. Consequently, either Device A or Device B can be
the initiator, and both can use Main mode or Aggressive mode for Phase 1.
Device B, which is not behind the NAT device, configures this new IP address as the
IKE gateway address. At this time, the local ID or ID (peer ID) needs to be set.
NOTE: If you enable NAT-T on a security device acting as the responder and configure it to
perform IKE negotiations in Main mode, that device and all its peers of the
following types that are configured on the same outgoing interface must use the
same Phase 1 proposals presented in the same order as each other:
Because it is not possible to know the identity of a peer when negotiating Phase 1
in Main mode until the last two messages, the Phase 1 proposals must all be the
same so that IKE negotiations can proceed.
The security device automatically checks that all Phase 1 proposals are the same
and in the same order when you configure IKE in Main mode to one of the above
peer types on the same outgoing interface. If the proposals are different, the
security device generates an error message.
248 NAT-Traversal
Chapter 7: Advanced Virtual Private Network Features
In the example shown in Figure 67, two devices, Device A and Device B, are
connected by a VPN tunnel. Device A is behind a NAT and has a private IP
31.0.0.14. The NAT generates a new public IP using MIP for Device A. You use the
MIP address as the gateway address while configuring IKEv2 gateway on Device B.
For more information about MIPs, see “Mapped IP Addresses” on page 8-63.
Figure 67: Security Device with a Mapped IP Address Behind a NAT Device
NAT device
31.0.0.14 VPN tunnel 33.0.0.15
Internet
Device A Device B
MIP 31.0.0.14 to 33.0.0.14
Device A Configuration
set ike gateway ikev2 "dev-b" address 33.0.0.15 id "dev-b.net" local-id "dev-a.net"
outgoing-interface "ethernet0/1" preshare
"KghBa3TbNruG2Es6e2C5zkr83SnLzIy1MQ==" proposal "pre-g2-3des-md5"
set ike gateway ikev2 "dev-b" nat-traversal
set ike gateway ikev2 "dev-b" nat-traversal udp-checksum
set ike gateway ikev2 "dev-b" nat-traversal keepalive-frequency 5
set vpn "dev-b" gateway "dev-b" no-replay tunnel idletime 0 proposal
"g2-esp-3des-md5"
set vpn "dev-b" id 0x1 bind interface tunnel.1
Device B Configuration
set ike gateway ikev2 "dev-a" address 33.0.0.14 id "dev-a.net" local-id "dev-b.net"
outgoing-interface "ethernet2/3" preshare
"5LXhnzFYNz8EO6srN9CgzDdrpKnEep28Uw==" proposal "pre-g2-3des-md5"
set ike gateway ikev2 "dev-a" nat-traversal
set ike gateway ikev2 "dev-a" nat-traversal udp-checksum
set ike gateway ikev2 "dev-a" nat-traversal keepalive-frequency 5
set vpn "dev-a" gateway "dev-a" no-replay tunnel idletime 0 proposal
"g2-esp-3des-md5"
set vpn "dev-a" id 0x1 bind interface tunnel.1
Enabling NAT-Traversal
In Figure 68, a NAT device at the perimeter of a hotel LAN assigns an address to the
VPN dialup client used by Jozef, a salesman attending a convention. For Jozef to
reach the corporate LAN through a dialup VPN tunnel, you must enable NAT-T for
the remote gateway “jozef,” configured on the security device, and for the remote
gateway configured on the VPN dialup client. You also enable the security device to
include a UDP checksum in its transmissions, and you set the keepalive frequency
to 8 seconds.
NAT device
Security device
Internet
VPN tunnel
VPN dialup client
NAT-Traversal 249
Concepts & Examples ScreenOS Reference Guide
WebUI
VPNs > AutoKey Advanced > Gateway > New: Enter the necessary
parameters for the new tunnel gateway (described in “Site-to-Site Virtual
Private Networks ” on page 89 or “Dialup Virtual Private Networks ” on
page 169), enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
NOTE: When you configure a dialup VPN through the CLI, the security device
automatically enables NAT-Traversal.
CLI
set ike gateway jozef nat-traversal
set ike gateway jozef nat-traversal udp-checksum
set ike gateway jozef nat-traversal keepalive-frequency 8
save
Without NAT-T, a VPN tunnel can be activated using only the local ID on the local
side and only the peer ID on the remote side. But when using NAT-Traversal with
dynamic VPN in main mode using certificates, you must set both the local ID and
peer ID on both sides of the VPN tunnel. The following example shows how you can
configure local IDs and peer IDs on firewall1 and firewall2 so they can identify each
other and activate a tunnel between them.
WebUI
On firewall1, enter the following:
VPNs > AutoKey IKE Advanced> Gateway > New: Enter the following,then
click Advanced:
250 NAT-Traversal
Chapter 7: Advanced Virtual Private Network Features
Mode: Main
Security Level: Standard
VPNs > AutoKey IKE Advanced> Gateway > New: Enter the following, then
click Advanced:
Cli
On firewall1, enter the following:
set ike gateway test-gw address 0.0.0.0 id firewall2 main local-id firewall1
outgoing-interface ethernet0/0 proposal standard
set ike gateway gw_bap15_p1 address 1.1.1.1 id firewall1 main local-id firewall2
outgoing-interface ethernet0/0 proposal standard
The following table shows the CLI command for each of the IPsec NAT-T tasks:
NAT-Traversal 251
Concepts & Examples ScreenOS Reference Guide
VPN Monitoring
When you enable VPN monitoring for a specific tunnel, the security device sends
ICMP echo requests (or “pings”) through the tunnel at specified intervals
(configured in seconds) to monitor network connectivity through the tunnel.
NOTE: To change the ping interval, you can use the following CLI command: set
vpnmonitor interval number. The default is 10 seconds.
If the ping activity indicates that the VPN monitoring status has changed, the
security device triggers one of the following Simple Network Management Protocol
(SNMP) traps:
Up to Down: This trap occurs when the state of VPN monitoring for the tunnel
is up, but a specified consecutive number of ICMP echo requests does not elicit
a reply and there is no other incoming VPN traffic. Then the state changes to
down.
Down to Up: When the state of VPN monitoring for the tunnel is down, but the
ICMP echo request elicits a single response, then the state changes to up. The
down-to-up trap occurs only if you have disabled the rekey option and the
Phase 2 SA is still active when an ICMP echo request elicits a reply through the
tunnel.
NOTE: To change the threshold for the number of consecutive unsuccessful ICMP echo
requests, you can use the following CLI command: set vpnmonitor threshold
number. The default is 10 consecutive requests.
For more information about the SNMP data that VPN monitoring provides, see
“SNMP VPN Monitoring Objects and Traps” on page 263.
You apply VPN monitoring per VPN object, not necessarily per VPN tunnel. A VPN
object is what you define with the set vpn command or with its WebUI counterpart.
After you define one VPN object, you can then reference it in one or more policies
(creating policy-based VPNs). Because ScreenOS derives a policy-based VPN tunnel
from a VPN object plus the other policy parameters, a single VPN object can be an
element in numerous VPN tunnels. This distinction between VPN object and VPN
tunnel is important because Juniper Networks recommends that you apply VPN
monitoring to no more than 100 IPSec VPN tunnels—if you do not enable
optimization. If you do enable optimization, then there is no limitation to the
number of VPN tunnels to which you can apply VPN monitoring. To learn about the
optimization option, see “Rekey and Optimization Options” on page 253.
NOTE: VPN monitoring optimization operates on a per-object basis. You can enable it on
all VPN objects, on none, or only on some.
NOTE: If a security device is a DHCP client, a DHCP update to a different address causes
IKE to rekey. However, a DHCP update to the same address does not provoke the
IKE rekey operation.
You can use the rekey option to ensure that an AutoKey IKE tunnel is always up,
perhaps to monitor devices at the remote site or to allow dynamic routing protocols
to learn routes at a remote site and transmit messages through the tunnel. Another
use to which you can apply VPN monitoring with the rekey option is for automatic
population of the next-hop tunnel binding table (NHTB table) and the route table
when multiple VPN tunnels are bound to a single tunnel interface. For an example
of this last use, see “Multiple Tunnels per Tunnel Interface” on page 265.
If you disable the rekey option, the security device performs VPN monitoring only
when the tunnel is active with user-generated traffic.
By default, VPN monitoring optimization is disabled. If you enable it (set vpn name
monitor optimized), the VPN monitoring behavior changes as follows:
The security device considers incoming traffic through the VPN tunnel to be the
equivalent of ICMP echo replies. Accepting incoming traffic as a substitute for
ICMP echo replies can reduce false alarms that might occur when traffic
through the tunnel is heavy and the echo replies do not get through.
If there is both incoming and outgoing traffic through the VPN tunnel, the
security device suppresses VPN monitoring pings altogether. Doing so can help
reduce network traffic.
Although VPN monitoring optimization offers some benefits, be aware that VPN
monitoring can no longer provide accurate SNMP statistics, such as VPN network
delay time, when the optimization option is active. Also, if you are using VPN
monitoring to track the availability of a particular destination IP address at the
remote end of a tunnel, the optimization feature can produce misleading results.
Because VPN monitoring operates independently at the local and remote sites, the
source address configured on the device at one end of a tunnel does not have to be
the destination address configured on the device at the other end. In fact, you can
enable VPN monitoring at both ends of a tunnel or at only one end.
NOTE: If the other end of a tunnel is the NetScreen-Remote VPN client that receives its
address through XAuth, then the security device, by default, uses the
XAuth-assigned IP address as the destination for VPN monitoring. For information
about XAuth, see “XAuth Users and User Groups” on page 9-70.
Policy Considerations
You must create a policy on the sending device to permit pings from the zone
containing the source interface to pass through the VPN tunnel to the zone
containing the destination address if:
The source interface is in the same zone as the destination address, and
intrazone blocking is enabled
Likewise, you must create a policy on the receiving device to permit pings from the
zone containing the source address to pass through the VPN tunnel to the zone
containing the destination address if:
The destination address is in the same zone as the source address, and
intrazone blocking is enabled
NOTE: If the receiving device is a third-party product that does not respond to the ICMP
echo requests, change the destination to an internal host in the remote peer’s LAN
that does respond. The remote peer’s firewall must have a policy permitting the
ICMP echo requests to pass through it.
WebUI
VPNs > AutoKey IKE > New: Configure the VPN, click Advanced, enter the
following, click Return to go back to the basic VPN configuration page, then
click OK:
Rekey: Select this option if you want the security device to attempt IKE
Phase 2 negotiations—and IKE Phase 1 negotiations if necessary—if the
tunnel status changes from up to down. When you select this option, the
security device attempts IKE negotiations to set up the tunnel and begin
VPN monitoring immediately after you finish configuring the tunnel.
Clear this option if you do not want the security device to attempt IKE
negotiations if the tunnel status changes from up to down. When the
rekey option is disabled, VPN monitoring begins after user-generated
traffic has triggered IKE negotiations and stops when the tunnel status
changes from up to down.
(Or)
VPNs > Manual Key > New: Configure the VPN, click Advanced, enter the
following, click Return to go back to the basic VPN configuration page, then
click OK:
CLI
set vpnmonitor frequency number
set vpnmonitor threshold number
set vpn name_str monitor [ source-interface interface [ destination-ip ip_addr ]
[optimized] [ rekey ]
save
NOTE: The VPN monitoring frequency is in seconds. The default setting is 10-second
intervals.
If you do not choose a source interface, the security device uses the outgoing
interface as the default.
If you do not choose a destination IP address, the security device uses the IP
address for the remote gateway.
The rekey option is not available for Manual Key VPN tunnels.
In this example, you configure an AutoKey IKE VPN tunnel between two security
devices (Device A and Device B). On Device A, you set up VPN monitoring from its
Trust zone interface (ethernet1) to the Trust zone interface (10.2.1.1/24) on
Device B. On the Device B, you set up VPN monitoring from its Trust zone interface
(ethernet1) to a corporate intranet server (10.1.1.5) behind Device A.
Device A Device B
Zones and Interfaces
ethernet1 ethernet1
Zone: Trust Zone: Trust
IP address: 10.1.1.1/24 IP address: 10.2.1.1/24
Interface mode: NAT Interface mode: NAT
ethernet3 ethernet3
Zone: Untrust Zone: Untrust
IP address: 1.1.1.1/24 IP address: 2.2.2.2/24
Device A Device B
Routes
To 0.0.0.0/0, use ethernet3, gateway To 0.0.0.0/0, use ethernet3, gateway 2.2.2.250
1.1.1.250 To 10.1.1.0/24, use tunnel.1, no gateway
To 10.2.1.0/24, use tunnel.1, no gateway (Null route–to drop traffic to 10.1.1.0/24 if
(Null route–to drop traffic to 10.2.1.0/24 if tunnel.1 goes down) To 10.1.1.0/24, use null
tunnel.1 goes down) To 10.2.1.0/24, use null interface, metric: 10
interface, metric: 10
Because both devices ping from an interface in their Trust zone to an address in
their Untrust zone, the admins at both ends of the VPN tunnel must define policies
permitting pings to pass from zone to zone.
NOTE: Because both VPN terminators are security devices in this example, you can use
the default source and destination addresses for VPN monitoring. The use of other
options is included purely to illustrate how you can configure a security device to
use them.
WebUI (Device A)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > Tunnel IF New: Enter the following, then click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Source Address:
Address Book Entry: (select), Trust_LAN
Destination Address:
Address Book Entry: (select), Remote_LAN
Service: ANY
Action: Permit
Position at Top: (select)
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Remote_LAN
Destination Address:
Address Book Entry: (select), Trust_LAN
Service: Any
Action: Permit
Position at Top: (select)
WebUI (Device B)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > Tunnel IF New: Enter the following, then click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
3. VPN
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
5. Policies
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Trust_LAN
Destination Address:
Address Book Entry: (select), Remote_LAN
Service: ANY
Action: Permit
Position at Top: (select)
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Remote_LAN
Destination Address:
Address Book Entry: (select), Trust_LAN
Service: Any
Action: Permit
Position at Top: (select)
CLI (Device A)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface tunnel.1 zone trust
set interface tunnel.1 ip unnumbered interface ethernet1
2. Addresses
set address trust Trust_LAN 10.1.1.0/24
set address untrust Remote_LAN 10.2.1.0/24
3. VPN
set ike gateway gw1 address 2.2.2.2 main outgoing-interface ethernet3 preshare
Ti82g4aX sec-level compatible
set vpn vpn1 gateway gw1 sec-level compatible
set vpn vpn1 bind interface tunnel.1
set vpn vpn1 proxy-id local-ip 10.1.1.0/24 remote-ip 10.2.1.0/24 any
set vpn vpn1 monitor source-interface ethernet1 destination-ip 10.2.1.1
4. Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
set vrouter trust-vr route 10.2.1.0/24 interface tunnel.1
set vrouter trust-vr route 10.2.1.0/24 interface null metric 10
5. Policies
set policy top from trust to untrust Trust_LAN Remote_LAN any permit
set policy top from untrust to trust Remote_LAN Trust_LAN any permit
save
CLI (Device B)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.2.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 2.2.2.2/24
set interface tunnel.1 zone trust
set interface tunnel.1 ip unnumbered interface ethernet1
2. Addresses
set address trust Trust_LAN 10.2.1.0/24
set address untrust Remote_LAN 10.1.1.0/24
3. VPN
set ike gateway gw1 address 1.1.1.1 main outgoing-interface ethernet3 preshare
Ti82g4aX sec-level compatible
set vpn vpn1 gateway gw1 sec-level compatible
set vpn vpn1 bind interface tunnel.1
set vpn vpn1 proxy-id local-ip 10.2.1.0/24 remote-ip 10.1.1.0/24 any
set vpn vpn1 monitor source-interface ethernet1 destination-ip 10.1.1.5
4. Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 2.2.2.250
set vrouter trust-vr route 10.1.1.0/24 interface tunnel.1
set vrouter trust-vr route 10.1.1.0/24 interface null metric 10
5. Policies
set policy top from trust to untrust Trust_LAN Remote_LAN any permit
set policy top from untrust to trust Remote_LAN Trust_LAN any permit
save
NOTE: To enable your SNMP manager application to recognize the VPN monitoring MIBs,
you must import the ScreenOS-specific MIB extension files into the application.
You can find the MIB extension files on the documentation CD that shipped with
your security device.
By enabling the VPN monitoring feature on an AutoKey IKE or Manual Key VPN
tunnel, the security device activates its SNMP VPN monitoring objects, which
include data on the following:
The security device can sort VPN traffic sent through a single tunnel interface to as many VPN
tunnels as the route table or VPN tunnel capacity—whichever is lower—can support.
The maximum number of VPN tunnels is not limited by the number of tunnel
interfaces that you can create, but by either route table capacity or the maximum
number of dedicated VPN tunnels allowed—whichever is lower. For instance, if your
security device supports 4000 routes and 1000 dedicated VPN tunnels, you can
create 1000 VPN tunnels and bind them to a single tunnel interface. If your security
device supports 8192 routes and 10,000 dedicated VPN tunnels, then you can
create over 8000 VPN tunnels and bind them to a single tunnel interface. To see the
maximum route and tunnel capacities for your security device, refer to the relevant
product datasheet.
NOTE: If route-table capacity is the limiting factor, you must subtract the routes
automatically generated by security zone interfaces and any other static
routes—such as the route to the default gateway—that you might need to define
from the total available for route-based VPN tunnels.
Route-to-Tunnel Mapping
To sort traffic among multiple VPN tunnels bound to the same tunnel interface, the
security device maps the next-hop gateway IP address specified in the route to a
particular VPN tunnel name. The mapping of entries in the route table to entries in
the NHTB table is shown below. In Figure 71, the local security device routes traffic
sent from 10.2.1.5 to 10.1.1.5 through the tunnel.1 interface and then through
vpn2.
Figure 71: Route Table and Next-Hop Tunnel Binding (NHTB) Table
Local security device with Remote VPN peers—with dynamically assigned
multiple tunnels bound to external IP addresses and fixed tunnel interface
the tunnel.1 interface IP addresses—and their protected LANs
10.1.1.1
10.1.0.0/24
vpn1
10.2.1.5 tunnel.1 10.1.1.5
vpn2 10.1.2.1
10.1.1.0/24
10.2.0.0/16 vpn3
Trust Zone LAN 10.1.3.1
10.1.2.0/24
You can employ a dynamic routing protocol such as Border Gateway During Phase 2 negotiations, the two IKE peers exchange tunnel
Protocol (BGP) to populate the route table automatically, or you can interface addresses and automatically enter these next-hop-
manually enter these routes. The IP address for the gateway is the to-tunnel bindings. Optionally, you can manually enter these. The
address of the tunnel interface at the remote peer’s site. next-hop IP address is the remote peer’s tunnel interface IP
address.
In the above entries, the IP address for the gateway in the route table (which is also the next-hop IP address in the NHTB table) is the tunnel
interface at the remote peer’s site. This IP address links the route—and consequently the tunnel interface specified in the route—to a particular
VPN tunnel for traffic destined to the specified IP prefix.
The security device uses the IP address of the remote peer’s tunnel interface as the
gateway and next-hop IP address. You can enter the route manually, or you can
allow a dynamic routing protocol to enter a route referencing the peer’s tunnel
interface IP address as the gateway in the route table automatically. The same IP
address must also be entered as the next hop, along with the appropriate VPN
tunnel name, in the NHTB table. Again, there are two options: you can either enter
it manually, or you can allow the security device to obtain it from the remote peer
during Phase 2 negotiations and enter it automatically.
The security device uses the gateway IP address in the route table entry and the
next-hop IP address in the NHTB table entry as the common element to link the
tunnel interface with the corresponding VPN tunnel. The security device can then
direct traffic destined for the IP-prefix specified in the route with the correct VPN
tunnel specified in the NHTB table.
Gateway/Next-Hop
Dst in Local Local Tunnel (Peer’s Tunnel
Route Table Interface Interface) VPN Tunnel
10.0.3.0/24 tunnel.1 10.0.2.1/24 vpn1
10.0.5.0/24 tunnel.1 10.0.4.1/24 vpn2
10.0.7.0/24 tunnel.1 10.0.6.1/24 vpn3
… … … …
10.0.251.0/24 tunnel.1 10.0.250.1/24 vpn125
The tunnel interface on the local security device: is 10.0.0.1/24. On all remote
hosts, there is a tunnel interface with an IP address, which appears as the
gateway/next-hop IP address in the local route table and NHTB table.
For an example illustrating multiple tunnels bound to a single tunnel interface with
address translation, see “Setting VPNs on a Tunnel Interface to Overlapping
Subnets” on page 270.
Figure 72: Multiple Tunnels Bound to a Single Tunnel Interface with Address Translation
The local security device and all its 10.0.4.1/24
NAT-dst 10.0.5.1 -> 10.0.6.1/24
peers perform NAT-dst with IP shifting NAT-dst 10.0.7.1 ->
on inbound VPN traffic and NAT-src internal IP addresses
internal IP addresses
from the egress tunnel interface IP
IF 10.0.2.1/24
address with port translation on NAT-dst 10.0.3.1 -> vpn2
outbound VPN traffic. internal IP addresses vpn3
vpn1 10.1.1.1/24
NAT-dst 10.1.2.1 ->
IF 10.0.2.1/24 internal IP addresses
NAT-dst 10.0.3.1 -> vpn251
internal IP addresses
10.6.2.1/24
NAT-dst 10.6.3.1->
Local security device internal IP addresses
10.0.0.1/24 vpn751
NAT-dst 10.0.1.1 ->
internal IP addresses
vpn1000
10.7.250.1/24
NAT-dst 10.7.251.1 ->
internal IP addresses
After that, you can enter a static route in the route table that uses that tunnel
interface IP address as the gateway. You can enter the route either through the
WebUI or through the following CLI command:
The remote peers for all VPN tunnels bound to a single local tunnel interface
must be security devices running ScreenOS 5.0.0 or later.
Each remote peer must bind its tunnel to a tunnel interface, and that interface
must have an IP address unique among all peer tunnel interface addresses.
At both ends of each VPN tunnel, enable VPN monitoring with the rekey option,
or enable the IKE heartbeat reconnect option for each remote gateway.
The local and remote peers must have an instance of a dynamic routing
protocol enabled on their connecting tunnel interfaces.
The use of VPN monitoring with the rekey option allows the security devices at both
ends of a tunnel to set up the tunnel without having to wait for user-originated VPN
traffic. After you enable VPN monitoring with the rekey option at both ends of a
VPN tunnel, the two security devices perform Phase 1 and Phase 2 IKE negotiations
to establish the tunnel. (For more information, see “VPN Monitoring” on page 252.)
NOTE: If you are running a dynamic routing protocol on the tunnel interfaces, traffic
generated by the protocol can trigger IKE negotiations even without enabling VPN
monitoring with the rekey option or enabling the IKE heartbeat reconnect option.
Still, we recommend that you not rely on dynamic routing traffic to trigger IKE
negotiations. Instead use VPN monitoring with the rekey option or the IKE
heartbeat reconnect option.
For Open Shortest Path First (OSPF), you must configure the tunnel interface on
the local peer as a point-to-multipoint interface before you enable the routing
protocol on the interface.
For remote peers with a dynamically assigned external IP address or with a fully
qualified domain name (FQDN) mapped to a dynamic IP address, the remote peer
must first initiate IKE negotiations. However, because the Phase 2 SA on the local
security device caches the remote peer’s dynamically assigned IP address, either
peer can reinitiate IKE negotiations to reestablish a tunnel whose VPN monitoring
state has changed from up to down.
1. Create a BGP routing instance on the virtual router that contains the tunnel
interface to which you have bound multiple VPN tunnels.
3. Enable the routing instance on the tunnel interface leading to the BPG peers.
On the local (or hub) device, you must also define a default route and a static route
to each peer’s tunnel interface IP address. Static routes to the peers’ tunnel
interfaces are necessary for the hub device to reach its BGP neighbors initially
through the correct VPN tunnel.
The VPN tunnel configurations at both ends of each tunnel use the following
parameters:
AutoKey IKE
All security zones and interfaces on each device are in the trust-vr virtual routing
domain for that device.
This example uses the same address space—10.1.1.0/24—for every LAN to show
how you can use Source Network Address Translation (NAT-src) and Destination
Network Address Translation (NAT-dst) to overcome addressing conflicts among
IPSec peers. For more information about NAT-src and NAT-dst, see Volume 8: Address
Translation.
WebUI (Device A)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Network > Interfaces > Edit (for tunnel.1) > DIP > New: Enter the following,
then click OK:
ID: 5
IP Address Range: (select), 10.0.0.2 ~ 10.0.0.2
Port Translation: (select)
In the same subnet as the interface IP or its secondary IPs: (select)
2. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Interface: tunnel.1
Gateway IP Address: 10.0.4.1
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Network > Interfaces > Edit (for tunnel.1) > NHTB > New: Enter the
following, then click Add:
Network > Interfaces > Edit (for tunnel.1) > NHTB: Enter the following, then
click Add:
Network > Interfaces > Edit (for tunnel.1) > NHTB: Enter the following, then
click Add:
Source Address:
Address Book: (select), corp
Destination Address:
Address Book: (select), peers
Service: Any
Action: Permit
Position at Top: (select)
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Policy configuration page:
NAT:
Source Translation: (select)
DIP On: 5 (10.0.0.2–10.0.0.2)/X-late
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), peers
Destination Address:
Address Book Entry: (select), oda1
Service: Any
Action: Permit
Position at Top: (select)
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Policy configuration page:
NAT:
Destination Translation: (select)
Translate to IP Range: (select), 10.1.1.0 - 10.1.1.254
CLI (Device A)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface tunnel.1 zone untrust
set interface tunnel.1 ip 10.0.0.1/30
set interface tunnel.1 dip 5 10.0.0.2 10.0.0.2
2. Addresses
set address trust corp 10.1.1.0/24
set address trust oda1 10.0.1.0/24
set address untrust peers 10.0.0.0/16
3. VPNs
set ike gateway peer1 address 2.2.2.2 outgoing-interface ethernet3 preshare
netscreen1 sec-level compatible
set vpn vpn1 gateway peer1 sec-level compatible
set vpn vpn1 bind interface tunnel.1
set vpn vpn1 proxy-id local-ip 0.0.0.0/0 remote-ip 0.0.0.0/0 any
set ike gateway peer2 address 3.3.3.3 outgoing-interface ethernet3 preshare
netscreen2 sec-level compatible
set vpn vpn2 gateway peer2 sec-level compatible
set vpn vpn2 bind interface tunnel.1
set vpn vpn2 proxy-id local-ip 0.0.0.0/0 remote-ip 0.0.0.0/0 any
set ike gateway peer3 address 4.4.4.4 outgoing-interface ethernet3 preshare
netscreen3 sec-level compatible
set vpn vpn3 gateway peer3 sec-level compatible
set vpn vpn3 bind interface tunnel.1
ethernet3 tunnel.10
2.2.2.2/24 10.0.2.1/30 NAT-dst Range NAT-dst from
external router DIP Pool 6 10.0.2.2 - 10.0.3.0 – 10.0.3.255 10.0.3.0 – 10.0.3.255
2.2.2.250 10.0.2.2 to
ethernet1 10.1.1.0 – 10.1.1.255
10.1.1.1/24 with address shifting
Untrust Zone
Peer1
Trust Zone
vpn1 from
Device A
LAN
10.1.1.0/24
NOTE: For more information about NAT-src and NAT-dst, see Volume 8: Address
Translation.
WebUI (Peer1)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Network > Interfaces > Edit (for tunnel.10) > DIP > New: Enter the
following, then click OK:
ID: 6
IP Address Range: (select), 10.0.2.2 ~ 10.0.2.2
Port Translation: (select)
In the same subnet as the interface IP or its secondary IPs: (select)
2. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Source Address:
Address Book Entry: (select), fr_corp
Destination Address:
Address Book Entry: (select), oda2
Service: Any
Action: Permit
Position at Top: (select)
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Policy configuration page:
NAT:
Destination Translation: (select)
Translate to IP Range: (select), 10.1.1.0 - 10.1.1.254
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), lan
Destination Address:
Address Book Entry: (select), to_corp
Service: Any
Action: Permit
Position at Top: (select)
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Policy configuration page:
NAT:
Source Translation: (select)
DIP On: 6 (10.0.2.2–10.0.2.2)/X-late
CLI (Peer1)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 2.2.2.2/24
set interface tunnel.10 zone untrust
set interface tunnel.10 ip 10.0.2.1/30
set interface tunnel.10 dip 6 10.0.2.2 10.0.2.2
2. Addresses
set address trust lan 10.1.1.0/24
set address trust oda2 10.0.3.0/24
set address untrust to_corp 10.0.1.0/24
set address untrust fr_corp 10.0.0.2/32
3. VPN
set ike gateway corp address 1.1.1.1 outgoing-interface ethernet3 preshare
netscreen1 sec-level compatible
set vpn vpn1 gateway corp sec-level compatible
set vpn vpn1 bind interface tunnel.10
set vpn vpn1 proxy-id local-ip 0.0.0.0/0 remote-ip 0.0.0.0/0 any
4. Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 2.2.2.250
metric 1
set vrouter trust-vr route 10.0.3.0/24 interface ethernet1 metric 1
set vrouter trust-vr route 10.0.0.0/8 interface tunnel.10 metric 10
set vrouter trust-vr route 10.0.0.0/8 interface null metric 12
5. Policies
set policy from trust to untrust lan to_corp any nat src dip-id 6 permit
set policy from untrust to trust fr_corp oda2 any nat dst ip 10.1.1.0 10.1.1.254
permit
save
Peer2
The following configuration, as illustrated in Figure 75, is what the remote admin
for the security device at the peer2 site must enter to create a VPN tunnel to
Device A at the corporate site. The remote admin configures the security device to
perform source and destination NAT (NAT-src and NAT-dst) because the internal
addresses are in the same address space as those in the corporate LAN: 10.1.1.0/24.
Peer2 performs NAT-src using DIP pool 7 to translate all internal source addresses to
10.0.4.2 when sending traffic through VPN2 to Device A. Peer2 performs NAT-dst
on VPN traffic sent from Device A, translating addresses from 10.0.5.0/24 to
10.1.1.0/24 with address shifting in effect.
ethernet3 tunnel.20
10.0.4.1/30 NAT-dst Range NAT-dst from
3.3.3.3/24 10.0.5.0 – 10.0.5.255
external router DIP Pool 7 10.0.4.2 - 10.0.5.0 – 10.0.5.255
3.3.3.250 10.0.4.2 ethernet1 to
10.1.1.1/24 10.1.1.0 – 10.1.1.255
with address shifting
Untrust Zone
Peer2
vpn2 Trust Zone
from
Device A
LAN
10.1.1.0/24
NOTE: For more information about NAT-src and NAT-dst, see Volume 8: Address
Translation.
WebUI (Peer2)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Network > Interfaces > Edit (for tunnel.20) > DIP > New: Enter the
following, then click OK:
ID: 7
IP Address Range: (select), 10.0.4.2 ~ 10.0.4.2
Port Translation: (select)
In the same subnet as the interface IP or its secondary IPs: (select)
2. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Source Address:
Address Book Entry: (select), lan
Destination Address:
Address Book Entry: (select), to_corp
Service: Any
Action: Permit
Position at Top: (select)
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Policy configuration page:
NAT:
Source Translation: (select)
DIP On: 7 (10.0.4.2–10.0.4.2)/X-late
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), fr_corp
Destination Address:
Address Book Entry: (select), oda3
Service: Any
Action: Permit
Position at Top: (select)
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Policy configuration page:
NAT:
Destination Translation: (select)
Translate to IP Range: (select), 10.1.1.0 - 10.1.1.254
CLI (Peer2)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 3.3.3.3/24
set interface tunnel.20 zone untrust
set interface tunnel.20 ip 10.0.4.1/30
set interface tunnel.20 dip 7 10.0.4.2 10.0.4.2
2. Addresses
set address trust lan 10.1.1.0/24
set address trust oda3 10.0.5.0/24
set address untrust to_corp 10.0.1.0/24
set address untrust fr_corp 10.0.0.2/32
3. VPN
set ike gateway corp address 1.1.1.1 outgoing-interface ethernet3 preshare
netscreen2 sec-level compatible
set vpn vpn2 gateway corp sec-level compatible
set vpn vpn2 bind interface tunnel.20
set vpn vpn2 proxy-id local-ip 0.0.0.0/0 remote-ip 0.0.0.0/0 any
4. Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 3.3.3.250
metric 1
set vrouter trust-vr route 10.0.5.0/24 interface ethernet1 metric 1
set vrouter trust-vr route 10.0.0.0/8 interface tunnel.20 metric 10
set vrouter trust-vr route 10.0.0.0/8 interface null metric 12
5. Policies
set policy from trust to untrust lan to_corp any nat src dip-id 7 permit
set policy from untrust to trust fr_corp oda3 any nat dst ip 10.1.1.0 10.1.1.254
permit
save
Peer3
The following configuration, as illustrated in Figure 76, is what the remote admin
for the security device at the peer3 site must enter to create a VPN tunnel to
Device A at the corporate site. The remote admin configures the security device to
perform source and destination NAT (NAT-src and NAT-dst) because the internal
addresses are in the same address space as those in the corporate LAN: 10.1.1.0/24.
Peer3 performs NAT-src using DIP pool 8 to translate all internal source addresses to
10.0.6.2 when sending traffic through VPN3 to Device A. Peer3 performs NAT-dst
on VPN traffic sent from Device A, translating addresses from 10.0.7.0/24 to
10.1.1.0/24 with address shifting in effect.
ethernet3
4.4.4.4/24 tunnel.30 NAT-dst Range
external router 10.0.6.1/30 NAT-dst from
DIP Pool 8 10.0.7.0 – 10.0.7.255 10.0.7.0 – 10.0.7.255
4.4.4.250
vpn2 from 10.0.6.2 - 10.0.6.2 to
Device A Untrust Zone ethernet1 10.1.1.0 – 10.1.1.255
10.1.1.1/24 with address shifting
Peer3
Trust Zone
LAN
10.1.1.0/24
NOTE: For more information about NAT-dst, see Volume 8: Address Translation.
WebUI (Peer3)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Network > Interfaces > Edit (for tunnel.320) > DIP > New: Enter the
following, then click OK:
ID: 7
IP Address Range: (select), 10.0.6.2 ~ 10.0.6.2
Port Translation: (select)
In the same subnet as the interface IP or its secondary IPs: (select)
2. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Source Address:
Address Book Entry: (select), lan
Destination Address:
Address Book Entry: (select), to_corp
Service: Any
Action: Permit
Position at Top: (select)
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Policy configuration page:
NAT:
Source Translation: (select)
DIP On: 8 (10.0.6.2–10.0.6.2)/X-late
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), fr_corp
Destination Address:
Address Book Entry: (select), oda4
Service: Any
Action: Permit
Position at Top: (select)
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Policy configuration page:
NAT:
Destination Translation: (select)
Translate to IP Range: (select), 10.1.1.0 - 10.1.1.254
CLI (Peer3)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 4.4.4.4/24
set interface tunnel.30 zone untrust
set interface tunnel.30 ip 10.0.6.1/30
set interface tunnel.30 dip 8 10.0.6.2 10.0.6.2
2. Addresses
set address trust lan 10.1.1.0/24
set address trust oda4 10.0.7.0/24
set address untrust to_corp 10.0.1.0/24
set address untrust fr_corp 10.0.0.2/32
3. VPN
set ike gateway corp address 1.1.1.1 outgoing-interface ethernet3 preshare
netscreen3 sec-level compatible
set vpn vpn3 gateway corp sec-level compatible
set vpn vpn3 bind interface tunnel.30
set vpn vpn3 proxy-id local-ip 0.0.0.0/0 remote-ip 0.0.0.0/0 any
4. Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 3.3.3.250 metric
1
set vrouter trust-vr route 10.0.7.0/24 interface ethernet1 metric 1
set vrouter trust-vr route 10.0.0.0/8 interface tunnel.30 metric 10
set vrouter trust-vr route 10.0.0.0/8 interface null metric 12
5. Policies
set policy from trust to untrust lan to_corp any nat src dip-id 8 permit
set policy from untrust to trust fr_corp oda4 any nat dst ip 10.1.1.0 10.1.1.254
permit
save
NOTE: You can also use Open Shortest Path First (OSPF) instead of BGP as the routing
protocol in this example. See “Using OSPF for Automatic Route Table Entries” on
page 300 for the OSPF configurations.
Untrust Zone
peer1
vpn1
Device A
peer2
vpn2
Trust Zone tunnel.1 ethernet3
ethernet1 10.0.0.1/30 1.1.1.1/24
10.1.1.1/24 external router
1.1.1.250
vpn2
IKE gateway: peer2, 3.3.3.3
remote peer’s tunnel interface: 3.4.4.1
The VPN tunnel configurations at both ends of each tunnel use the following
parameters: AutoKey IKE, preshared key (peer1: “netscreen1”, peer2:
“netscreen2”), and the security level predefined as “Compatible” for both Phase 1
and Phase 2 proposals. (For details about these proposals, see “Tunnel Negotiation”
on page 8.)
By configuring the following two features, you can enable Device A to populate its
NHTB and route tables automatically:
VPN monitoring with the rekey option (or the IKE heartbeats reconnect option)
NOTE: If you are running a dynamic routing protocol on the tunnel interfaces, traffic
generated by the protocol can trigger IKE negotiations even without enabling VPN
monitoring with the rekey option or enabling the IKE heartbeat reconnect option.
Still, Juniper Networks recommends that you not rely on dynamic routing traffic to
trigger IKE negotiations. Instead use VPN monitoring with the rekey option or the
IKE heartbeat reconnect option.
If you are running BGP on the tunnel interfaces, the BGP-generated traffic can
trigger IKE negotiations even without enabling VPN monitoring with the rekey
option or enabling the IKE heartbeat reconnect option. Still, Juniper Networks
recommends that you not rely on BGP traffic to trigger IKE negotiations. Instead,
use VPN monitoring with the rekey option or the IKE heartbeat reconnect option.
When you enable VPN monitoring with the rekey option for an AutoKey IKE VPN
tunnel, Device A establishes a VPN connection with its remote peer as soon as you
and the admin at the remote site finish configuring the tunnel. The devices do not
wait for user-generated VPN traffic to perform IKE negotiations. During Phase 2
negotiations, the security devices exchange their tunnel interface IP address, so that
Device A can automatically make a VPN-to-next-hop mapping in its NHTB table.
The rekey option ensures that when the Phase 1 and Phase 2 key lifetimes expire,
the devices automatically negotiate the generation of new keys without the need for
human intervention. VPN monitoring with the rekey option enabled essentially
provides a means for keeping a VPN tunnel up continually, even when there is no
user-generated traffic. This is necessary so that the BGP dynamic routing instances
that you and the remote admins create and enable on the tunnel interfaces at both
ends of the tunnels can send routing information to Device A and automatically
populate its route table with the routes it needs to direct traffic through the VPN
tunnel before those routes are required for user-generated traffic. (The admins at
the peer sites still need to enter a single static route to the rest of the virtual private
network through the tunnel interface at each respective site.)
You enter a default route and static routes on Device A to reach its BGP neighbors
through the correct VPN tunnels. All security zones and interfaces on each device
are in the trust-vr virtual routing domain for that device.
WebUI (Device A)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
2. VPNs
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to return
to the basic AutoKey IKE configuration page:
NOTE: Leave the Source Interface and Destination IP options at their default settings. For
information about these options, see “VPN Monitoring” on page 252.
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
NOTE: Leave the Source Interface and Destination IP options at their default settings. For
information about these options, see “VPN Monitoring” on page 252.
3. Static Route
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
AS Number (required): 99
BGP Enabled: (select)
Network > Interfaces > Edit (for tunnel.1) > BGP: Select the Protocol BGP
check box, then click OK.
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Neighbors: Enter the following, then click Add:
AS Number: 99
Remote IP: 2.3.3.1
Outgoing Interface: tunnel.1
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Neighbors: Enter the following, then click Add:
AS Number: 99
Remote IP: 3.4.4.1
Outgoing Interface: tunnel.1
5. Policy
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book: (select), Any
Destination Address:
Address Book: (select), Any
Service: ANY
Action: Permit
CLI (Device A)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface tunnel.1 zone untrust
set interface tunnel.1 ip 10.0.0.1/30
2. VPNs
set ike gateway peer1 address 2.2.2.2 outgoing-interface ethernet3 preshare
netscreen1 sec-level compatible
set vpn vpn1 gateway peer1 sec-level compatible
set vpn vpn1 bind interface tunnel.1
set vpn vpn1 proxy-id local-ip 0.0.0.0/0 remote-ip 0.0.0.0/0 any
set vpn vpn1 monitor rekey
set ike gateway peer2 address 3.3.3.3 outgoing-interface ethernet3 preshare
netscreen2 sec-level compatible
set vpn vpn2 gateway peer2 sec-level compatible
set vpn vpn2 bind interface tunnel.1
set vpn vpn2 proxy-id local-ip 0.0.0.0/0 remote-ip 0.0.0.0/0 any
set vpn vpn2 monitor rekey
3. Static Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
set vrouter trust-vr route 2.3.3.1/32 interface tunnel.1 gateway 2.3.3.1
set vrouter trust-vr route 2.4.4.1/32 interface tunnel.1 gateway 2.4.4.1
4. Dynamic Routing
device-> set vrouter trust-vr protocol bgp 99
device-> set vrouter trust-vr protocol bgp enable
device-> set interface tunnel.1 protocol bgp
device-> set vrouter trust-vr
device(trust-vr)-> set protocol bgp
device(trust-vr/bgp)-> set neighbor 2.3.3.1 remote-as 99 outgoing interface
tunnel.1
device(trust-vr/bgp)-> set neighbor 2.3.3.1 enable
device(trust-vr/bgp)-> set neighbor 3.4.4.1 remote-as 99 outgoing interface
tunnel.1
device(trust-vr/bgp)-> set neighbor 3.4.4.1 enable
device(trust-vr/bgp)-> exit
device(trust-vr)-> exit
5. Policy
set policy from trust to untrust any any any permit
save
Peer1
The following configuration, as illustrated in Figure 78 on page 294, is what the
remote admin for the security device at the peer1 site must enter to create a VPN
tunnel to Device A at the corporate site. The remote admin configures the security
device to permit inbound traffic from the corporate site and to communicate
internal routes to its BGP neighbor through vpn1.
2.3.
Peer1
2.3.4.0/24
vpn2 from
Device A
2.3.
WebUI (Peer1)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
3. VPN
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
AS Number (required): 99
BGP Enabled: (select)
Network > Interfaces > Edit (for tunnel.10) > BGP: Select the Protocol BGP
check box, then click OK.
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Neighbors: Enter the following, then click Add:
AS Number: 99
Remote IP: 10.0.0.1
Outgoing Interface: tunnel.10
6. Policy
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), corp
Destination Address:
Address Book Entry: (select), Any
Service: ANY
Action: Permit
CLI (Peer1)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 2.3.4.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 2.2.2.2/24
set interface tunnel.10 zone untrust
set interface tunnel.10 ip 2.3.3.1/30
2. Address
set address untrust corp 10.1.1.0/24
3. VPN
set ike gateway corp address 1.1.1.1 outgoing-interface ethernet3 preshare
netscreen1 sec-level compatible
set vpn vpn1 gateway corp sec-level compatible
set vpn vpn1 bind interface tunnel.10
set vpn vpn1 proxy-id local-ip 0.0.0.0/0 remote-ip 0.0.0.0/0 any
4. Static Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 2.2.2.250
metric 1
set vrouter trust-vr route 10.1.1.0/24 interface tunnel.10 metric 1
5. Dynamic Routing
device-> set vrouter trust-vr protocol bgp 99
device-> set vrouter trust-vr protocol bgp enable
device-> set interface tunnel.10 protocol bgp
device-> set vrouter trust-vr
device(trust-vr)-> set protocol bgp
device(trust-vr/bgp)-> set neighbor 10.0.0.1 remote-as 99 outgoing interface
tunnel.10
device(trust-vr/bgp)-> set neighbor 10.0.0.1 enable
device(trust-vr/bgp)-> exit
device(trust-vr)-> exit
6. Policy
set policy from untrust to trust corp any any permit
save
Peer2
The following configuration, as illustrated in Figure 79, is what the remote admin
for the security device at the peer2 site must enter to create a VPN tunnel to
Device A at the corporate site. The remote admin configures the security device to
permit inbound traffic from the corporate site and communicate internal routes to
its BGP neighbor through vpn2.
vpn2 from
Device A 3.4.
Peer2
3.4.5.0/24
Untrust Zone
3.4.
WebUI (Peer2)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
3. VPN
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Network > Routing > Routing Entries > (trust-vr) New: Enter the following,
then click OK:
AS Number (required): 99
BGP Enabled: (select)
Network > Interfaces > Edit (for tunnel.20) > BGP: Select the Protocol BGP
check box, then click OK.
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Neighbors: Enter the following, then click Add:
AS Number: 99
Remote IP: 10.0.0.1
Outgoing Interface: tunnel.20
6. Policy
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), corp
Destination Address:
Address Book Entry: (select), Any
Service: ANY
Action: Permit
CLI (Peer2)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 3.4.5.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 3.3.3.3/24
set interface tunnel.20 zone untrust
set interface tunnel.20 ip 3.4.4.1/30
2. Address
set address untrust corp 10.1.1.0/24
3. VPN
set ike gateway corp address 1.1.1.1 outgoing-interface ethernet3 preshare
netscreen2 sec-level compatible
set vpn vpn1 gateway corp sec-level compatible
set vpn vpn1 bind interface tunnel.20
set vpn vpn1 proxy-id local-ip 0.0.0.0/0 remote-ip 0.0.0.0/0 any
4. Static Routes
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 3.3.3.250
metric 1
set vrouter trust-vr route 10.1.1.0/24 interface tunnel.20 metric 1
5. Dynamic Routing
device-> set vrouter trust-vr protocol bgp 99
device-> set vrouter trust-vr protocol bgp enable
device-> set interface tunnel.20 protocol bgp
device-> set vrouter trust-vr
device(trust-vr)-> set protocol bgp
device(trust-vr/bgp)-> set neighbor 10.0.0.1 remote-as 99 outgoing interface
tunnel.20
device(trust-vr/bgp)-> set neighbor 10.0.0.1 enable
device(trust-vr/bgp)-> exit
device(trust-vr)-> exit
6. Policy
set policy from untrust to trust corp any any permit
save
WebUI (Device A)
Dynamic Routing (OSPF)
Network > Routing > Virtual Routers > Edit (for trust-vr) > Create OSPF
Instance: Select OSPF Enabled, then click Apply.
Area > Configure (for area 0.0.0.0): Click << Add to move the tunnel.1
interface from the Available Interface(s) list to the Selected Interface(s) list,
then click OK.
Network > Interfaces > Edit (for tunnel.1) > OSPF: Enter the following, then
click Apply:
Bind to Area: (select), Select 0.0.0.0 from the drop down list
Protocol OSPF: Enable
Link Type: Point-to-Multipoint (select)
CLI (Device A)
Dynamic Routing (OSPF)
device-> set vrouter trust-vr protocol ospf
device-> set vrouter trust-vr protocol ospf enable
device-> set interface tunnel.1 protocol ospf area 0
device-> set interface tunnel.1 protocol ospf link-type p2mp
device-> set interface tunnel.1 protocol ospf enable
device-> save
WebUI (Peer1)
Dynamic Routing (OSPF)
Network > Routing > Virtual Routers > Edit (for trust-vr) > Create OSPF
Instance: Select OSPF Enabled, then click Apply.
Area > Configure (for area 0.0.0.0): Click << Add to move the tunnel.1
interface from the Available Interface(s) list to the Selected Interface(s) list,
then click OK.
Network > Interfaces > Edit (for tunnel.1) > OSPF: Enter the following, then
click Apply:
Bind to Area: (select), Select 0.0.0.0 from the drop down list
Protocol OSPF: Enable
CLI (Peer1)
Dynamic Routing (OSPF)
device-> set vrouter trust-vr protocol ospf
device-> set vrouter trust-vr protocol ospf enable
device-> set interface tunnel.1 protocol ospf area 0
device-> set interface tunnel.1 protocol ospf enable
device-> save
WebUI (Peer2)
Dynamic Routing (OSPF)
Network > Routing > Virtual Routers > Edit (for trust-vr) > Create OSPF
Instance: Select OSPF Enabled, then click Apply.
Area > Configure (for area 0.0.0.0): Click << Add to move the tunnel.1
interface from the Available Interface(s) list to the Selected Interface(s) list,
then click OK.
Network > Interfaces > Edit (for tunnel.1) > OSPF: Enter the following, then
click Apply:
Bind to Area: (select), Select 0.0.0.0 from the drop down list
Protocol OSPF: Enable
CLI (Peer2)
Dynamic Routing (OSPF)
device-> set vrouter trust-vr protocol ospf
device-> set vrouter trust-vr protocol ospf enable
device-> set interface tunnel.1 protocol ospf area 0
device-> set interface tunnel.1 protocol ospf enable
device-> save
NOTE: VPN groups do not support L2TP, L2TP-over-IPSec, dialup, Manual Key, or
route-based VPN tunnel types. In a Site-to-Site Dynamic Peer arrangement, the
security device monitoring the VPN group must be the one whose untrust IP
address is dynamically assigned, while the untrust IP addresses of the VPN group
members must be static.
This scheme assumes that the sites behind the redundant gateways are connected
so that data is mirrored among hosts at all sites. Furthermore, each site—being
dedicated to high availability (HA)—has a redundant cluster of security devices
operating in HA mode. Therefore, the VPN failover threshold must be set higher
than the device failover threshold or VPN failovers might occur unnecessarily.
VPN Groups
A VPN group is a set of VPN tunnel configurations for up to four targeted remote
gateways. The Phase 1 and Phase 2 security association (SA) parameters for each
tunnel in a group can be different or identical (except for the IP address of the
remote gateway, which obviously must be different). The VPN group, shown in
Figure 81 on page 303, has a unique ID number, and each member in the group is
assigned a unique weight to indicate its place in rank of preference to be the active
tunnel. A value of 1 indicates the lowest, or least-preferred, ranking.
T 4
A
R 3
Monitor
G
E 2
The security device communicating with VPN group members and the members
themselves have a monitor-to-target relationship. The monitoring device continually
monitors the connectivity and wellbeing of each targeted device. The tools that the
monitor uses to do this are as follows:
IKE heartbeats
NOTE: The monitor-to-target relationship need not be one way. The monitoring device
might also be a member of a VPN group and thus be the target of another
monitoring device.
Monitoring Mechanisms
Two mechanisms monitor members of a VPN group to determine their ability to
terminate VPN traffic:
IKE heartbeats
Using these two tools, plus the TCP application failover option (see “TCP SYN-Flag
Checking” on page 307), security devices can detect when a VPN failover is
required and shift traffic to the new tunnel without disrupting VPN service.
IKE Heartbeats
IKE heartbeats are hello messages that IKE peers send to each other under the
protection of an established Phase 1 security association (SA) to confirm the
connectivity and wellbeing of the other. If, for example, device_m (the “monitor”)
does not receive a specified number of heartbeats (the default is 5) from device_t
(the “target”), device_m concludes that device_t is down. Device_m clears the
corresponding Phase 1 and Phase 2 security associations (SAs) from its SA cache
and begins the IKE recovery procedure. (See “IKE Recovery Procedure” on
page 305.) Device_t also clears its SAs.
NOTE: The IKE heartbeats feature must be enabled on the devices at both ends of a VPN
tunnel in a VPN group. If it is enabled on device_m but not on device_t, device_m
suppresses IKE heartbeat transmission and generates the following message in the
event log: “Heartbeats have been disabled because the peer is not sending them.”
IKE heartbeats must flow both ways through the VPN tunnel.
To define the IKE heartbeat interval and threshold for a specified VPN tunnel (the
default is 5), do the following:
WebUI
VPNs > AutoKey Advanced > Gateway > Edit (for the gateway whose IKE
heartbeat threshold you want to modify) > Advanced: Enter the new
values in the Heartbeat Hello and Heartbeat Threshold fields, then click OK.
CLI
set ike gateway name_str heartbeat hello number
set ike gateway name_str heartbeat threshold number
You can use DPD as an alternative to the IKE heartbeat feature (described above).
However, you cannot use both features simultaneously. In addition, IKE heartbeat
can be a global setting, which affects all IKE gateways configured in the device. The
IKE heartbeat setting can also apply to an individual IKE gateway context, which
affects an individual gateway only. By contrast, you can configure DPD only in an
individual IKE gateway context, not as a global parameter.
When the device deems a peer device to be dead, the device removes the Phase 1
SA and all Phase 2 SAs for the peer.
You can configure the following DPD parameters, either through the CLI or the
WebUI:
The interval parameter specifies the DPD interval. This interval is the amount
of time (expressed in seconds) the device allows to pass before considering a
peer to be dead.
The retry parameter specifies the maximum number of times to send the
R-U-THERE request before considering the peer to be dead. As with an IKE
heartbeat configuration, the default number of transmissions is 5 times, with a
permissible range of 1-128 retries. A setting of zero disables DPD.
In the following example you create a gateway that uses a DPD interval of five
seconds.
WebUI
VPNs > AutoKey Advanced > Gateway > Edit: Create a gateway by entering
the following values, then clicking OK.
VPNs > AutoKey Advanced > Gateway > Edit (our_gateway): Enter the
following values, then click OK.
CLI
set ike gateway "our_gateway" address 1.1.1.1 main outgoing-interface "untrust"
preshare "jun9345" sec-level standard
set ike gateway "our_gateway" dpd interval 5
Interval:
5 minutes
(300 seconds) Unsuccessful Attempt
.
.. .. ..
. .
Unsuccessful Attempt
.. . ..
. ..
.
Successful Attempt
To define the IKE recovery interval for a specified VPN tunnel (the minimum setting
is 60 seconds), do either of the following:
WebUI
VPNs > AutoKey Advanced > Gateway > Edit (for the gateway whose IKE
reconnect interval you want to modify) > Advanced: Enter the value in
seconds in the Heartbeat Reconnect field, then click OK.
CLI
set ike gateway name_str heartbeat reconnect number
When a VPN group member with the highest weight fails over the tunnel to another
group member and then reconnects with the monitoring device, the tunnel
automatically fails back to the first member. The weighting system always causes
the best ranking gateway in the group to handle the VPN data whenever it can do
so.
Figure 84 on page 307 presents the process that a member of a VPN group
undergoes when the missing heartbeats from a targeted gateway surpass the failure
threshold.
Monitor fails over the VPN (if target was handling VPN data), clears the P1 and
P2 SAs, and attempts to reestablish the VPN tunnel at specified intervals.
To resolve this, you can disable SYN-flag checking for TCP sessions in VPN tunnels,
as follows:
WebUI
You cannot disable SYN-flag checking through the WebUI.
CLI
unset flow tcp-syn-check-in-tunnel
The device location and name, the physical interfaces and their IP addresses for the
Trust and Untrust zones, and the VPN group ID and weight for each security device
are as follows:
Physical Interface
Device and IP Address Physical Interface, IP Address, VPN Group
Device Location Name (Trust Zone) Default Gateway (Untrust Zone) ID and Weight
Corporate Monitor1 ethernet1, 10.10.1.1/24 ethernet3, 1.1.1.1/24, (GW) 1.1.1.2 ––
Data Center (Primary) Target1 ethernet1, 10.1.1.1/16 ethernet3, 2.2.2.1/24, (GW) 2.2.2.2 ID = 1, Weight = 2
Data Center (Backup) Target2 ethernet1, 10.1.1.1/16 ethernet3, 3.3.3.1/24, (GW) 3.3.3.2 ID = 1, Weight =1
NOTE: The internal address space at both data center sites must be identical.
All security zones are in the trust-vr routing domain. All the Site-to-Site AutoKey IKE
tunnels use the security level predefined as “Compatible” for both Phase 1 and
Phase 2 proposals. Preshared keys authenticate the participants.
WebUI (Monitor1)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
5. Policies
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), in_trust
Destination Address:
Address Book Entry: (select), data_ctr
Service: ANY
Action: Tunnel
VPN: VPN Group-1
Modify matching bidirectional VPN policy: (select)
Position at Top: (select)
WebUI (Target1)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
3. VPN
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
Name: to_monitor1
Security Level: Compatible
Remote Gateway: Predefined: (select), monitor1
4. Route
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Source Address:
Address Book Entry: (select), in_trust
Destination Address:
Address Book Entry: (select), corp
Service: ANY
Action: Tunnel
Tunnel VPN: monitor1
Modify matching bidirectional VPN policy: (select)
Position at Top: (select)
WebUI (Target2)
NOTE: Follow the Target1 configuration steps to configure Target2, but define the Untrust
zone interface IP address as 3.3.3.1/24, the default gateway IP address as 3.3.3.2,
and use CMFwb7oN23 to generate the preshared key.
CLI (Monitor1)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.10.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Addresses
set address trust in_trust 10.10.1.0/24
set address untrust data_ctr 10.1.0.0/16
3. VPNs
set ike gateway target1 address 2.2.2.1 main outgoing-interface ethernet3
preshare SLi1yoo129 sec-level compatible
set ike gateway target1 heartbeat hello 3
set ike gateway target1 heartbeat reconnect 60
set ike gateway target1 heartbeat threshold 5
set vpn to_target1 gateway target1 sec-level compatible
set ike gateway target2 address 3.3.3.1 main outgoing-interface ethernet3
preshare CMFwb7oN23 sec-level compatible
set ike gateway target2 heartbeat hello 3
set ike gateway target2 heartbeat reconnect 60
set ike gateway target2 heartbeat threshold 5
set vpn to_target2 gateway target2 sec-level compatible
set vpn-group id 1 vpn to_target1 weight 2
set vpn-group id 1 vpn to_target2 weight 1
unset flow tcp-syn-check-in-tunnel
4. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.2
5. Policies
set policy top from trust to untrust in_trust data_ctr any tunnel “vpn-group 1”
set policy top from untrust to trust data_ctr in_trust any tunnel “vpn-group 1”
save
CLI (Target1)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/16
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 2.2.2.1/24
2. Addresses
set address trust in_trust 10.1.0.0/16
set address untrust corp 10.10.1.0/24
3. VPN
set ike gateway monitor1 address 1.1.1.1 main outgoing-interface ethernet3
preshare SLi1yoo129 sec-level compatible
set ike gateway monitor1 heartbeat hello 3
set ike gateway monitor1 heartbeat threshold 5
set vpn to_monitor1 gateway monitor1 sec-level compatible
4. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 2.2.2.2
5. Policies
set policy top from trust to untrust in_trust corp any tunnel vpn to_monitor
set policy top from untrust to trust corp in_trust any tunnel vpn to_monitor
save
CLI (Target2)
NOTE: Follow the Target1 configuration steps to configure Target2, but define the Untrust
zone interface IP address as 3.3.3.1/24, the default gateway IP address as 3.3.3.2,
and use CMFwb7oN23 to generate the preshared key.
NOTE: Optionally, you can enable intrazone blocking and define an intrazone policy to
control traffic between the two tunnel interfaces within the same zone.
X1
Zone X2
Zone
Spoke A Spoke B
VPN1 VPN2
Policy
Lookup
Hub
You can conserve the number of VPNs you need to create. For example,
perimeter site A can link to the hub and to perimeter sites B, C, D…, but A only
has to set up one VPN tunnel. Especially for NetScreen-5XP users, who can use
a maximum of ten VPN tunnels concurrently, applying the hub-and-spoke
method dramatically increases their VPN options and capabilities.
The administrator (admin) at the hub device can completely control VPN traffic
between perimeter sites. For example,
The admin might permit only HTTP traffic to flow from sites A to B, but
allow any kind of traffic to flow from B to A.
The admin can allow traffic originating from A to reach C, but deny traffic
originating from C to reach A.
The admin can allow a specific host at A to reach the entire D network,
while allowing only a specific host at D to reach a different host at A.
The administrator at the hub device can completely control outbound traffic
from all perimeter networks. At each perimeter site, there must first be a policy
that tunnels all outbound traffic through the spoke VPNs to the hub; for
example: set policy top from trust to untrust any any any tunnel vpn
name_str (where name_str defines the specific VPN tunnel from each perimeter
site to the hub). At the hub, the administrator can control Internet access,
allowing certain kinds of traffic (such as HTTP only), performing URL blocking
on undesirable websites, and so on.
Regional hubs can be used and interconnected through spoke tunnels, allowing
spoke sites in one region to reach spoke sites in another.
The Tokyo LAN address is in the user-defined X1 zone, and the Paris LAN address is
in the user-defined X2 zone. Both zones are in the Trust-VR routing domain.
NOTE: To create user-defined zones, you might first need to obtain and load a zone
software key on the security device.
You bind the VPN1 tunnel to the tunnel.1 interface and the VPN2 tunnel to the
tunnel.2 interface. Although you do not assign IP addresses to the X1 and X2 zone
interfaces, you do give addresses to both tunnel interfaces. Routes for these
interfaces automatically appear in the Trust-VR routing table. By putting the IP
address for a tunnel interface in the same subnet as that of the destination, traffic
destined for that subnet is routed to the tunnel interface.
The outgoing interface is ethernet3, which is bound to the Untrust zone. As you can
see in Figure 87, both tunnels terminate in the Untrust zone; however, the
endpoints for the traffic that makes use of the tunnels are in the X1 and X2 zones.
The tunnels use AutoKey IKE, with preshared keys. You select the security level
predefined as “Compatible” for both Phase 1 and Phase 2 proposals. You bind the
Untrust zone to the untrust-vr. Because the tunnels are route-based (that is, the
correct tunnel is determined by routing, not by a tunnel name specified in a policy),
proxy IDs are included in the configuration of each tunnel.
Figure 87: Back-to-Back VPNs with Two Routing Domains and Multiple Security Zones
Default Tokyo (Spoke)
Gateway 110.1.1.1
IP 123.1.1.2 Paris (Spoke)
New York 220.2.2.2
Outgoing Interface
Untrust Zone Untrust-VR
ethernet3, IP 123.1.1.1/24 VPN1 Routing Domain
Trust-VR Interface:
Routing Domain VPN2
tunnel.1
10.10.1.2/24
New York
Corporate Site Tokyo LAN
(Hub) X1 Zone
10.10.1.0/24
WebUI
1. Security Zones and Virtual Routers
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
IP Address/Netmask: 0.0.0.0/0
Manage IP: 0.0.0.0
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Zones > Edit (for Untrust): Enter the following, then click OK:
Network > Zones > New: Enter the following, then click OK:
Zone Name: X1
Virtual Router Name: trust-vr
Block Intra-Zone Traffic: (select)
Network > Zones > New: Enter the following, then click OK:
Name: X2
Virtual Router Name: trust-vr
Block Intra-Zone Traffic: (select)
2. Interfaces
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Proxy-ID: (select)
Local IP / Netmask: 10.20.1.0/24
Remote IP / Netmask: 10.10.1.0/24
Service: ANY
NOTE: When configuring the VPN tunnel on the security device protecting the Tokyo and
Paris offices, do either of the following:
(Route-based VPN) Select the Enable Proxy-ID check box, and enter 10.10.1.0/24
(Tokyo) and 10.20.1.0/24 (Paris) for the Local IP and Netmask and 10.20.1.0/24
(Tokyo) and 10.10.1.0/24 (Paris) for the Remote IP and Netmask.
(Policy-based VPN) Make an entry in the Trust zone address book for 10.10.1.0/24
(Tokyo) and 10.20.1.0/24 (Paris) and another in the Untrust zone address book for
10.20.1.0/24 (Tokyo) and 10.10.1.0/24 (Paris). Use those as the source and
destination addresses in the policy referencing the VPN tunnel to the hub site.
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Proxy-ID: (select)
Local IP / Netmask: 10.10.1.0/24
Remote IP / Netmask: 10.20.1.0/24
Service: ANY
5. Routes
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > untrust-vr New: Enter the following,
then click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
7. Policies
Policy > (From: X1, To: X2) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Tokyo LAN
Destination Address:
Address Book Entry: (select), Paris LAN
Service: ANY
Action: Permit
Position at Top: (select)
Policy > (From: X2, To: X1) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Paris LAN
Destination Address:
Address Book Entry: (select), Tokyo LAN
Service: ANY
Action: Permit
Position at Top: (select)
CLI
1. Security Zones and Virtual Routers
unset interface ethernet3 ip
unset interface ethernet3 zone
set zone untrust vrouter untrust-vr
set zone untrust block
set zone name X1
set zone x1 vrouter trust-vr
set zone x1 block
set zone name x2
set zone x2 vrouter trust-vr
set zone x2 block
2. Interfaces
set interface ethernet3 zone untrust
set interface ethernet3 ip 123.1.1.1/24
set interface tunnel.1 zone x1
set interface tunnel.1 ip 10.10.1.2/24
set interface tunnel.2 zone x2
set interface tunnel.2 ip 10.20.1.2/24
3. VPN for Tokyo Office
set ike gateway Tokyo address 110.1.1.1 outgoing-interface ethernet3 preshare
netscreen1 sec-level compatible
set vpn VPN1 gateway Tokyo sec-level compatible
set vpn VPN1 bind interface tunnel.1
set vpn VPN1 proxy-id local-ip 10.20.1.0/24 remote-ip 10.10.1.0/24 any
NOTE: When configuring the VPN tunnel on the security device protecting the Tokyo and
Paris offices, do either of the following:
(Route-based VPN) Enter the following commands: set vpn VPN1 proxy-id
local-ip 10.20.1.0/24 remote-ip 10.10.1.0/24 (Tokyo) and set vpn VPN1 proxy-id
local-ip 10.10.1.0/24 remote-ip 10.20.1.0/24 (Paris).
(Policy-based VPN) Make an entry in the Trust zone address book for 10.10.1.0/24
(Tokyo) and 10.20.1.0/24 (Paris) and another in the Untrust zone address book for
10.20.1.0/24 (Tokyo) and 10.10.1.0/24 (Paris). Use those as the source and
destination addresses in the policies referencing the VPN tunnel to the hub site.
NOTE: You can ignore the following message, which appears because tunnel interfaces
are in NAT mode:
Warning: Some interfaces in the zone_name zone are in NAT mode. Traffic might
not pass through them!
You can also configure multiple VPNs in one zone and route traffic between any two
tunnels.
Untrust Zone
In this example, two branch offices in Tokyo and Paris communicate with each
other through a pair of VPN tunnels—VPN1 and VPN2. Each tunnel originates at the
remote site and terminates at the corporate site in New York. The security device at
the corporate site routes traffic exiting one tunnel into the other tunnel.
By disabling intrazone blocking, the security device at the corporate site only needs
to do a route lookup—not a policy lookup—when conducting traffic from tunnel to
tunnel because both remote endpoints are in the same zone (the Untrust Zone).
NOTE: Optionally, you can leave intrazone blocking enabled and define an intrazone
policy permitting traffic between the two tunnel interfaces.
You bind the tunnels to the tunnel interfaces—tunnel.1 and tunnel.2—which are
both unnumbered. The tunnels use AutoKey IKE, with the preshared keys. You
select the security level predefined as “Compatible” for both Phase 1 and Phase 2
proposals. You bind the Untrust zone to the untrust-vr. The Untrust zone interface is
ethernet3.
NOTE: The following configuration is for route-based VPNs. If you configure policy-based
hub-and-spoke VPNs, you must use the Trust and Untrust zones in the policies;
you cannot use user-defined security zones.
Outgoing Default
Gateway Tokyo 2.2.2.2
Interface (Spoke)
ethernet3 IP 1.1.1.250
IP 1.1.1.1 Tokyo LAN
Internet 10.2.2.0/24
VPN1
Paris 3.3.3.3
VPN2 (Spoke)
New York – Corporate Site Interface: Paris LAN
(Hub) tunnel.1 10.3.3.0/24
Interface:
tunnel.2
IP Address/Netmask: 0.0.0.0/0
Manage IP: 0.0.0.0
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Zones > Edit (for Untrust): Enter the following, then click OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Proxy-ID: (select)
Local IP / Netmask: 0.0.0.0/0
Remote IP / Netmask: 0.0.0.0/0
Service: ANY
4. VPN for Paris Office
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Proxy-ID: (select)
Local IP / Netmask: 0.0.0.0/0
Remote IP / Netmask: 0.0.0.0/0
Service: ANY
5. Routes
Network > Routing > Routing Entries > untrust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > untrust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > untrust-vr New: Enter the following,
then click OK:
WebUI (Tokyo)
1. Security Zones and Virtual Routers
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
IP Address/Netmask: 0.0.0.0/0
Manage IP: 0.0.0.0
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Zones > Edit (for Untrust): Enter the following, then click OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
3. Address
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Proxy-ID: (select)
Local IP / Netmask: 0.0.0.0/0
Remote IP / Netmask: 0.0.0.0/0
Service: ANY
5. Routes
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > untrust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > untrust-vr New: Enter the following,
then click OK:
6. Policies
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Paris
Service: ANY
Action: Permit
WebUI (Paris)
1. Security Zones and Virtual Routers
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
IP Address/Netmask: 0.0.0.0/0
Manage IP: 0.0.0.0
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Zones > Edit (for Untrust): Enter the following, then click OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
3. Address
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Proxy-ID: (select)
Local IP / Netmask: 0.0.0.0/0
Remote IP / Netmask: 0.0.0.0/0
Service: ANY
5. Routes
Network > Routing > Routing Entries > trust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > untrust-vr New: Enter the following,
then click OK:
Network > Routing > Routing Entries > untrust-vr New: Enter the following,
then click OK:
6. Policies
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Tokyo
Service: ANY
Action: Permit
CLI (Tokyo)
1. Security Zones and Virtual Routers
unset interface ethernet3 ip
unset interface ethernet3 zone
set zone untrust vrouter untrust-vr
2. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.2.2.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 2.2.2.2/24
set interface tunnel.1 zone untrust
set interface tunnel.1 ip unnumbered interface ethernet3
3. Address
set address untrust Paris 10.3.3.0/24
4. VPN
set ike gateway “New York” address 1.1.1.1 outgoing-interface ethernet3 preshare
netscreen1 sec-level compatible
set vpn VPN1 gateway “New York” sec-level compatible
set vpn VPN1 bind interface tunnel.1
set vpn VPN1 proxy-id local-ip 0.0.0.0/0 remote-ip 0.0.0.0/0 any
5. Routes
set vrouter trust-vr route 0.0.0.0/0 vrouter untrust-vr
set vrouter untrust-vr route 0.0.0.0/0 interface ethernet3 gateway 2.2.2.250
set vrouter untrust-vr route 10.3.3.0/24 interface tunnel.1
6. Policies
set policy from trust to untrust any Paris any permit
set policy from untrust to trust Paris any any permit
save
CLI (Paris)
1. Security Zones and Virtual Routers
unset interface ethernet3 ip
unset interface ethernet3 zone
set zone untrust vrouter untrust-vr
2. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.3.3.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 3.3.3.3/24
set interface tunnel.1 zone untrust
set interface tunnel.1 ip unnumbered interface ethernet3
3. Address
set address untrust Tokyo 10.2.2.0/24
4. VPN
set ike gateway “New York” address 1.1.1.1 outgoing-interface ethernet3 preshare
netscreen2 sec-level compatible
set vpn VPN2 gateway “New York” sec-level compatible
set vpn VPN2 bind interface tunnel.1
set vpn VPN2 proxy-id local-ip 0.0.0.0/0 remote-ip 0.0.0.0/0 an
5. Routes
set vrouter trust-vr route 0.0.0.0/0 vrouter untrust-vr
set vrouter untrust-vr route 0.0.0.0/0 interface ethernet3 gateway 3.3.3.250
set vrouter untrust-vr route 10.2.2.0/24 interface tunnel.1
6. Policies
set policy from trust to untrust any Tokyo any permit
set policy from untrust to trust Tokyo any any permit
save
Overview
Small enterprise organizations that secure their remote satellite sites with virtual
private network (VPN) tunnels typically interconnect all sites in a full-mesh VPN,
because remote sites need to communicate with each other as well as with
headquarters. In this type of network, remote sites usually run low-end security
devices that support a maximum of 25 VPN tunnels. When the total number of sites
exceeds 25, however, the enterprise must either place security devices with greater
capacity at its remote sites (at considerable cost) or switch from full-mesh to a
hub-and-spoke network topology.
AC-VPN provides a way for you to configure your hub-and-spoke network so that
spokes can dynamically create VPN tunnels directly between each other as needed.
This not only solves the problem of latency between spokes but also reduces
processing overhead on the hub and thus improves overall network performance.
Additionally, because AC-VPN creates dynamic tunnels that time out when traffic
ceases to flow through them, network administrators are freed from the
time-consuming task of maintaining a complex network of static VPN tunnels.
How It Works
AC-VPN is designed to be implemented in a hub-and-spoke network in which all
spokes are connected to the hub by VPN tunnels. After you set up a static VPN
tunnel between the hub and each of the spokes, you configure AC-VPN on the hub
and the spokes and then enable the Next Hop Resolution Protocol (NHRP). The hub
uses NHRP to obtain a range of information about each spoke, including its
public-to-private address mappings, subnetmask length, and routing and hop count
information, which the hub caches. Then, when any spoke begins communicating
with another spoke (through the hub), the hub uses this information, in
Overview 331
Concepts & Examples ScreenOS Reference Guide
NHRP Messages
In the context of NHRP, the hub in a hub-and-spoke network is called the Next Hop
Server (NHS), and the spoke is called the Next Hop Client (NHC). NHRP
communication between NHS and NHC takes place though a formal exchange of
NHRP messages. The nonbroadcast multi access (NBMA) Next Hop Resolution
Protocol (RFC 2332) defines seven NHRP messages. To these seven messages,
ScreenOS adds two more. These nine messages and their operation in an AC-VPN
hub-and-spoke network are defined as follows:
NOTE: In the current ScreenOS implementation, NHRP does not redistribute any routes
to its peers, and BGP and OSPF do not redistribute NHRP routes to their peers.
1. S1 comes up
Registration Request
2.
(sends protected subnets, self-cert-hash, local ID)
Registration Reply
3.
S2 comes up 4.
(sends AC-VPN profile)
Registration Request
5.
(sends protected subnets, self-cert-hash, local ID)
Registration Reply
6.
(sends AC-VPN profile)
D1 behind S1 sends new traffic to D2 behind S2 Hub forwards traffic to S2
7.
Hub sends Resolution-set with details about S1
8.
S2 sends Resolution-ack
9.
Hub sends Resolution-set with details about S2
10.
S1 sends Resolution-ack
11.
Configuring AC-VPN
The following general restrictions apply:
All VPN tunnels configured toward the hub must be route based.
Port Address Translation (PAT) is supported only between one spoke and the
hub. For example, you can have a NAT device between one spoke and the hub
and a dynamic tunnel can be created between that spoke and another spoke as
long as there is no NAT device between that other spoke and the hub. In this
scenario, the hub will force the spoke behind the NAT device to initiate the
tunnel to the other spoke.
2. Create static tunnels to the spokes and bind the VPNs to the tunnels.
8. Configure routing.
2. Create a gateway.
9. Configure routing.
Example
In this example, a high-end security device acting as the hub in a hub and spoke
network is configured to act as the Next Hop Server (NHS) in an AC-VPN
configuration in which Spoke1 and Spoke2 (low-end security devices) are Next Hop
Clients (NHCs). After configuring interfaces on the devices, you configure static VPN
tunnels between the hub and each of the spokes, then configure AC-VPN and enable
NHRP on the connecting interfaces. Although this example uses the Open Shortest
Path First (OSPF) routing protocol, ScreenOS supports all dynamic routing protocols
with AC-VPN.
10.1.1.0/24
Hub
t.1--10.0.0.2 e2/1--1.1.1.1
Internet
10.1.2.0/24 10.1.3.0/24
WebUI (Hub)
NOTE: After you configure static gateways and static VPNs from the hub to the spokes
and from the spokes to the hub, you can use the AC-VPN wizard to complete the
AC-VPN configuration.
1. Interfaces
Network > Interfaces > Edit (for ethernet2/1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet2/2): Enter the following, then click
Apply:
Network > Interfaces > New (Tunnel IF): Enter the following, then click Apply:
VPNs > AutoKey Advanced > Gateway > New: Configure the IKE gateway,
click Advanced and set the security level, then click Return to go back to the
IKE gateway configuration page and click OK:
VPNs > AutoKey IKE > New: Configure the IKE gateway, click Advanced and
set the security level, then click Return to go back to the IKE gateway
configuration page and click OK:
VPNs > AutoKey IKE > New: Configure the ACVPN Profile, click Advanced and
set the security level and Replay Protection, then click Return to go back to the
VPN configuration page and click OK
IP Address/netmask: 0.0.0.0
Gateway (select)
Gateway IP Address: 1.1.1.2
CLI (Hub)
set interface ethernet2/1 zone Untrust
set interface ethernet2/2 zone Trust
set interface tunnel.1 zone Trust
set vpn spoke2 gateway spoke2 no-replay tunnel idletime 0 sec-level standard
set vpn spoke2 id 1 bind interface tunnel.1
set vpn spoke1 gateway spoke1 no-replay tunnel idletime 0 sec-level standard
set vpn spoke1 id 2 bind interface tunnel.1
WebUI (Spoke1)
1. Interfaces
Network > Interfaces > Edit (for ethernet0/0): Enter the following, then click
Apply:
Network > Interfaces > Edit (for bgroup0): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet2/2): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet2/2), Select Bind Port, enter the
following, then click Apply:
Network > Interfaces > New (Tunnel IF): Enter the following, then click Apply:
VPNs > AutoKey > New: Enter the following, then click OK:
IP Address/netmask: 0.0.0.0
Gateway (select)
Gateway IP Address: 2.2.2.2
CLI (Spoke1)
set interface ethernet0/0 zone Untrust
set interface bgroup0 zone Trust
set interface bgroup0 port ethernet0/2
set interface tunnel.1 zone Trust
WebUI (Spoke2)
1. Interfaces
Network > Interfaces > Edit (for ethernet0/0): Enter the following, then click
Apply:
Network > Interfaces > Edit (for bgroup0): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet2/2): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet2/2), Select Bind Port, enter the
following, then click Apply:
Network > Interfaces > New (Tunnel IF): Enter the following, then click Apply:
VPNs > AutoKey > New: Enter the following, then click OK:
IP Address/netmask: 0.0.0.0
Gateway (select)
Gateway IP Address: 3.3.3.3
CLI (Spoke2)
set interface ethernet0/0 zone Untrust
set interface bgroup0 zone Trust
set interface bgroup0 port ethernet0/2
set interface tunnel.1 zone Trust
Index IX-I
Concepts & Examples ScreenOS Reference Guide
H K
hash-based message authentication code .................... 6 keepalive
HMAC ................................................................................ 6 frequency, NAT-T ..................................................247
L2TP ........................................................................226
I keys
IKE............................................................... 7, 96, 105, 170 manual............................................................128, 134
group IKE ID user ....................................... 193 to 208 preshared ...............................................................170
group IKE ID, container ....................................... 196
group IKE ID, wildcards ....................................... 196 L
heartbeats .............................................................. 304 L2TP ...................................................................215 to 240
hello messages ...................................................... 304 access concentrator: See LAC
IKE ID ...............................................61 to 62, 67 to 68 bidirectional ...........................................................218
IKE ID recommendations ...................................... 80 compulsory configuration ....................................215
IKE ID, Windows 2000 ................................. 229, 237 decapsulation .........................................................219
local ID, ASN1-DN ................................................. 195 default parameters ................................................221
Phase 1 proposals, predefined ................................ 9 encapsulation.........................................................218
Phase 2 proposals, predefined .............................. 11 hello signal .....................................................226, 231
proxy IDs ................................................................. 11 Keep Alive ......................................................226, 231
redundant gateways .................................. 301 to 314 L2TP-only on Windows 2000 ..............................217
remote ID, ASN1-DN ............................................ 195 network server: See LNS
shared IKE ID user ..................................... 208 to 214 operational mode ..................................................218
IKEv2 RADIUS server .......................................................221
Diffie-Hellman ......................................................... 18 ScreenOS support .................................................217
EAP passthrough ..................................................... 25 SecurID server .......................................................221
enabling.................................................................... 17 tunnel......................................................................223
enabling on a security device ................................ 19 voluntary configuration ........................................215
messages .................................................................. 25 Windows 2000 tunnel authentication ........226, 231
SA .............................................................................. 17 L2TP-over-IPSec ...............................................4, 223, 228
informational exchanges .............................................. 19 bidirectional ...........................................................218
initial exchanges ............................................................ 17 tunnel......................................................................223
interfaces LAC ................................................................................215
extended ................................................................ 150 NetScreen-Remote 5.0..........................................215
null ............................................................................ 95 Windows 2000 ......................................................215
Internet Key Exchange Layer 2 Tunneling Protocol
See IKE See L2TP
Internet Key Exchange version 2 LNS ................................................................................215
See IKEv2 local certificate ...............................................................35
Internet Protocol (IP) addresses
See IP addresses M
IP addresses Main mode .......................................................................9
extended ................................................................ 150 Manual Key
IP Security management..............................................................7
See IPSec manual keys .........................................................128, 134
IPSec MD5...................................................................................6
AH ................................................................... 2, 63, 70 Message Digest version 5 (MD5)....................................6
digital signature ....................................................... 30 messages
ESP .................................................................. 2, 63, 70 EAP ...........................................................................25
L2TP-over-IPSec ........................................................ 4 IKEv2 ........................................................................25
SAs .................................................................... 2, 8, 11 MIB files, importing .....................................................263
SPI ............................................................................... 2 MIP, VPNs .....................................................................150
Transport mode ................................ 4, 218, 223, 228 modes
tunnel ......................................................................... 2 Aggressive ................................................................10
Tunnel mode ............................................................. 4 L2TP operational ...................................................218
tunnel negotiation ..................................................... 8 Main ............................................................................9
IX-II Index
Index
Index IX-III
Concepts & Examples ScreenOS Reference Guide
U X
UDP XAuth
checksum ............................................................... 247 VPN monitoring .....................................................254
NAT-T encapsulation ............................................ 242
users
group IKE ID ............................................... 193 to 208
shared IKE ID ............................................. 208 to 214
V
Verisign ........................................................................... 44
VPN monitoring ................................................ 252 to 263
destination address .................................... 254 to 256
destination address, XAuth .................................. 254
ICMP echo requests .............................................. 263
outgoing interface ...................................... 254 to 256
policies ................................................................... 255
rekey option .................................................. 253, 269
routing design.......................................................... 81
SNMP ...................................................................... 263
status changes ............................................... 252, 255
VPNs
Aggressive mode ..................................................... 10
AutoKey IKE .............................................................. 7
configuration tips ........................................... 79 to 81
cryptographic options.................................... 58 to 71
Diffie-Hellman exchange........................................ 10
FQDN aliases ......................................................... 140
FQDN for gateways ................................... 139 to 150
Main mode ................................................................. 9
MIP.......................................................................... 150
multiple tunnels per tunnel interface ...... 265 to 299
NAT for overlapping addresses ................ 150 to 161
NAT-dst................................................................... 150
NAT-src ................................................................... 152
packet flow ..................................................... 73 to 79
Phase 1 ....................................................................... 9
Phase 2 ..................................................................... 11
policies for bidirectional ....................................... 135
proxy IDs, matching ............................................... 79
redundant gateways .................................. 301 to 314
redundant groups, recovery procedure .............. 305
IX-IV Index
Concepts & Examples
ScreenOS Reference Guide
Volume 6:
Voice-over-Internet Protocol
Juniper Networks, the Juniper Networks logo, JUNOS, NetScreen, ScreenOS, and Steel-Belted Radius are registered trademarks of Juniper Networks, Inc.
in the United States and other countries. JUNOSe is a trademark of Juniper Networks, Inc. All other trademarks, service marks, registered trademarks, or
registered service marks are the property of their respective owners.
All specifications are subject to change without notice. Juniper Networks assumes no responsibility for any inaccuracies in this document or for any
obligation to update information in this document. Juniper Networks reserves the right to change, modify, transfer, or otherwise revise this publication
without notice.
FCC Statement
The following information is for FCC compliance of Class A devices: This equipment has been tested and found to comply with the limits for a Class A
digital device, pursuant to part 15 of the FCC rules. These limits are designed to provide reasonable protection against harmful interference when the
equipment is operated in a commercial environment. The equipment generates, uses, and can radiate radio-frequency energy and, if not installed and
used in accordance with the instruction manual, may cause harmful interference to radio communications. Operation of this equipment in a residential
area is likely to cause harmful interference, in which case users will be required to correct the interference at their own expense.
The following information is for FCC compliance of Class B devices: The equipment described in this manual generates and may radiate radio-frequency
energy. If it is not installed in accordance with Juniper Networks’ installation instructions, it may cause interference with radio and television reception.
This equipment has been tested and found to comply with the limits for a Class B digital device in accordance with the specifications in part 15 of the FCC
rules. These specifications are designed to provide reasonable protection against such interference in a residential installation. However, there is no
guarantee that interference will not occur in a particular installation.
If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user
is encouraged to try to correct the interference by one or more of the following measures:
Connect the equipment to an outlet on a circuit different from that to which the receiver is connected.
Caution: Changes or modifications to this product could void the user's warranty and authority to operate this device.
Disclaimer
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED
WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED
WARRANTY, CONTACT YOUR JUNIPER NETWORKS REPRESENTATIVE FOR A COPY.
ii
Table of Contents
About This Volume vii
Document Conventions................................................................................. viii
Web User Interface Conventions ........................................................... viii
Command Line Interface Conventions ................................................... viii
Naming Conventions and Character Types .............................................. ix
Illustration Conventions ............................................................................ x
Requesting Technical Support .......................................................................... x
Self-Help Online Tools and Resources....................................................... xi
Opening a Case with JTAC ........................................................................ xi
Document Feedback ....................................................................................... xi
SIP Body.................................................................................................. 30
SIP NAT Scenario..................................................................................... 30
Examples ....................................................................................................... 32
Incoming SIP Call Support Using the SIP Registrar................................... 33
Example: Incoming Call (Interface DIP)............................................. 34
Example: Incoming Call (DIP Pool)....................................................37
Example: Incoming Call with MIP ..................................................... 39
Example: Proxy in the Private Zone .................................................. 41
Example: Proxy in the Public Zone ................................................... 44
Example: Untrust Intrazone .............................................................. 49
Example: Trust Intrazone.................................................................. 53
Example: Full-Mesh VPN for SIP........................................................ 55
Bandwidth Management for VoIP Services .............................................. 64
iv Table of Contents
Table of Contents
Index..........................................................................................................................IX-I
Table of Contents v
Concepts & Examples ScreenOS Reference Guide
vi Table of Contents
About This Volume
vii
Concepts & Examples ScreenOS Reference Guide
Document Conventions
This document uses the conventions described in the following sections:
The following example shows the WebUI path and parameters for defining an
address:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
To open Online Help for configuration settings, click the question mark (?) in the
upper left of the screen.
The navigation tree also provides a Help > Config Guide configuration page to help
you configure security policies and Internet Protocol Security (IPSec). Select an
option from the list, and follow the instructions on the page. Click the ? character in
the upper left for Online Help on the Config Guide.
In text, commands are in boldface type and variables are in italic type.
In examples:
If there is more than one choice, each choice is separated by a pipe ( | ). For
example, the following command means “set the management options for the
ethernet1, the ethernet2, or the ethernet3 interface”:
NOTE: When entering a keyword, you only have to type enough letters to identify the
word uniquely. Typing set adm u whee j12fmt54 will enter the command set
admin user wheezer j12fmt54. However, all the commands documented in this
guide are presented in their entirety.
If a name string includes one or more spaces, the entire string must be
enclosed within double quotes; for example:
NOTE: A console connection only supports SBCS. The WebUI supports both SBCS and
MBCS, depending on the character sets that your browser supports.
Document Conventions ix
Concepts & Examples ScreenOS Reference Guide
Illustration Conventions
Figure 1 shows the basic set of images used in illustrations throughout this volume.
Tunnel Interface
Server
VPN Tunnel
Router
Juniper Networks
Switch Security Devices
Hub
Download the latest versions of software and review your release notes—
http://www.juniper.net/customers/csc/software/
To verify service entitlement by product serial number, use our Serial Number
Entitlement (SNE) Tool—
https://tools.juniper.net/SerialNumberEntitlementSearch/
Document Feedback
If you find any errors or omissions in this document, contact Juniper Networks at
[email protected].
Document Feedback xi
Concepts & Examples ScreenOS Reference Guide
This chapter describes the H.323 protocol and provides examples for configuring
the H.323 Application Layer Gateway (ALG) on a Juniper Networks security device.
This chapter contains the following sections:
“Overview” on page 1
Overview
The H.323 Application Layer Gateway (ALG) allows you secure voice over IP (VoIP)
communication between terminal endpoints such as IP phones and multimedia
devices. In such a telephony system, gatekeeper devices manage call registration,
admission, and call status for VoIP calls. Gatekeepers can reside in the two different
zones or in the same zone.
Gatekeeper Gatekeeper
Permit
NOTE: Illustrations in this chapter use IP phones for illustrative purposes, although it is
possible to make configurations for other hosts that use VoIP, such as NetMeeting
multimedia devices.
Overview 1
Concepts & Examples ScreenOS Reference Guide
Alternate Gatekeeper
The H.323 ALG in ScreenOS supports the use of an alternate gatekeeper. All the IP
end points must register with a gatekeeper through the Registration, Admission,
and Status (RAS) protocol before they can attempt calls between them. During the
registration process, the primary gatekeeper sends Gatekeeper Confirm (GCF) and
Registration Confirm (RCF) messages to the endpoint. These messages contain the
list of available alternate gatekeepers.
The alternate gatekeeper provides high availability, redundancy and scalability for
the IP end points. If the primary gatekeeper fails, IP-enabled phones and other
multimedia devices registered with that gatekeeper are registered with the alternate
gatekeeper.
You can configure the primary and alternate gatekeepers in the Trust, Untrust, or
DMZ zones.
NOTE: Currently, the Juniper Networks H.323 ALG supports the gatekeeper and the
alternate gatekeeper in the same zone.
To use the alternate gatekeeper feature, you need to configure a security policy that
allows the endpoint device to reach the alternate gatekeeper when the endpoint
cannot reach the primary gatekeeper.
Examples
This section contains the following configuration scenarios:
2 Alternate Gatekeeper
Chapter 1: H.323 Application Layer Gateway
Gatekeeper Internet
Endpoint Endpoint
IP Phones IP Phone
2.2.2.5
WebUI
1. Address
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), IP_Phone
Service: H.323
Action: Permit
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), IP_Phone
Destination Address:
Address Book Entry: (select), Any
Service: H.323
Action: Permit
CLI
1. Address
set address untrust IP_Phone 2.2.2.5/32
2. Policies
set policy from trust to untrust any IP_Phone h.323 permit
set policy from untrust to trust IP_Phone any h.323 permit
save
Examples 3
Concepts & Examples ScreenOS Reference Guide
In the following example, you set up two policies to allow H.323 traffic to pass
between IP phone hosts in the Trust zone, and the IP phone at IP address 2.2.2.5
(and the gatekeeper) in the Untrust zone. The device can be in Transparent or Route
mode. Both the Trust and Untrust security zones are in the trust-vr routing domain.
IP_Phone
IP_Phones 2.2.2.5/32
WebUI
1. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), IP_Phone
Service: H.323
Action: Permit
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), IP_Phone
Destination Address:
Address Book Entry: (select), Any
4 Examples
Chapter 1: H.323 Application Layer Gateway
Service: H.323
Action: Permit
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Gatekeeper
Service: H.323
Action: Permit
CLI
1. Addresses
set address untrust IP_Phone 2.2.2.5/32
set address untrust gatekeeper 2.2.2.10/32
2. Policies
set policy from trust to untrust any IP_Phone h.323 permit
set policy from trust to untrust any gatekeeper h.323 permit
set policy from untrust to trust IP_Phone any h.323 permit
set policy from untrust to trust gatekeeper any h.323 permit
save
In this example, the devices in the Trust zone include the endpoint host (10.1.1.5)
and the gatekeeper device (10.1.1.25). IP_Phone2 (2.2.2.5) is in the Untrust zone.
You configure the security device to allow traffic between the endpoint host
IP_Phone1 and the gatekeeper in the Trust zone and the endpoint host IP_Phone2
in the Untrust zone. Both the Trust and Untrust security zones are in the trust-vr
routing domain.
Gatekeeper Internet
10.1.1.25
IP_Phone1 MIP 1.1.1.25 -> 10.1.1.25 Gateway IP_Phone2
10.1.1.5 MIP 1.1.1.5 -> 10.1.1.5 1.1.1.250 2.2.2.5
Examples 5
Concepts & Examples ScreenOS Reference Guide
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
6 Examples
Chapter 1: H.323 Application Layer Gateway
Network > Interfaces > Edit (for ethernet3) > MIP > New: Enter the
following, then click OK:
Source Address:
Address Book Entry: (select), IP_Phone1
Destination Address:
Address Book Entry: (select), IP_Phone2
Service: H.323
Action: Permit
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Gatekeeper
Destination Address:
Address Book Entry: (select), IP_Phone2
Service: H.323
Action: Permit
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), IP_Phone2
Destination Address:
Address Book Entry: (select), MIP(1.1.1.5)
Service: H.323
Action: Permit
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), IP_Phone2
Destination Address:
Address Book Entry: (select), MIP(1.1.1.25)
Service: H.323
Action: Permit
Examples 7
Concepts & Examples ScreenOS Reference Guide
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Addresses
set address trust IP_Phone1 10.1.1.5/32
set address trust gatekeeper 10.1.1.25/32
set address untrust IP_Phone2 2.2.2.5/32
3. Mapped IP Addresses
set interface ethernet3 mip 1.1.1.5 host 10.1.1.5
set interface ethernet3 mip 1.1.1.25 host 10.1.1.25
4. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
5. Policies
set policy from trust to untrust IP_Phone1 IP_Phone2 h.323 permit
set policy from trust to untrust gatekeeper IP_Phone2 h.323 permit
set policy from untrust to trust IP_Phone2 mip(1.1.1.5) h.323 permit
set policy from untrust to trust IP_Phone2 mip (1.1.1.25) h.323 permit
save
Internet
LAN
DIP Pool ID 5
1.1.1.12 ~ 1.1.1.150
The name of the DIP pool can be DIP(id_num) for a user-defined DIP, or
DIP(interface) when the DIP pool uses the same address as an interface IP address.
You can use such address entries as destination addresses in policies, together with
the services H.323, SIP, or other VoIP (Voice-over-IP) protocols, to support incoming
calls.
The following example uses DIP in an H.323 VoIP configuration. The keyword
“incoming” instructs the device to add the DIP and interface addresses to the global
zone.
8 Examples
Chapter 1: H.323 Application Layer Gateway
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
ID: 5
IP Address Range: (select), 1.1.1.12 ~ 1.1.1.150
Port Translation: (select)
In the same subnet as the interface IP or its secondary IPs: (select)
Incoming NAT: (select)
3. Addresses
Policy > Policy Elements > Addresses > List > New (for Trust): Enter the
following, then click OK:
Policy > Policy Elements > Addresses > List > New (for Untrust): Enter the
following, then click OK:
Source Address:
Address Book Entry: (select), IP_Phones1
Destination Address:
Address Book Entry: (select), Any
Service: H.323
Action: Permit
Examples 9
Concepts & Examples ScreenOS Reference Guide
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), IP_Phone2
Destination Address:
Address Book Entry: (select), DIP(5)
Service: H.323
Action: Permit
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. DIP with Incoming NAT
set interface ethernet3 dip 5 1.1.1.12 1.1.1.150 incoming
3. Addresses
set address trust IP_Phones1 10.1.1.5/24
set address untrust IP_Phone2 2.2.2.5/32
4. Policies
set policy from trust to untrust IP_Phones1 any h.323 nat src dip 5 permit
set policy from untrust to trust IP_Phone2 dip(5) h.323 permit
save
LAN Internet
IP_Phone1 IP_Phone2
MIP 1.1.1.5 -> 10.1.1.5 2.2.2.5
10.1.1.5
10 Examples
Chapter 1: H.323 Application Layer Gateway
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Examples 11
Concepts & Examples ScreenOS Reference Guide
4. Route
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), IP_Phone1
Destination Address:
Address Book Entry: (select), IP_Phone2
Service: H.323
Action: Permit
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), IP_Phone1
Destination Address:
Address Book Entry: (select), Gatekeeper
Service: H.323
Action: Permit
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), IP_Phone2
Destination Address:
Address Book Entry: (select), MIP(1.1.1.5)
Service: H.323
Action: Permit
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Gatekeeper
Destination Address:
Address Book Entry: (select), MIP(1.1.1.5)
Service: H.323
Action: Permit
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Addresses
set address trust IP_Phone1 10.1.1.5/32
set address untrust gatekeeper 2.2.2.25/32
set address untrust IP_Phone2 2.2.2.5/32
12 Examples
Chapter 1: H.323 Application Layer Gateway
3. Mapped IP Addresses
set interface ethernet3 mip 1.1.1.5 host 10.1.1.5
4. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
5. Policies
set policy from trust to untrust IP_Phone1 IP_Phone2 h.323 permit
set policy from trust to untrust IP_Phone1 gatekeeper h.323 permit
set policy from untrust to trust IP_Phone2 mip(1.1.1.5) h.323 permit
set policy from untrust to trust gatekeeper mip(1.1.1.5) h.323 permit
save
Examples 13
Concepts & Examples ScreenOS Reference Guide
14 Examples
Chapter 2
Session Initiation Protocol
Application Layer Gateway
This chapter describes the Session Initiation Protocol (SIP) Application Layer
Gateway (ALG) and contains the following sections:
“Overview” on page 15
“Examples” on page 32
Overview
Session Initiation Protocol (SIP) is an Internet Engineering Task Force
(IETF)-standard protocol for initiating, modifying, and terminating multimedia
sessions over the Internet. Such sessions might include conferencing, telephony, or
multimedia, with features such as instant messaging and application-level mobility
in network environments.
Juniper Networks security devices support SIP as a service and can screen SIP
traffic, allowing and denying it based on a policy that you configure. SIP is a
predefined service in ScreenOS and uses port 5060 as the destination port.
SDP provides information that a system can use to join a multimedia session. SDP
might include information such as IP addresses, port numbers, times, and dates.
Note that the IP address and port number in the SDP header (the “c=” and “m=”
fields, respectively) are the address and port where the client wants to receive the
media streams and not the IP address and port number from which the SIP request
originates (although they can be the same). See “Session Description Protocol
Sessions” on page 20 for more information.
Overview 15
Concepts & Examples ScreenOS Reference Guide
SIP messages consist of requests from a client to a server and responses to the
requests from a server to a client with the purpose of establishing a session (or a
call). A User Agent (UA) is an application that runs at the endpoints of the call and
consists of two parts: the User Agent Client (UAC), which sends SIP requests on
behalf of the user; and a User Agent Server (UAS), which listens to the responses
and notifies the user when they arrive. Examples of UAs are SIP proxy servers and
phones.
ACK—The user from whom the INVITE originated sends an ACK request to
confirm reception of the final response to the INVITE request. If the original
INVITE request did not contain the session description, the ACK request must
include it. In NAT mode, the IP addresses in the Via:, From:, To:, Call-ID:,
Contact:, Route:, and Record-Route: header fields are modified as shown in
Table 2 on page 29.
BYE—A user sends a BYE request to abandon a session. A BYE request from
either user automatically terminates the session. In NAT mode, the IP addresses
in the Via:, From:, To:, Call-ID:, Contact:, Route:, and Record-Route: header
fields are modified as shown in Table 2 on page 29.
16 Overview
Chapter 2: Session Initiation Protocol Application Layer Gateway
Update—Used to open pinhole for new or updated SDP information. The Via:,
From:, To:, Call-ID:, Contact:, Route:, and Record-Route: header fields are
modified as shown in Table 2 on page 29.
1xx, 202, 2xx, 3xx, 4xx, 5xx, 6xx Response Codes—Used to indicate the status
of a transaction. Header fields are modified as shown in Table 2 on page 29.
Overview 17
Concepts & Examples ScreenOS Reference Guide
Table 1 provides a complete list of current SIP responses, all of which are supported
on Juniper Networks security devices.
Class Response Code-Reason Phrase Response Code-Reason Phrase Response Code-Reason Phrase
Informational 100 Trying 180 Ringing 181 Call is being forwarded
182 Queued 183 Session progress
Success 200 OK 202 Accepted
Redirection 300 Multiple choices 301 Moved permanently 302 Moved temporarily
305 Use proxy 380 Alternative service
Client Error 400 Bad request 401 Unauthorized 402 Payment required
403 Forbidden 404 Not found 405 Method not allowed
406 Not acceptable 407 Proxy authentication required 408 Request time-out
409 Conflict 410 Gone 411 Length required
413 Request entity too large 414 Request-URL too large 415 Unsupported media type
420 Bad extension 480 Temporarily not available 481 Call leg/transaction does not
exist
482 Loop detected 483 Too many hops 484 Address incomplete
485 Ambiguous 486 Busy here 487 Request canceled
488 Not acceptable here
Server Error 500 Server internal error 501 Not implemented 502 Bad gateway
502 Service unavailable 504 Gateway time-out 505 SIP version not supported
Global Failure 600 Busy everywhere 603 Decline 604 Does not exist anywhere
606 Not acceptable
18 Overview
Chapter 2: Session Initiation Protocol Application Layer Gateway
Juniper Networks security devices support SIP signaling messages on port 5060.
You can simply create a policy that permits SIP service, and the security device
filters SIP signaling traffic like any other type of traffic, permitting or denying it. The
media stream, however, uses dynamically assigned port numbers that can change
several times during the course of a call. Without fixed ports, it is impossible to
create a static policy to control media traffic. In this case, the security device
invokes the SIP ALG. The SIP ALG reads SIP messages and their SDP content and
extracts the port-number information it needs to dynamically open pinholes and let
the media stream traverse the security device.
NOTE: We refer to a pinhole as the limited opening of a port to allow exclusive traffic.
The SIP ALG monitors SIP transactions and dynamically creates and manages
pinholes based on the information it extracts from these transactions. The Juniper
Networks SIP ALG supports all SIP methods and responses (see “SIP Request
Methods” on page 16 and “Classes of SIP Responses” on page 18). You can allow
SIP transactions to traverse the Juniper Networks firewall by creating a static policy
that permits SIP service. This policy enables the security device to intercept SIP
traffic and do one of the following actions: permit or deny the traffic or enable the
SIP ALG to open pinholes to pass the media stream. The SIP ALG needs to open
pinholes only for the SIP requests and responses that contain media information
(SDP). For SIP messages that do not contain SDP, the security device simply lets
them through.
The SIP ALG intercepts SIP messages that contain SDP and, using a parser, extracts
the information it requires to create pinholes. The SIP ALG examines the SDP
portion of the packet, and a parser extracts information such as IP addresses and
port numbers, which the SIP ALG records in a pinhole table. The SIP ALG uses the IP
addresses and port numbers recorded in the pinhole table to open pinholes and
allow media streams to traverse the security device.
NOTE: Juniper Networks security devices do not support encrypted SDP. If a security
device receives a SIP message in which SDP is encrypted, the SIP ALG permits it
through the firewall but generates a log message informing the user that it cannot
process the packet. If SDP is encrypted, the SIP ALG cannot extract the
information it needs from SDP to open pinholes. As a result, the media content
that SDP describes cannot traverse the security device.
Overview 19
Concepts & Examples ScreenOS Reference Guide
NOTE: In the SDP session description, the media-level information begins with the m=
field.
Of the many fields in the SDP description, two are particularly useful to the SIP ALG
because they contain Transport Layer information. The two fields are the following:
This field can appear at the session or media level. It displays in this format:
Currently, the security device supports "IN" (for Internet) as the network type,
"IP4 and IP6" as address types, and a unicast IP address or domain name as
the destination (connection) IP address.
NOTE: Generally, the destination IP address can also be a multicast IP address, but
ScreenOS does not currently support multicast with SIP.
This field appears at the media level and contains the description of the media.
It displays in this format:
m=<media><port><transport><fmt list>
Currently, the security device supports only “audio” as the media and “RTP” as
the Application Layer transport protocol. The port number indicates the
destination (not the origin) of the media stream. The format list (fmt list)
provides information about the Application Layer protocol that the media uses.
In this release of ScreenOS, the security device opens ports only for RTP and
RTCP. Every RTP session has a corresponding Real Time Control Protocol
(RTCP) session. Therefore, whenever a media stream uses RTP, the SIP ALG
must reserve ports (create pinholes) for both RTP and RTCP traffic. By default,
the port number for RTCP is one higher than the RTP port number.
20 Overview
Chapter 2: Session Initiation Protocol Application Layer Gateway
NOTE: Generally, the destination IP address can also be a multicast IP address, but
ScreenOS does not currently support multicast with SIP.
Pinhole Creation
Both pinholes for the RTP and RTCP traffic share the same destination IP address.
The IP address comes from the c= field in the SDP session description. Because the
c= field can appear in either the session-level or media-level portion of the SDP
session description, the parser determines the IP address based on the following
rules (in accordance with SDP conventions):
First, the SIP ALG parser verifies if there is a c= field containing an IP address
in the media level. If there is one, the parser extracts that IP address, and the
SIP ALG uses it to create a pinhole for the media.
If there is no c= field in the media level, the SIP ALG parser extracts the IP
address from the c= field in the session level, and the SIP ALG uses it to create
a pinhole for the media. If the session description does not contain a c= field
in either level, this indicates an error in the protocol stack, and the security
device drops the packet and logs the event.
The following lists the information the SIP ALG needs to create a pinhole. This
information comes from the SDP session description and parameters on the
security device:
Protocol: UDP.
Destination IP: The parser extracts the destination IP address from the c= field
in the media or session level.
Destination port: The parser extracts the destination port number for RTP from
the m= field in the media level and calculates the destination port number for
RTCP using the following formula:
Lifetime: This value indicates the length of time (in seconds) during which a
pinhole is open to allow a packet through. A packet must go through the
pinhole before the lifetime expires. When the lifetime expires, the SIP ALG
removes the pinhole.
When a packet goes through the pinhole within the lifetime period,
immediately afterwards the SIP ALG removes the pinhole for the direction from
which the packet came.
Figure 8 describes a call setup between two SIP clients and how the SIP ALG
creates pinholes to allow RTP and RTCP traffic. The illustration assumes that the
security device has a policy that permits SIP, thus opening port 5060 for SIP
signaling messages.
Overview 21
Concepts & Examples ScreenOS Reference Guide
Client A 1.1.1.1 Trust Zone Security Device SIP Proxy Untrust Zone Client B 2.2.2.2
5. The SIP proxy forwards the Ringing 4. Client B replies to the SIP proxy with a
response from Client B to Client A Ringing response
through port 5060 on the security device
7. Per SDP, SIP ALG 6. Client B sends a 200 OK response to the
creates pinhole for SIP proxy in reply to the INVITE request
8. The SIP proxy forwards a 200 OK (SDP: 2.2.2.2: 3000)
response from Client B to Client A 2.2.2.2: 3000
through the security device
NOTE: The SIP ALG does not create pinholes for RTP and RTCP traffic when the
destination IP address is 0.0.0.0, which indicates that the session is on hold. To
put a session on hold, during a telephone communication, for example, a user
(User A) sends the other user (User B) a SIP message in which the destination IP
address is 0.0.0.0. Doing so indicates to User B not to send any media until further
notice. If User B sends media anyway, the security device drops the packets.
A call can have one or more voice channels. Each voice channel has two sessions
(or two media streams), one for RTP and one for RTCP. When managing the
sessions, the security device considers the sessions in each voice channel as one
group. Settings such as the inactivity timeout apply to a group as opposed to each
session.
22 Overview
Chapter 2: Session Initiation Protocol Application Layer Gateway
There are two types of inactivity timeouts that determine the lifetime of a group:
If either of these timeouts expires, the security device removes all sessions for this
call from its table, thus terminating the call.
WebUI
You must use the CLI to protect SIP proxy servers from being inundated by SIP
messages.
CLI
set alg sip app-screen protect deny dst-ip 1.1.1.3/24
set alg sip protect deny timeout 5
save
Overview 23
Concepts & Examples ScreenOS Reference Guide
WebUI
NOTE: You must use the CLI to set SIP-signaling and media-inactivity timeouts.
CLI
set alg sip signaling-inactivity-timeout 30000
set alg sip media-inactivity-timeout 90
save
NOTE: This example uses a general ScreenOS command and is not necessarily
SIP-specific. For more information about UDP flood protection and how to
determine effective settings, see “UDP Flood” on page 4-51.
WebUI
Security > Screening > Screen: Enter the following, then click Apply:
Zone: Untrust
UDP Flood Protection (select)
> Destination IP: Enter the following, then click the Back arrow in your
browser to return to the Screen configuration page:
CLI
set zone untrust screen udp-flood dst-ip 1.1.1.5 threshold 80000
save
24 Overview
Chapter 2: Session Initiation Protocol Application Layer Gateway
NOTE: This example uses a general ScreenOS command and is not necessarily
SIP-specific. For more information about source-based session limits and how to
determine effective settings, see “Source-Based and Destination-Based Session
Limits” on page 4-28.
WebUI
Screening > Screen (Zone: Untrust): Enter the following, then click OK:
CLI
set zone untrust screen limit-session source-ip-based 20
save
Using NAT with the SIP service is more complicated because SIP messages contain
IP addresses in the SIP headers as well as in the SIP body. The SIP headers contain
information about the caller and the receiver, and the security device translates this
information to hide it from the outside network. The SIP body contains the Session
Description Protocol (SDP) information, which includes IP addresses and port
numbers for transmission of the media. The security device translates SDP
information for allocating resources to send and receive the media.
How IP addresses and port numbers in SIP messages are replaced depends on the
direction of the message. For an outgoing message, the private IP address and port
number of the client are replaced with the public IP address and port number of the
Juniper Networks firewall. For an incoming message, the public address of the
firewall is replaced with the private address of the client.
When an INVITE message is sent out across the firewall, the SIP ALG collects
information from the message header into a call table, which it uses to forward
subsequent messages to the correct end point. When a new message arrives, for
example an ACK or 200 OK, the ALG compares the From:, To:, and Call-ID: fields
against the call table to identify the call context of the message. If a new INVITE
message arrives that matches the existing call, the ALG processes it as a REINVITE.
When a message containing SDP information arrives, the ALG allocates ports and
creates a NAT mapping between them and the ports in the SDP. Because the SDP
requires sequential ports for the Real Time Protocol (RTP) and Real Time Control
Protocol (RTCP) channels, the ALG provides consecutive even-odd ports. If it is
unable to find a pair of ports it discards the SIP message.
Outgoing Calls
When a SIP call is initiated with a SIP request message from the internal to the
external network, NAT replaces the IP addresses and port numbers in the SDP and
creates a binding to map the IP addresses and port numbers to the Juniper
Networks firewall. Via:, Contact:, Route:, and Record-Route: SIP header fields, if
present, are also bound to the firewall IP address. The ALG stores these mappings
for use in retransmissions and for SIP response messages.
The SIP ALG then opens pinholes in the firewall to allow media through the security
device on the dynamically assigned ports negotiated based on information in the
SDP and the Via:, Contact:, and Record-Route: header fields. The pinholes also
allow incoming packets to reach the Contact:, Via:, and Record-Route: IP addresses
and ports. When processing return traffic, the ALG inserts the original Contact:,
Via:, Route:, and Record-Route: SIP fields back into the packets.
Incoming Calls
Incoming calls are initiated from the public network to public mapped IP (MIP)
addresses or to interface IP addresses on the security device. MIPs are statically
configured IP addresses that point to internal hosts; interface IP addresses are
dynamically recorded by the ALG as it monitors REGISTER messages sent by
internal hosts to the SIP registrar. (For more information, see “Examples” on
page 32.) When the security device receives an incoming SIP packet, it sets up a
session and forwards the payload of the packet to the SIP ALG.
The ALG examines the SIP request message (initially an INVITE) and, based on
information in the SDP, opens gates for outgoing media. When a 200 OK response
message arrives, the SIP ALG performs NAT on the IP addresses and ports and
opens pinholes in the outbound direction. (The opened gates have a short
time-to-live, and time out if a 200 OK response message is not received quickly.)
When a 200 OK response arrives, the SIP proxy examines the SDP information and
reads the IP addresses and port numbers for each media session. The SIP ALG on
the security device performs NAT on the addresses and port numbers, opens
pinholes for outbound traffic, and refreshes the timeout for gates in the inbound
direction.
When the ACK arrives for the 200 OK, it also passes through the SIP ALG. If the
message contains SDP information, the SIP ALG ensures that the IP addresses and
port numbers are not changed from the previous INVITE—if they are, the ALG
deletes old pinholes and creates new pinholes to allow media to pass through. The
ALG also monitors the Via:, Contact:, and Record-Route: SIP fields and opens new
pinholes if it determines that these fields have changed.
Forwarded Calls
A forwarded call is when, for example, user A outside the network calls user B
inside the network, and user B forwards the call to user C outside the network. The
SIP ALG processes the INVITE from user A as a normal incoming call. But when the
ALG examines the forwarded call from B to C outside the network and notices that
B and C are reached using the same interface, it does not open pinholes in the
firewall, because media will flow directly between user A and user C.
Call Termination
The BYE message is used to terminate a call. When the security device receives a
BYE message, it translates the header fields just as it does for any other message,
But because a BYE message must be acknowledged by the receiver with a 200 OK,
the ALG delays call teardown for five seconds to allow time for transmission of the
200 OK.
As a precautionary measure, the SIP ALG uses hard timeout values to set the
maximum amount of time a call can exist. This ensures that the security device is
protected in the event of the following:
End systems crash during a call and a BYE message is not received.
Poor implementations of sip proxy fail to process Record-Route and never send
a BYE message.
Call Cancellation
Either party can cancel a call by sending a CANCEL message. Upon receiving a
CANCEL message, the SIP ALG closes pinholes through the firewall—if any have
been opened—and releases address bindings. Before releasing the resources, the
ALG delays the control channel age-out for approximately five seconds to allow time
for the final 200 OK to pass through. The call is terminated when the five second
timeout expires, regardless of whether a 487 or non-200 response arrives.
Forking
Forking enables a SIP proxy to send a single INVITE message to multiple
destinations simultaneously. When the multiple 200 OK response messages arrive
for the single call, the SIP ALG parses but updates call information with the first 200
OK message it receives.
SIP Messages
The SIP message format consists of a SIP header section, and the SIP body. In
request messages, the first line of the header section is the request line, which
includes the method type, Request-URI, and protocol version. In response
messages, the first line is the status line, which contains a status code. SIP headers
contain IP addresses and port numbers used for signaling. The SIP body, separated
from the header section by a blank line, is reserved for session description
information, which is optional. Juniper Networks security devices currently support
the Session Description Protocol (SDP) only. The SIP body contains IP addresses
and port numbers used to transport the media.
In NAT mode, the security device translates information in the SIP headers to hide
the information from the outside network. NAT is performed on SIP body
information to allocate resources, that is, port numbers where the media is to be
received.
SIP Headers
In the following sample SIP request message, NAT replaces the IP addresses in the
header fields—shown in bold font—to hide them from the outside network.
How IP address translation is performed depends on the type and direction of the
message, which can be any of the following:
Inbound request
Outbound response
Outbound request
Inbound response
Table 2 shows how NAT is performed in each of these cases. Note that for several of
the header fields the ALG must know more than just whether the messages comes
from inside or outside the network. It must also know what client initiated the call,
and whether the message is a request or response.
SIP Body
The SDP information in the SIP body includes IP addresses the ALG uses to create
channels for the media stream. Translation of the SDP section also allocates
resources, that is, port numbers to send and receive the media.
The following except from a sample SDP section shows the fields that are translated
for resource allocation.
SIP messages can contain more than one media stream. The concept is similar to
attaching multiple files to an email message. For example, an INVITE message sent
from a SIP client to a SIP server might have the following fields:
Juniper Networks security devices support up to 6 SDP channels negotiated for each
direction, for a total of 12 channels per call. For more information, see “Session
Description Protocol Sessions” on page 20.
The SDP section of the INVITE message indicates where the caller is willing to
receive media. Note that the Media Pinhole contains two port numbers, 52002 and
52003, for RTCP and RTP. The Via/Contact Pinhole provides port number 5060 for
SIP signaling.
Observe how, in the 200 OK response message, the translations performed in the
INVITE message are reversed. The IP addresses in this message, being public, are
not translated, but gates are opened to allow the media stream access to the private
network.
Security Device
Media Pinhole
5.5.5.1
6.6.6.1 Any IP
52002/52003 Any Port
45002/45003
Via/Contact Pinhole
5.5.5.1
6.6.6.1 Any IP
1234 Any Port
5060
Media Pinhole
Any IP 6.6.6.2
Any Port 62002/62003
Via/Contact Pinhole
Any IP 6.6.6.2
Any Port 5060
Examples
This section contains the following sample scenarios:
32 Examples
Chapter 2: Session Initiation Protocol Application Layer Gateway
The security device monitors outgoing REGISTER messages, performs NAT on these
addresses, and stores the information in an Incoming DIP table. Then, when an
INVITE message is received from outside the network, the security device uses the
Incoming DIP table to identify which internal host to route the INVITE message to.
You can take advantage of SIP proxy registration service to allow incoming calls by
configuring Interface DIP or DIP pools on the egress interface of the security device.
Interface DIP is adequate for handling incoming calls in a small office, while we
recommend setting up DIP pools for larger networks or an enterprise environment.
NOTE: Incoming call support using Interface DIP or a DIP pool is supported for SIP and
H.323 services only.
For incoming calls, security devices currently support UDP and TCP only. Domain
name resolution is also currently not supported; therefore, URIs must contain IP
addresses, as shown in Figure 11.
Examples 33
Concepts & Examples ScreenOS Reference Guide
Security Device
200 OK
From: [email protected]
200 OK To: [email protected]
From: [email protected] Update CSeq 1 INVITE
To: [email protected] Timeout Contact <sip: 6.6.6.1:5555>
CSeq 1 INVITE value Expires: 3600
Contact <sip: 5.5.5.1:1234>
Expires: 3600
34 Examples
Chapter 2: Session Initiation Protocol Application Layer Gateway
Trust Untrust
Security Device
LAN Internet
Interface DIP on
ethernet 3
phone2 Proxy Server
phone1 1.1.1.3
10.1.1.3 1.1.1.4
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Examples 35
Concepts & Examples ScreenOS Reference Guide
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
4. Policies
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), phone1
Destination Address
Address Book Entry: (select), any
Service: SIP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): None (Use Egress Interface IP)
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), Any
Destination Address
Address Book Entry: (select), DIP(ethernet3)
Service: SIP
Action: Permit
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface ethernet3 route
2. Addresses
set address trust phone1 10.1.1.3/24
set address untrust phone2 1.1.1.4/24
set address untrust proxy 1.1.1.3/24
3. DIP with Incoming NAT
set interface ethernet3 dip interface-ip incoming
set dip sticky
36 Examples
Chapter 2: Session Initiation Protocol Application Layer Gateway
4. Policies
set policy from trust to untrust phone1 any sip nat src permit
set policy from untrust to trust any dip(ethernet3) sip permit
save
Trust Untrust
Security Device
LAN Internet
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Examples 37
Concepts & Examples ScreenOS Reference Guide
2. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
ID: 5
IP Address Range: (select), 1.1.1.20 ~ 1.1.1.40
Port Translation: (select)
In the same subnet as the interface IP or its secondary IPs: (select)
Incoming NAT: (select)
4. Policies
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), phone1
Destination Address
Address Book Entry: (select), Any
Service: SIP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): 5 (1.1.1.20-1.1.1.40)/port-xlate
38 Examples
Chapter 2: Session Initiation Protocol Application Layer Gateway
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), Any
Destination Address
Address Book Entry: (select), DIP(5)
Service: SIP
Action: Permit
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface ethernet3 route
2. Addresses
set address trust phone1 10.1.1.3/24
set address untrust phone2 1.1.1.4/24
set address untrust proxy 1.1.1.3/24
3. DIP Pool with Incoming NAT
set interface ethernet3 dip 5 1.1.1.20 1.1.1.40 incoming
set dip sticky
4. Policies
set policy from trust to untrust phone1 any sip nat src dip 5 permit
set policy from untrust to trust any dip(5) sip permit
save
Examples 39
Concepts & Examples ScreenOS Reference Guide
ethernet1 ethernet3
10.1.1.1/24 1.1.1.1/24
Trust Untrust
Security Device
LAN Internet
Proxy Server
Virtual Device
phone1 MIP on ethernet3
1.1.1.1/24 phone2
10.1.1.3 1.1.1.4
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Zone: Trust
Static IP: (select this option when present)
IP Address/Netmask: 10.1.1.1/24
Enter the following, then click OK:
Interface Mode: NAT
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Zone: Untrust
IP Address/Netmask: 1.1.1.1/24
Interface Mode: Route
2. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
40 Examples
Chapter 2: Session Initiation Protocol Application Layer Gateway
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), any
Destination Address:
Address Book Entry: (select), MIP(1.1.1.3)
Service: SIP
Action: Permit
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface ethernet3 route
2. Addresses
set address trust phone1 10.1.1.3/24
set address untrust phone2 1.1.1.4/24
set address untrust proxy 1.1.1.3/24
3. MIP
set interface ethernet3 mip 1.1.1.3 host 10.1.1.3
4. Policy
set policy from untrust to trust any mip(1.1.1.3) sip permit
save
Examples 41
Concepts & Examples ScreenOS Reference Guide
Trust Untrust
Security Device
LAN Internet
Virtual Device
MIP on ethernet3
Proxy Server phone1 1.1.1.2 -> 10.1.1.4 phone2
10.1.1.4 10.1.1.3 1.1.1.4
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
OK:
Zone: Trust
Static IP: (select this option when present)
IP Address/Netmask: 10.1.1.1/24
Enter the following, then click OK:
Interface Mode: NAT
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Zone: Untrust
IP Address/Netmask: 1.1.1.1/24
Interface Mode: Route
2. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
42 Examples
Chapter 2: Session Initiation Protocol Application Layer Gateway
3. MIP
Network > Interfaces > Edit (for loopback.3) > MIP > New: Enter the
following, then click OK:
Source Address:
Address Book Entry: (select) any
Destination Address:
Address Book Entry: (select) phone2
Service: SIP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): None (Use Egress Interface IP)
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), phone2
Destination Address:
Address Book Entry: (select), MIP(1.1.1.2)
Service: SIP
Action: Permit
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface ethernet3 route
2. Addresses
set address trust phone1 10.1.1.3/24
set address untrust phone2 1.1.1.4/24
set address trust proxy 10.1.1.4/24
3. MIP
set interface ethernet3 mip 1.1.1.2 host 10.1.1.4
4. Policies
set policy from trust to untrust any phone2 sip nat src permit
set policy from untrust to trust phone2 mip(1.1.1.2) sip permit
save
Examples 43
Concepts & Examples ScreenOS Reference Guide
ethernet1 ethernet3
10.1.1.1/24 1.1.1.1/24
Trust Untrust
Security Device
LAN Internet
Interface DIP
on ethernet3
phone1 phone2 Proxy Server
10.1.1.3 1.1.1.4 1.1.1.3
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Zone: Trust
Static IP: (select this option when present)
IP Address/Netmask: 10.1.1.1/24
Enter the following, then click OK:
Interface Mode: NAT
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Zone: Untrust
IP Address/Netmask: 1.1.1.1/24
Interface Mode: Route
2. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
44 Examples
Chapter 2: Session Initiation Protocol Application Layer Gateway
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
4. Policies
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select) phone1
Destination Address:
Address Book Entry: (select) Any
Service: SIP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): None (Use Egress Interface IP)
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), DIP(ethernet3)
Service: SIP
Action: Permit
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Addresses
set address trust phone1 10.1.1.3/24
set address untrust phone2 1.1.1.4/24
set address untrust proxy 1.1.1.3/24
Examples 45
Concepts & Examples ScreenOS Reference Guide
3. Interface DIP
set interface ethernet3 dip interface-ip incoming
4. Policies
set policy from trust to untrust phone1 any sip nat src permit
set policy from untrust to trust any dip(ethernet3) sip permit
save
Untrust
Internet
phone2
1.1.1.4
ethernet3
1.1.1.1/24
ethernet2
2.2.2.2/24 DMZ
Security
Device Proxy Server
2.2.2.4
ethernet1
10.1.1.1/24
Virtual Device
MIP on ethernet2
2.2.2.3-> 10.1.1.3
LAN
phone1
10.1.1.3
Trust
46 Examples
Chapter 2: Session Initiation Protocol Application Layer Gateway
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Zone: Trust
Static IP: (select when this option is present)
IP Address/Netmask: 10.1.1.1/24
Enter the following, then click OK:
Interface Mode: NAT
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Examples 47
Concepts & Examples ScreenOS Reference Guide
4. Policies
Policies > (From: Trust, To: DMZ) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), phone1
Destination Address:
Address Book Entry: (select), proxy
Service: SIP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: Enable
(DIP on): None (Use Egress Interface IP)
Policies > (From: DMZ, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), proxy
Destination Address:
Address Book Entry: (select), phone2
Service: SIP
Action: Permit
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), phone2
Destination Address:
Address Book Entry: (select), phone1
Service: SIP
Action: Permit
Policies > (From: Untrust, To: DMZ) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), phone2
Destination Address:
Address Book Entry: (select), proxy
Service: SIP
Action: Permit
Policies > (From: DMZ, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), proxy
Destination Address:
Address Book Entry: (select), MIP(2.2.2.3)
Service: SIP
Action: Permit
48 Examples
Chapter 2: Session Initiation Protocol Application Layer Gateway
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), phone1
Destination Address:
Address Book Entry: (select), phone2
Service: SIP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: Enable
(DIP on): None (Use Egress Interface IP)
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface ethernet3 route
set interface ethernet2 zone dmz
set interface ethernet2 ip 2.2.2.2/24
set interface ethernet2 route
2. Addresses
set address trust phone1 10.1.1.3/24
set address untrust phone2 1.1.1.4/24
set address dmz proxy 2.2.2.4
3. MIP
set interface2 mip 2.2.2.3 host 10.1.1.3
4. Policies
set policy from trust to dmz phone1 proxy sip nat src permit
set policy from dmz to untrust proxy phone2 sip permit
set policy from untrust to trust phone2 phone1 sip permit
set policy from untrust to dmz phone2 proxy sip permit
set policy from dmz to trust proxy mip(2.2.2.3) sip permit
set policy from trust to untrust phone1 phone2 sip nat src permit
save
Examples 49
Concepts & Examples ScreenOS Reference Guide
Untrust
phone1 phone2
1.1.1.4 1.1.2.4
Internet
ethernet4 ethernet3
1.1.1./24 1.1.1.1/24
Loopback 1
1.1.4.1/24
MIP on Loopback.1
1.1.4.5-> 10.1.1.5
ethernet1
10.1.1.1/24
LAN
proxy
10.1.1.5
Trust
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Zone: Trust
Static IP: (select when this option is present)
IP Address/Netmask: 10.1.1.1/24
Network > Interfaces > Edit (for ethernet4): Enter the following, then click
OK:
Zone: Untrust
Static IP: (select when this option is present)
IP Address/Netmask: 1.1.1.1/24
50 Examples
Chapter 2: Session Initiation Protocol Application Layer Gateway
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Zone: Untrust
Static IP: (select when this option is present)
IP Address/Netmask: 1.1.2.1/24
Network > Interfaces > New Loopback IF: Enter the following, then click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Network > Interfaces > Edit (for ethernet4): Enter the following, then click
OK:
Examples 51
Concepts & Examples ScreenOS Reference Guide
4. MIP
Network > Interfaces > Edit (for loopback.1) > MIP > New: Enter the
following, then click OK:
Source Address:
Address Book Entry: (select), proxy
Destination Address:
Address Book Entry: (select), Any
Service: SIP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: Enable
(DIP on): None (Use Egress Interface IP)
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), MIP(1.1.4.5)
Service: SIP
Action: Permit
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.2.1/24
set interface ethernet3 route
set interface ethernet4 zone untrust
set interface ethernet4 ip 1.1.1.1/24
set interface ethernet4 route
set interface loopback.1 zone untrust
set interface loopback.1 ip 1.1.4.1/24
set interface loopback.1 route
52 Examples
Chapter 2: Session Initiation Protocol Application Layer Gateway
2. Addresses
set address trust proxy 10.1.1.5/32
set address untrust phone1 1.1.1.4/32
set address untrust phone2 1.1.2.4/32
3. Loopback Group
set interface ethernet3 loopback-group loopback.1
set interface ethernet4 loopback-group loopback.1
4. MIP
set interface loopback.1 mip 1.1.4.5 host 10.1.1.5
5. Blocking
unset zone untrust block
6. Policies
set policy from trust to untrust proxy any sip nat src permit
set policy from untrust to trust any mip(1.1.4.5) sip permit
save
Trust Untrust
Security Device
Internet
LAN
Interface DIP
phone2 ethernet2 on ethernet3
10.1.2.2 10.1.2.1/24
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Zone: Trust
Static IP: (select when this option is present)
IP Address/Netmask: 10.1.1.1/24
Enter the following, then click OK:
Interface Mode: NAT
Examples 53
Concepts & Examples ScreenOS Reference Guide
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
Apply:
Zone: Trust
Static IP: (select when this option is present)
IP Address/Netmask: 10.1.2.1/24
Enter the following, then click OK:
Interface Mode: NAT
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Zone: Untrust
Static IP: (select when this option is present)
IP Address/Netmask: 3.3.3.3/24
2. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), proxy
Service: SIP
Action: Permit
54 Examples
Chapter 2: Session Initiation Protocol Application Layer Gateway
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: Enable
(DIP on): None (Use Egress Interface IP)
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select) proxy
Destination Address
Address Book Entry: (select) Any
Service: SIP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options:
NAT:
Source Translation: (select)
(DIP on): None (Use Egress Interface IP)
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet2 zone trust
set interface ethernet2 ip 10.1.2.1/24
set interface ethernet2 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 3.3.3.3/24
set interface ethernet3 route
2. Addresses
set address trust phone1 10.1.1.3/24
set address trust phone2 10.1.2.2/24
set address untrust proxy 3.3.3.4/24
3. Interface DIP
set interface ethernet3 dip interface-ip incoming
4. Policies
set policy from trust to untrust any proxy sip nat src permit
set policy from untrust to trust proxy dip(ethernet3) sip permit
save
Examples 55
Concepts & Examples ScreenOS Reference Guide
NOTE: The security devices used in this example must have at least three independently
configurable interfaces available.
Proxy
Note: The Untrust Zone for Central Office 10.1.3.3
each device is not shown Trust Zone
Trust
eth2/8-10.1.3.1
tunnel 1
tunnel 2
6.6.6.6 Central 7.7.7.7
Untrust eth2/1: Untrust eth2/2
1.1.1.1 1.1.2.1
Branch Office One tunnel.3 interface tunnel.3 interface Branch Office Two
phone1 unnumbered unnumbered phone2
10.1.1.3 10.1.2.3
Zone: Untrust
Static IP: (select when this option is present)
IP Address/Netmask: 1.1.1.1/24
Network > Interfaces > Edit (for ethernet2/2): Enter the following, then click
Apply:
Zone: Untrust
Static IP: (select when this option is present)
IP Address/Netmask: 1.1.2.1/24
56 Examples
Chapter 2: Session Initiation Protocol Application Layer Gateway
Network > Interfaces > Edit (for ethernet2/8): Enter the following, then click
Apply:
Zone: Trust
Static IP: (select when this option is present)
IP Address/Netmask: 10.1.3.1/24
Enter the following, then click OK:
Interface mode: route
Network > Interfaces > New Tunnel IF: Enter the following, then click Apply:
Network > Interfaces > New Tunnel IF: Enter the following, then click Apply:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
Examples 57
Concepts & Examples ScreenOS Reference Guide
VPNs > AutoKey IKE > New: Enter the following, then click OK:
Network > Routing > Destination > New: Enter the following, then click OK:
Policies > (From: Untrust, To: Trust) > New: Enter the following, then click OK:
58 Examples
Chapter 2: Session Initiation Protocol Application Layer Gateway
Zone: Trust
Static IP: (select when this option is present)
IP Address/Netmask: 10.1.1.1/24
Interface mode: NAT
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
Apply:
Zone: Untrust
Static IP: (select when this option is present)
IP Address/Netmask: 3.3.3.3/24
Network > Interfaces > Edit (for ethernet4): Enter the following, then click
Apply:
Zone: Untrust
Static IP: (select when this option is present)
IP Address/Netmask: 4.4.4.4/24
Network > Interfaces > New Tunnel IF: Enter the following, then click Apply:
Network > Interfaces > New Tunnel IF: Enter the following, then click Apply:
Examples 59
Concepts & Examples ScreenOS Reference Guide
2. Address
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
Network > Routing > Destination > New: Enter the following, then click OK:
60 Examples
Chapter 2: Session Initiation Protocol Application Layer Gateway
Policies > (From: Untrust, To: Trust) > New: Enter the following, then click OK:
Zone: Trust
Static IP: (select when this option is present)
IP Address/Netmask: 10.1.2.1/24
Examples 61
Concepts & Examples ScreenOS Reference Guide
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
Apply:
Zone: Untrust
Static IP: (select when this option is present)
IP Address/Netmask: 2.2.2.2/24
Network > Interfaces > Edit (for ethernet4): Enter the following, then click
Apply:
Zone: Untrust
Static IP: (select when this option is present)
IP Address/Netmask: 4.4.4.4/24
Network > Interfaces > New Tunnel IF: Enter the following, then click Apply:
Network > Interfaces > New Tunnel IF: Enter the following, then click Apply:
2. Address
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
62 Examples
Chapter 2: Session Initiation Protocol Application Layer Gateway
VPNs > AutoKey IKE > New: Enter the following, then click OK:
Network > Routing > Destination > New: Enter the following, then click OK:
Policies > (From: Untrust, To: Trust) > New: Enter the following, then click OK:
Examples 63
Concepts & Examples ScreenOS Reference Guide
Guarantee bandwidth for VoIP traffic—The most effective way to ensure quality
VoIP service, and still allow other types of traffic on the interface, is to create a
policy guaranteeing the minimum bandwidth necessary for the amount of VoIP
traffic you expect on the interface and set priority queuing to the highest level.
The advantage of this strategy is that VoIP traffic can use additional bandwidth
when it is available, and other types of traffic can use bandwidth not
guaranteed for VoIP when VoIP traffic is not using it.
64 Examples
Chapter 2: Session Initiation Protocol Application Layer Gateway
The left side of Figure 21 shows what bandwidth usage with these settings looks like
with high office-traffic usage and low VoIP traffic usage on the interface. If VoIP
traffic suddenly needs more bandwidth, it cannot get it unless it has a higher
priority than the office-traffic services. The right side of Figure 21 shows what
bandwidth usage looks like in the same circumstance when you give VoIP traffic a
higher priority and set office traffic to a lower priority. For more information about
configuring bandwidth and priority levels, see “Traffic Shaping” on page 193.
VoIP
gbw 512 Kbps VoIP Traffic
VoIP
2 Mbps Total mbw 1536 Kbps mbw 1024 Kbps 2 Mbps Total
Bandwidth Bandwidth
Examples 65
Concepts & Examples ScreenOS Reference Guide
66 Examples
Chapter 3
Media Gateway Control Protocol
Application Layer Gateway
This chapter presents an overview of the Media Gateway Control Protocol (MGCP)
Application Layer Gateway (ALG) and lists the firewall security features of the
implementation. Examples of typical scenarios follow a summary of the MGCP
architecture. This chapter includes the following sections:
“Overview” on page 67
“Examples” on page 73
Overview
The Media Gateway Control Protocol (MGCP) is supported on security devices in
Route, Transparent, and Network Address Translation (NAT) mode. MGCP is a
text-based Application Layer protocol used for call setup and control. MGCP is based
on a master-slave call control architecture in which the media gateway controller,
via the call agent, maintains call control intelligence, while the media gateways
carry out the instructions of the call agent.
Conducts VoIP signaling payload inspection. The payload of the incoming VoIP
signaling packet is fully inspected based on related RFCs and proprietary
standards. Any malformed packet attack is blocked by the ALG.
Overview 67
Concepts & Examples ScreenOS Reference Guide
Manages pinholes for VoIP traffic. To keep the VoIP network secure, the IP
address and port information used for media or signaling is identified by the
ALG, and any needed pinhole is dynamically created and closed during call
setup.
MGCP Security
The MGCP ALG includes the following security features:
About MGCP
MGCP is a text-based, application layer protocol that can be used for call setup and
control. The protocol is based on a master/slave call control architecture: the media
gateway controller (call agent) maintains call control intelligence, and media
gateways carry out the instructions from the call agent.
Entities in MGCP
There are four basic entities in MGCP:
“Endpoint” on page 69
“Connection” on page 69
“Call” on page 69
68 MGCP Security
Chapter 3: Media Gateway Control Protocol Application Layer Gateway
Endpoint
A media gateway (MG) is a collection of endpoints. An endpoint can be an analog
line, trunk, or any other access point. An endpoint is named as below:
local-endpoint-name@domain-name
group1/[email protected]
group2/Trk1/*@[192.168.10.8] (wild-carding)
Connection
Connections are created on each endpoint by a MG during call setup. A typical VoIP
call involves two connections. A complex call, for example a three-party call or
conference call, might require more connections. The media gateway controller
(MGC) can instruct media gateways to create, modify, delete and audit a connection.
Call
A call is identified by its call ID, which is created by the MGC when establishing a
new call. Call ID is a hexadecimal string with a maximum length of 32 characters.
Call ID is unique within the MGC. Two or more connections can have the same call
ID if they belong to the same call.
Call Agent
One or more call agents (also called media gateway controllers) are supported in
MGCP to enhance reliability in VoIP network. The following are two examples of call
agent names:
voipCA.mynetwork.com
Several network addresses can be associated under one domain name in the
Domain Name System (DNS). By keeping track of the time to live (TTL) of DNS
query/response data and implementing retransmission using other alternative
network addresses, switchover and failover is achieved in MGCP.
The concept of notified entity is essential in MGCP. The notified entity for an
endpoint is the call agent currently controlling that endpoint. An endpoint should
send any MGCP command to its notified entity. However, different call agents might
send MGCP commands to this endpoint.
About MGCP 69
Concepts & Examples ScreenOS Reference Guide
The notified entity is set to a provisioned value upon startup, but could be changed
by a call agent through the use of a Notified Entity parameter contained in a MGCP
message. If the notified entity for an endpoint is empty or has not been set
explicitly, its value defaults to the source address of the last successful non-audit
MGCP command received for that endpoint.
Commands
The MGCP protocol defines nine commands for controlling endpoints and
connections. All commands are composed of a command header, optionally
followed by session description protocol (SDP) information. A command header has
the following elements:
Table 3 lists supported MGCP commands, with a description of each, the command
syntax, and examples. Refer to RFC 2234 for a complete explanation of command
syntax.
Command
Verb Description Command Syntax Examples
EPCF EndpointConfiguration—used by ReturnCode EPCF 2012 wxx/[email protected]
a call agent to inform a gateway [PackageList] MGCP 1.0
of coding characteristics (a-law EndpointConfiguration (EndpointId, B: e:mu
or mu-law) expected by the line [BearerInformation])
side of the endpoint.
CRCX CreateConnection—used by a ReturnCode, CRCX 1205 aaln/[email protected]
call agent to instruct the gateway [ConnectionId,] MGCP 1.0
to create a connection with, and [SpecificEndPointId,] C: A3C47F21456789F0
endpoint inside, the gateway. [LocalConnectionDescriptor,] L: p:10, a:PCMU
[SecondEndPointId,] M: sendrecv
[SecondConnectionId,][Pac X: 0123456789AD
kageList] R: L/hd
CreateConnection (CallId, S: L/rg
EndpointId, v=0
[NotifiedEntity,] o=- 25678 753849 IN IP4
[LocalConnectionOption,] 128.96.41.1
Mode, s=-
[{RemoteConnectionDescriptor | c=IN IP4 128.96.41.1
SecondEndpoindId},] t=0 0
[encapsulated RQNT,] m=audio 3456 RTP/AVP 0
[encapsulated EPCF])
70 About MGCP
Chapter 3: Media Gateway Control Protocol Application Layer Gateway
Command
Verb Description Command Syntax Examples
MDCX ModifyConnection—used by a ReturnCode, MDCX 1210 aaln/[email protected]
call agent to instruct a gateway to [LocalConnectionDescriptor,] MGCP 1.0
change the parameters for an [PackageList] C: A3C47F21456789F0
existing connection. ModifyConnection (CallId, I: FDE234C8
EndpointId, M: recvonly
ConnectionId, X: 0123456789AE
[NotifiedEntity,] R: L/hu
[LocalConnectionOption,] S: G/rt
[Mode,] v=0
[RemoteConnectionDescriptor,] o=- 4723891 7428910 IN IP4
[encapsulated RQNT,] 128.96.63.25
[encapsulated EPCF]) s=-
c=IN IP4 128.96.63.25
t=0 0
m=audio 3456 RTP/AVP 0
DLCX DeleteConnection—used by a ReturnCode, Example 1: MGC -> MG
call agent to instruct a gateway to ConnectionParameters, DLCX 9210 aaln/[email protected]
delete an existing connection. [PackageList] MGCP 1.0
DeleteConnection can also be DeleteConnection (CallId, C: A3C47F21456789F0
used by a gateway to release a EndpointId, I: FDE234C8
connection that can no longer be ConnectionId,
[NotifiedEntity,] Example 2: MG -> MGC
sustained.
[encapsulated RQNT,] DLCX 9310 aaln/[email protected]
[encapsulated EPCF]) MGCP 1.0
C: A3C47F21456789F0
I: FDE234C8
E: 900 - Hardware error
P: PS=1245, OS=62345, PR=780,
OR=45123, PL=10, JI=27, LA=48
RQNT The NotificationRequest ReturnCode, RQNT 1205 aaln/[email protected]
command is used by a call agent [PackageList] MGCP 1.0
to instruct a MG to monitor for NotificationRequest[(EndpointId, N: [email protected]
certain event(s) or signal(s) for a [NotifiedEntity,] X: 0123456789AA
specific endpoint. [RequestedEvents,] R: L/hd(A,
RequestIdentifier, E(S(L/dl),R(L/oc,L/hu,D/[0-9#*T](D))))
[DigitMap,] D:
[SignalRequests,] (0T|00T|xx|91xxxxxxxxxx|9011x.T)
[QuarantineHandling,] S:
[DetectEvents,] T: G/ft
[encapsulated EPCF])
NTFY Notify—used by a gateway to ReturnCode, NTFY 2002 aaln/[email protected]
inform the call agent when [PackageList] MGCP 1.0
requested event(s) or signal(s) Notify (EndpointID, N: [email protected]:5678
occur. [NotifiedEntity,] X: 0123456789AC
RequestIdentifier, O:
ObservedEvents) L/hd,D/9,D/1,D/2,D/0,D/1,D/8,D/2,D/
9,D/4, D/2,D/6,D/6
About MGCP 71
Concepts & Examples ScreenOS Reference Guide
Command
Verb Description Command Syntax Examples
AUEP AuditEndpoint—used by a call ReturnCode, Example 1:
agent to audit the status of the EndPointIdList, | { AUEP 1201 aaln/[email protected]
endpoint. [RequestedEvents,] MGCP 1.0
[QuarantineHandling,] F: A, R,D,S,X,N,I,T,O
[DigitMap,] Example 2:
[SignalRequests,] AUEP 1200 *@rgw-25.att.net MGCP
[RequestedIdentifier,] 1.0
[NotifiedEntity,]
[ConnectionIdentifier,]
[DetectEvents,]
[ObservedEvents,]
[EventStats,]
[BearerInformation,]
[BearerMethod,]
[RestartDelay,]
[ReasonCode,]
[MaxMGCPDatagram,]
[Capabilities]}
[PackageList]
AuditEndpoint (EndpointId,
[RequestedInfo])
AUCX AuditConnection—used by a call ReturnCode, AUCX 3003 aaln/[email protected]
agent to collect the parameters [CallId,] MGCP 1.0
applied to a connection. [NotifiedEntity,] I: 32F345E2
[LocalConnectionOptions,] F: C,N,L,M,LC,P
[Mode,]
[RemoteConnectionDescriptor,]
[LocalConnectionDescriptor,]
[ConnectionParameters,]
[PackageList]
AuditConnection (EndpointId,
ConnectionId,
RequestedInfo)
RSIP RestartInProgress—used by a ReturnCode, RSIP 5200 aaln/[email protected]
gateway to notify a call agent [NotifiedEntity,] MGCP 1.0
that one or more endpoints are [PackageList] RM: graceful
being taken out of service or RestartInProgress (EndpointId, RD: 300
placed back in service. RestartMethod,
[RestartDelay,]
[ReasonCode])
Response Codes
Every command sent by the calling agent or gateway, whether successful or not,
requires a response code. The response code is in the header of the response
message, and optionally is followed by session description information.
72 About MGCP
Chapter 3: Media Gateway Control Protocol Application Layer Gateway
200 1204 OK
I: FDE234C8
v=0
o=- 25678 753849 IN IP4 128.96.41.1
s=-
c=IN IP4 128.96.41.1
t=0 0
m=audio 3456 RTP/AVP 96
a=rtpmap:96 G726-32/8000
A response to a command is sent to the source address of the command, not to the
current notified entity. A media gateway can receive MGCP commands from various
network addresses simultaneously, and send back responses to corresponding
network addresses. However, it sends all MGCP commands to its current notified
entity.
Examples
This section includes the following configuration scenarios:
After creating zones—untrust_subscriber for the customers and trust_ca for the
service provider, you configure addresses, and then policies. Although gateways
frequently reside in different zones, requiring policies for media traffic, in this
example both gateways are in the same subnet. RTP traffic between the gateways
never passes through the firewall, therefore no policy is needed for media.
Examples 73
Concepts & Examples ScreenOS Reference Guide
Untrust
IAD
IP Phone
IAD
WebUI
1. Zones
Network > Zones > New: Enter the following, then click OK:
Network > Zones > New: Enter the following, then click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
74 Examples
Chapter 3: Media Gateway Control Protocol Application Layer Gateway
3. Interfaces
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet4): Enter the following, then click
Apply:
Name: Pol-CA-To-Subscribers
Source Address
Address Book Entry: (select), call_agent1
Destination Address
Address Book Entry: (select), SubscriberSubNet
Service: MGCP-UA
Action: Permit
Policies > (From: untrust_subscriber, To: trust-ca) New: Enter the following,
then click OK:
Name: Pol-Subscribers-To-CA
Source Address
Address Book Entry: (select), SubscriberSubNet
Destination Address
Address Book Entry: (select), call_agent1
Service: MGCP-CA
Action: Permit
CLI
1. Zones
set zone name untrust_subscriber
set zone name trust_ca
2. Addresses
set address untrust_subscriber SubscriberSubNet 2.2.2.0 255.255.255.0 “Our
subscribers' network”
set address trust_ca call_agent1 10.1.1.101 255.255.255.255 “Our No. 1 call
agent”
Examples 75
Concepts & Examples ScreenOS Reference Guide
3. Interfaces
set interface ethernet3 zone untrust_subscriber “Our subscribers’ network”
set interface ethernet3 ip 2.2.2.0/24
set interface ethernet3 route
ISP-Hosted Service
In this example, (see Figure 23) an ISP located on the American west coast provides
MGCP service to customers in Asia and San Francisco. Asia customers are in the
Untrust zone, and supported by the gateway: asia_gw (3.3.3.110); San Francisco
customers are in the Trust zone, and supported by the gateway: sf_gw (2.2.2.201).
The call agent: west_ca (10.1.1.101) is in the DMZ.
After setting addresses for the gateways and the call agent, you configure the
interfaces, putting ethernet4 and ethernet5, which are trusted, in route mode to
allow them to stream media directly after call setup. To protect the IP address of the
call agent in the DMZ from exposure, you place a MIP on ethernet6, that is, you
map the IP address of the call agent (10.1.1.101) to an IP address from the pool of
addresses on the ethernet6 interface, in this case: 3.3.3.101.
Finally, you create policies. To allow MGCP signaling between the call agent in the
DMZ and the gateway in the Untrust zone, you create one policy for each direction,
referencing the MIP that protects the call agent. You create another pair of policies
to allow signaling between the call agent and the gateway in the Trust zone. A single
policy is sufficient to allow bidirectional communication between gateways in the
Trust and Untrust zones.
76 Examples
Chapter 3: Media Gateway Control Protocol Application Layer Gateway
Virtual Device
DMZ MIP on Ethernet6 -
3.3.3.101 - 10.1.1.101
west_ca
10.1.1.101
Trust Zone
sf_gw
2.2.2.201 IP Phone
WebUI
1. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Examples 77
Concepts & Examples ScreenOS Reference Guide
2. Interfaces
Network > Interfaces > Edit (for ethernet4): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet5): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet6): Enter the following, then click
Apply:
Source Address
Address Book Entry: (select), west_ca
Destination Address
Address Book Entry: (select), asia_gw
Service: MGCP-UA
Action: Permit
Policies > (From: Untrust To: DMZ) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), asia_gw
Destination Address
Address Book Entry: (select), west_ca
Service: MGCP-CA
Action: Permit
78 Examples
Chapter 3: Media Gateway Control Protocol Application Layer Gateway
Policies > (From: Trust To: DMZ) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), sf_gw
Destination Address
Address Book Entry: (select), west_ca
Service: MGCP-CA
Action: Permit
Policies > (From: DMZ To: Trust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), west_ca
Destination Address
Address Book Entry: (select), sf_gw
Service: MGCP-UA
Action: Permit
Policies > (From: Trust To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), sf_gw
Destination Address
Address Book Entry: (select), asia_gw
Service: MGCP-UA
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
DIP on: None (Use Egress Interface IP)
CLI
1. Addresses
set address trust sf_gw 2.2.2.201/32 “gateway in s.f.”
set address untrust asia_gw 3.3.3.110/32 “gateway in asia”
set address dmz west_ca 10.1.1.101/32 “ca in west coast”
2. Interfaces
set interface ethernet4 ip 2.2.2.10/24
set interface ethernet4 route
set interface ethernet4 zone trust
Examples 79
Concepts & Examples ScreenOS Reference Guide
4. Policies
set policy from dmz to untrust west_ca asia_gw mgcp-ua permit
set policy from untrust to dmz asia_gw mip(3.3.3.101) mgcp-ca permit
set policy from trust to untrust sf_gw asia_gw mgcp-ua nat src permit
80 Examples
Chapter 4
Skinny Client Control Protocol
Application Layer Gateway
This chapter presents an overview of the Skinny Client Control Protocol (SCCP)
Application Layer Gateway (ALG) and lists the firewall security features of the
implementation. Examples of typical scenarios follow a summary of the SCCP
architecture. This chapter includes the following sections:
“Overview” on page 81
“Examples” on page 87
Overview
Skinny Client Control Protocol (SCCP) is supported on security devices in Route,
Transparent, and Network Address Translation (NAT) modes. SCCP is a binary-based
Application Layer protocol used for Voice-over-Internet Protocol (VoIP) call setup
and control. In the SCCP architecture, a Cisco H.323 proxy, known as the Call
Manager, does most of the processing. IP phones, also called End Stations, run the
Skinny client and connect to a primary (and, if available, a secondary) Call Manager
over TCP on port 2000 and register with the primary Call Manager. This connection
is then used to establish calls coming to or from the client.
Call flow from a Skinny client, through the Call Manager, to another Skinny
client.
Overview 81
Concepts & Examples ScreenOS Reference Guide
SCCP Security
The SCCP ALG includes the following security features:
Firewall policy enforcement between Cisco IP phones and the Call Manager
(Intra-Cluster).
Call Manager flood control—Protects the Call Manager from being flooded with
new calls either by an already compromised connected client or by a faulty
device.
82 SCCP Security
Chapter 4: Skinny Client Control Protocol Application Layer Gateway
About SCCP
The following sections give a brief overview of SCCP and how it works:
SCCP Components
The principle components of the SCCP VoIP architecture include the following:
SCCP Client
Call Manager
Cluster
SCCP Client
The SCCP client runs on an IP phone, also called an End Station, which uses SCCP
for signaling and for making calls. In order for a Skinny client to make a call, it must
first register with a Primary Call Manager (and a secondary, if available). The
connection between the client and the Call Manager is over TCP on port 2000. This
connection is then used to establish calls to or from the client. Transmission of
media is over RTP, UDP, and IP.
Call Manager
The Call Manager is a Cisco H.323 server with overall control of all devices and
communication in the SCCP VoIP network. Its functions include defining,
monitoring and controlling SCCP groups, regions of numbers, and route
plans;providing initialization, admission and registration of devices on the network;
providing a redundant database that contains addresses, phone numbers, and
number formats; and initiating contact with called devices or their agents to
establish logical sessions in which voice communication can flow.
Cluster
A Cluster is a collection of SCCP clients and a Call Manager. The Call Manager in the
cluster knows about all SCCP clients in the cluster. There can be more than one Call
Manager for backup in a cluster. Call Manager behavior varies in each of the
following cluster scenarios:
Intra-Cluster, in which the Call Manager knows about each SCCP client, and the
call is between SCCP clients of the same cluster.
Inter-Cluster calls using the gatekeeper for admission control and address
resolution.
About SCCP 83
Concepts & Examples ScreenOS Reference Guide
Call Manager behavior also varies with calls between an SCCP client and a
phone in a Public Switched Telephone Network (PSTN), and with calls between
an SCCP client and a phone in another administrative domain that is using
H323.
SCCP Transactions
SCCP transactions are the processes that need to take place in order for an SCCP
call to proceed. SCCP transactions include the following:
Client Initialization
Client Registration
Call Setup
Media Setup
Client Initialization
To initialize, the SCCP client needs to know the IP address of the Call Manager, its
own IP address, and other information about the IP gateway and DNS servers.
Initialization takes place on the local LAN. The client sends a Dynamic Host Control
Protocol (DHCP) request to get an IP address, the DNS server address, and the TFTP
server name and address. The client needs the TFTP server name to download the
configuration file: sepmacaddr.cnf. If the TFTP name is not given, the client uses the
default filename in the IP phone. The client then downloads the configuration file
.cnf (xml) from TFTP server. CNF files contain the IP address or addresses of the
primary and secondary Cisco Call Manager. With this information, the client
contacts the Call Manager to register.
Client Registration
The SCCP client, after initialization, registers with the Call Manager over a TCP
connection on well-known default port 2000. The client registers by providing the
Call Manager with its IP address, the MAC address of the phone, and other
information, such as protocol and version. The client cannot initiate or receive calls
until it is registered. Keepalive messages keep this TCP connection open between
the client and Call Manager so that the client can initiate or receive calls at any time,
provided that a policy on the security device allows this.
Table 4 lists SCCP messages and indicates messages that are of interest to the
security device.
84 About SCCP
Chapter 4: Skinny Client Control Protocol Application Layer Gateway
Call Setup
IP phone-to-IP phone call-setup using SCCP is always handled by the Call Manager.
Messages for call setup are sent to the Call Manager, which returns messages
appropriate to the status of the call. If call setup is successful, and a policy on the
security device allows the call, the Call Manager sends the media setup messages to
the client.
Media Setup
The Call Manager sends the IP address and port number of the called party to the
calling party. The Call Manager also sends the media IP address and port number of
the calling party to the called party. After media setup, media is transmitted directly
between clients. When the call ends, the Call Manager is informed and terminates
the media streams. At no time during this process does the Call Manager hand over
call-setup function to the client. Media is streamed directly between clients through
RTP/UDP/IP.
About SCCP 85
Concepts & Examples ScreenOS Reference Guide
86 About SCCP
Chapter 4: Skinny Client Control Protocol Application Layer Gateway
SCCP Messages
Table 5, Table 6, Table 7, and Table 8 list the SCCP call message IDs in the four
intervals allowed by the security device.
Message Range
#define STATION_REGISTER_MESSAGE 0x00000001
#define STATION_IP_PORT_MESSAGE 0x00000002
#define STATION_ALARM_MESSAGE 0x00000020
#define STATION_OPEN_RECEIVE_CHANNEL_ACK 0x00000022
Message Range
#define STATION_START_MEDIA_TRANSMISSION 0x00000001
#define STATION_STOP_MEDIA_TRANSMISSION 0x00000002
#define STATION_CALL_INFO_MESSAGE 0x00000020
#define STATION_OPEN_RECEIVE_CHANNEL_ACK 0x00000022
#define STATION_CLOSE_RECEIVE_CHANNEL 0x00000106
Message Range
#define STATION_REGISTER_TOKEN_REQ_MESSAGE 0x00000029
#define STATION_MEDIA_TRANSMISSION_FAILURE 0x0000002A
#define STATION_OPEN_MULTIMEDIA_RECEIVE_CHANNEL_ACK 0x00000031
Message Range
#define STATION_OPEN_MULTIMEDIA_RECEIVE_CHANNEL 0x00000131
#define STATION_START_MULTIMEDIA_TRANSMISSION 0x00000132
#define STATION_STOP_MULTIMEDIA_TRANSMISSION 0x00000133
#define STATION_CLOSE_MULTIMEDIA_RECEIVE_CHANNEL 0x00000136
Examples
This section contains the following sample scenarios:
Examples 87
Concepts & Examples ScreenOS Reference Guide
ethernet1 ethernet3
10.1.1.1/24 1.1.1.1/24
Trust Untrust
Security Device
LAN Internet
Virtual Device
phone1 MIP on ethernet3 phone2
CM/TFTP Server 1.1.1.2 -> 10.1.1.4
10.1.1.4 10.1.1.3 1.1.1.4
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
OK:
Zone: Trust
Static IP: (select this option when present)
IP Address/Netmask: 10.1.1.1/24
Enter the following, then click OK:
Interface Mode: route
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Zone: Untrust
IP Address/Netmask: 1.1.1.1/24
Interface Mode: Route
88 Examples
Chapter 4: Skinny Client Control Protocol Application Layer Gateway
2. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select) any
Destination Address:
Address Book Entry: (select) phone2
Service: SCCP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): None (Use Egress Interface IP)
Examples 89
Concepts & Examples ScreenOS Reference Guide
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), phone2
Destination Address:
Address Book Entry: (select), MIP(1.1.1.2)
Service: SCCP
Action: Permit
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 route
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface ethernet3 route
2. Addresses
set address trust phone1 10.1.1.3/24
set address untrust phone2 1.1.1.4/24
set address trust cm-tftp_server 10.1.1.4/24
3. MIP
set interface ethernet3 mip 1.1.1.2 host 10.1.1.4
4. Policies
set policy from trust to untrust any phone2 sccp nat src permit
set policy from untrust to trust phone2 mip(1.1.1.2) sccp permit
save
NOTE: It is always more secure to specify a service explicitly, as shown in this example
configuration, than to use the keyword any.
90 Examples
Chapter 4: Skinny Client Control Protocol Application Layer Gateway
Trust Untrust
Security Device
Internet
LAN
CM/TFTP Server
phone1 phone2 1.1.1.3
10.1.1.3 1.1.1.4
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Examples 91
Concepts & Examples ScreenOS Reference Guide
IP Address/Domain Name:
IP/Netmask: (select), 1.1.1.3/24
Zone: Untrust
3. Policies
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select) phone1
Destination Address
Address Book Entry: (select) any
Service: SCCP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): None (Use Egress Interface IP)
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 route
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface ethernet3 route
2. Addresses
set address trust phone1 10.1.1.3/24
set address untrust phone2 1.1.1.4/24
set address untrust cm-tftp_server 1.1.1.3/24
3. Policies
set policy from trust to untrust phone1 any sccp nat src permit
save
NOTE: It is always more secure to specify a service explicitly, as shown in this example
configuration, than to use the keyword any.
92 Examples
Chapter 4: Skinny Client Control Protocol Application Layer Gateway
Untrust
phone2
1.1.1.4 Internet
CM/TFTP Server
ethernet3 2.2.2.4
1.1.1.1/24
ethernet2
2.2.2.2/24
DMZ
Security Device
LAN
ethernet1
10.1.1.1/24
LAN
phone1
10.1.1.3
Trust
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Zone: Trust
Static IP: (select when this option is present)
IP Address/Netmask: 10.1.1.1/24
Enter the following, then click OK:
Interface Mode: NAT
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Examples 93
Concepts & Examples ScreenOS Reference Guide
2. Address
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), phone1
Destination Address:
Address Book Entry: (select), CM-TFTP_Server
Service: SCCP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: Enable
(DIP on): None (Use Egress Interface IP)
Policies > (From: Untrust, To: DMZ) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), phone2
Destination Address:
Address Book Entry: (select), CM-TFTP_Server
Service: SCCP
Action: Permit
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), phone1
Destination Address:
Address Book Entry: (select), phone2
94 Examples
Chapter 4: Skinny Client Control Protocol Application Layer Gateway
Service: SCCP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: Enable
(DIP on): None (Use Egress Interface IP)
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 route
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface ethernet3 route
set interface ethernet2 zone dmz
set interface ethernet2 ip 2.2.2.2/24
set interface ethernet2 route
2. Addresses
set address trust phone1 10.1.1.3/24
set address untrust phone2 1.1.1.4/24
set address dmz cm-tftp_server 2.2.2.4
3. Policies
set policy from trust to dmz phone1 cm-tftp_server sccp nat src permit
set policy from untrust to dmz phone2 cm-tftp_server sccp permit
set policy from trust to untrust phone1 phone2 sccp nat src permit
save
NOTE: It is always more secure to specify a service explicitly, as shown in this example
configuration, than to use the keyword any.
Examples 95
Concepts & Examples ScreenOS Reference Guide
Untrust
phone1 phone2
1.1.1.4 1.1.2.4
Internet
ehternet4 ehternet3
1.1.1.1/24 1.1.2.1/24
loopback 1
1.1.4.1/24
Security Device
MIP on loopback 1
1.1.4.5 -> 10.1.1.5
ehternet1
10.1.1.1/24
CM/TFTP Server
10.1.1.5 LAN
Trust
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Zone: Trust
Static IP: (select when this option is present)
IP Address/Netmask: 10.1.1.1/24
Network > Interfaces > Edit (for ethernet4): Enter the following, then click
OK:
Zone: Untrust
Static IP: (select when this option is present)
IP Address/Netmask: 1.1.1.1/24
96 Examples
Chapter 4: Skinny Client Control Protocol Application Layer Gateway
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Zone: Untrust
Static IP: (select when this option is present)
IP Address/Netmask: 1.1.2.1/24
Network > Interfaces > New Loopback IF: Enter the following, then click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Network > Interfaces > Edit (for ethernet4): Enter the following, then click
OK:
Examples 97
Concepts & Examples ScreenOS Reference Guide
Source Address:
Address Book Entry: (select), CM-TFTP_Server
Destination Address:
Address Book Entry: (select), Any
Service: SCCP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: Enable
(DIP on): None (Use Egress Interface IP)
Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), MIP(1.1.4.5)
Service: SCCP
Action: Permit
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 route
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.2.1/24
set interface ethernet3 route
set interface ethernet4 zone untrust
set interface ethernet4 ip 1.1.1.1/24
set interface ethernet4 route
set interface loopback.1 zone untrust
set interface loopback.1 ip 1.1.4.1/24
set interface loopback.1 route
2. Addresses
set address trust cm-tftp_server 10.1.1.5/32
set address untrust phone1 1.1.1.4/32
set address untrust phone2 1.1.2.4/32
3. Loopback Group
set interface ethernet3 loopback-group loopback.1
set interface ethernet4 loopback-group loopback.1
98 Examples
Chapter 4: Skinny Client Control Protocol Application Layer Gateway
4. MIP
set interface loopback.1 mip 1.1.4.5 host 10.1.1.5
5. Blocking
unset zone untrust block
6. Policies
set policy from trust to untrust cm/tftp_server any sccp nat src permit
set policy from untrust to trust any mip(1.1.4.5) sccp permit
save
NOTE: Although, in this example, you unset blocking in the Untrust zone to allow
intrazone communication, you can accomplish the same thing by creating the
following policy:
Note, also, that it is always more secure to specify a service explicitly, as shown in
this example configuration, than to use the keyword any.
ethernet2
phone2 10.1.2.1/24
10.1.2.2
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Zone: Trust
Static IP: (select when this option is present)
IP Address/Netmask: 10.1.1.1/24
Examples 99
Concepts & Examples ScreenOS Reference Guide
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
Apply:
Zone: Trust
Static IP: (select when this option is present)
IP Address/Netmask: 10.1.2.1/24
Enter the following, then click OK:
Interface Mode: route
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Zone: Untrust
Static IP: (select when this option is present)
IP Address/Netmask: 3.3.3.3/24
2. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), CM/TFTP Server
Service: SCCP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
100 Examples
Chapter 4: Skinny Client Control Protocol Application Layer Gateway
NAT:
Source Translation: Enable
(DIP on): None (Use Egress Interface IP)
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet2 zone trust
set interface ethernet2 ip 10.1.2.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 3.3.3.3/24
set interface ethernet3 route
2. Addresses
set address trust phone1 10.1.1.3/24
set address trust phone2 10.1.2.2/24
set address untrust cm-tftp_server 3.3.3.4/24
3. Policies
set policy from trust to untrust any cm-tftp_server sccp nat src permit
save
NOTE: It is always more secure to specify a service explicitly, as shown in this example
configuration, than to use the keyword any.
NOTE: The security devices used in this example must have at least three independently
configurable interfaces available.
Examples 101
Concepts & Examples ScreenOS Reference Guide
Trust
eth2/8-10.1.3.1
tunnel.1 tunnel 2
Central
6.6.6.6 7.7.7.7
Untrust eth2/1: Untrust
1.1.1.1 eth2/2-1.1.2.1
Untrust
Untrust eth3
eth3-2.2.2.2.
3.3.3.3
tunnel.1 interface tunnel.2 interface
Branch-1 VPN 3 unnumbered
unnumbered Branch-2
NOTE: It is always more secure to explicitly specify a service, as shown in this example
configuration, than to use the keyword any.
Zone: Untrust
Static IP: (select when this option is present)
IP Address/Netmask: 1.1.1.1/24
Network > Interfaces > Edit (for ethernet2/2): Enter the following, then click
Apply:
Zone: Untrust
Static IP: (select when this option is present)
IP Address/Netmask: 1.1.2.1/24
102 Examples
Chapter 4: Skinny Client Control Protocol Application Layer Gateway
Network > Interfaces > Edit (for ethernet2/8): Enter the following, then click
Apply:
Zone: Trust
Static IP: (select when this option is present)
IP Address/Netmask: 10.1.3.1/24
Enter the following, then click OK:
Interface mode: route
Network > Interfaces > New Tunnel IF: Enter the following, then click Apply:
Network > Interfaces > New Tunnel IF: Enter the following, then click Apply:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
Examples 103
Concepts & Examples ScreenOS Reference Guide
VPNs > AutoKey IKE > New: Enter the following, then click OK:
Network > Routing > Destination> New: Enter the following, then click OK:
Policies > (From: Untrust, To: Trust) > New: Enter the following, then click OK:
104 Examples
Chapter 4: Skinny Client Control Protocol Application Layer Gateway
3. VPN
set ike gateway to-branch-1 address 3.3.3.3 main outgoing-interface ethernet2/1
preshare netscreen sec-level standard
set ike gateway to-branch-2 address 2.2.2.2 main outgoing-interface ethernet2/2
preshare netscreen sec-level standard
set vpn vpn_branch-1 gateway to-branch-1 no-reply tunnel idletime 0 sec-level
standard
set vpn vpn-branch-1 id 1 bind interface tunnel.1
set vpn vpn-branch-2 gateway to-branch-2 no-reply tunnel idletime 0 sec-level
standard
set vpn vpn-branch-2 id 2 bind interface tunnel.2
4. Routing
set route 10.1.2.0/24 interface tunnel.2
set route 10.1.1.0/24 interface tunnel.1
5. Policies
set policy from trust to untrust cm-tftp_server any sccp permit
set policy from untrust to trust any cm-tftp_server sccp permit
save
Zone: Trust
Static IP: (select when this option is present)
IP Address/Netmask: 10.1.1.1/24
Interface mode: route
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
Apply:
Zone: Untrust
Static IP: (select when this option is present)
IP Address/Netmask: 3.3.3.3/24
Network > Interfaces > Edit (for ethernet4): Enter the following, then click
Apply:
Zone: Untrust
Static IP: (select when this option is present)
IP Address/Netmask: 4.4.4.4/24
Network > Interfaces > New Tunnel IF: Enter the following, then click Apply:
Network > Interfaces > New Tunnel IF: Enter the following, then click Apply:
Examples 105
Concepts & Examples ScreenOS Reference Guide
2. Address
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
Network > Routing > Destination > New: Enter the following, then click OK:
106 Examples
Chapter 4: Skinny Client Control Protocol Application Layer Gateway
5. Policies
Policies > (From: Trust, To: Untrust) > New: Enter the following, then click OK:
Policies > (From: Untrust, To: Trust) > New: Enter the following, then click OK:
Examples 107
Concepts & Examples ScreenOS Reference Guide
Zone: Trust
Static IP: (select when this option is present)
IP Address/Netmask: 10.1.2.1/24
Enter the following, then click OK:
Interface mode: route
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
Apply:
Zone: Untrust
Static IP: (select when this option is present)
IP Address/Netmask: 2.2.2.2/24
Network > Interfaces > Edit (for ethernet4): Enter the following, then click
Apply:
Zone: Untrust
Static IP: (select when this option is present)
IP Address/Netmask: 4.4.4.4/24
Network > Interfaces > New Tunnel IF: Enter the following, then click Apply:
Network > Interfaces > New Tunnel IF: Enter the following, then click Apply:
108 Examples
Chapter 4: Skinny Client Control Protocol Application Layer Gateway
VPNs > AutoKey IKE > New: Enter the following, then click OK:
VPNs > AutoKey Advanced > Gateway > New: Enter the following, then click
OK:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
Network > Routing > Destination > New: Enter the following, then click OK:
Policies > (From: Untrust, To: Trust) > New: Enter the following, then click OK:
Examples 109
Concepts & Examples ScreenOS Reference Guide
110 Examples
Chapter 5
Apple iChat Application Layer Gateway
This chapter describes the Apple iChat application and provides examples for
configuring the AppleiChat Application Layer Gateway (ALG) on a Juniper Networks
security device. It contains the following sections:
Overview
Apple iChat is an Instant Messaging (IM) application that lets you chat with other
iChat, Mac, or AOL Instant Messenger (AIM) users over the Internet using text,
audio, or video. ScreenOS currently supports iChat applications up to version 3.15.
The iChat application uses standard ports to send data to its servers and clients. The
AppleiChat ALG provides support for iChat applications by opening pinholes on
Juniper Networks security device, thereby allowing the text, audio, and video calls
to pass through the security device. Without the AppleiChat ALG, the ports are
blocked and need to be opened manually, which exposes the network to attack on
these ports.
Table 9 shows the standard ports iChat uses for various services.
Port
Number Service Name Protocol Used For
5190 AOL TCP iChat and AOL instant messenger, file
transfer
5678 SNATMAP server UDP Determining the external Internet
addresses of hosts.
5060 Session Initiation Protocol UDP/TCP Initiating audio/video (AV) chat invitations.
(SIP)
16384 Real-Time Transport UDP iChat audio RTP/RTCP video RTP/RTCP
16403 Protocol (RTP) /Real-Time
Control Protocol (RTCP)
Overview 111
Concepts & Examples ScreenOS Reference Guide
The iChat service uses the AOL and SIP protocols for its audio/video operations. It
uses the AIM protocol to connect to servers. SIP is used for setting audio/video
sessions between IM clients after they successfully negotiate ports. The SIP ALG
creates pinholes for audio/video sessions. SIP is a predefined service in ScreenOS
and uses port 5060 as the destination port. During iChat operation, the security
device creates separate sessions for AOL and SIP.
NOTE: The ALG does not open all ports when you enable the AppleiChat ALG on the
security device. ALG opens pinholes only for the ports that are exchanged during
iChat signaling messages.
The number of iChat sessions that the security device can handle is limited to the
maximum number of Network Address Translation (NAT) cookies available for that
particular security device.
NOTE: The NAT cookies available for a security device are shared by other ALGs like
H.323 and P2P ALG.
You can view the maximum number of NAT cookies available for a particular device
using the following CLI command:
WebUI
Security>ALG>Apple iChat. Select the following, then click Apply:
CLI
set alg appleichat enable
When you enable the AppleiChat ALG functionality, the security device opens
pinholes for the configured call-answer-time to establish the iChat audio/video
session. The call-answer-time is the duration of time for which the security device
opens the pinholes for establishing iChat audio/video session. The default value of
call-answer-time is 32 seconds. When this timer expires, the device closes the
pinholes. The range for configuring the call-answer-time is 20 to 90 seconds.
WebUI
Security>ALG>AppleiChat. Enter the following, then click Apply:
Call-Answer-Time: 30
CLI
set alg appleichat call-answer-time 30
The iChat application fragments the packets it sends to the receiver based on the
maximum segment size (MSS) of the receiver. The MSS is the maximum amount of
data, in bytes, a device can receive as a single unfragmented frame. The MSS value
depends on the network configuration of the receiver. The fragmented packet is
reassembled at the ALG for address translation. By default, the reassembly option is
disabled. You can enable reassembly with the WebUI or the CLI.
WebUI
Security>ALG>AppleiChat. Select the following, then click Apply:
CLI
set alg appleichat reassembly enable
Configuration Examples
This section includes the following configuration scenarios:
One iChat user on a private network, another iChat user on a public network,
and an iChat server on a public network
Ethernet Ethernet
NAT
NOTE: Because the administrator does not know the IP address details initially, we
recommend that the user put "ANY" in the destination address field of the policy.
WebUI
1. Configuration for Logging into the Server in NAT Mode
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
Address Book Entry: (select), ANY
Service: (select) AppleiChat
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): (select)
2. Configuration for File Transfer from iChat UserA to iChat UserB in NAT Mode
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
Address Book Entry: (select), iChatserver_IP_range
Service: (select) AppleiChat
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): (select)
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserB
Destination Address
Address Book Entry: (select), ANY
Service: (select) AppleiChat
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): (select)
3. Configuration for Making Audio/Video Calls from iChat UserB in NAT Mode
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
Address Book Entry: (select), iChatserver_IP_range
Service: (select) AppleiChat
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): (select)
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
Address Book Entry: (select), iChat UserB
Service: (select) AppleiChat
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): (select)
4. Configuration for Making Audio/Video Calls from iChat UserB in Route Mode
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
Address Book Entry: (select), iChatserver_IP_range
Service: (select) AppleiChat
Action: Permit
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
Address Book Entry: (select), iChat UserB
Service: (select) AppleiChat
Action: Permit
5. Configuration for Making Audio/Video Calls from iChat UserA in NAT Mode
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): (select)
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
Address Book Entry: (select), iChat UserB
Service: (select) AppleiChat
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): (select)
6. Configuration for Making Audio/Video Calls from iChat UserA in Route Mode
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
Address Book Entry: (select), iChatserver_IP_range
Service: (select) AppleiChat
Action: Permit
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
Address Book Entry: (select), iChat UserB
Service: (select) AppleiChat
Action: Permit
CLI
1. Configuration for Logging into the Server in NAT Mode
set policy from trust to untrust "ichatUserA" "ANY" apple-ichat nat src permit
OR
NOTE: Policies for route/transparent mode are same except the "nat src" option in policy.
2. Configuration for File Transfer from iChat UserA to iChat UserB in NAT Mode
set policy from trust to untrust "ichatUserA" "ANY" apple-ichat nat src permit
OR
OR
OR
OR
OR
OR
iChat UserA
iChat Server
Juniper Networks Security Device
iChat UserB
WebUI
1. Configuring iChat userA to Log In iChat server in NAT Mode
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
Address Book Entry: (select), any
Service: AppleiChat
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): (select)
2. Configuration for File Transfer from iChat UserA to iChat UserB
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
Address Book Entry: (select), iChatserver_IP_range
Service: (select) AppleiChat
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): (select)
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserB
Destination Address
Address Book Entry: (select), ANY
Service: (select) AppleiChat
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): (select)
3. Configuration for Making Audio/Video Calls from iChat UserA in NAT Mode
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
Address Book Entry: (select), ANY
Service: (select) AppleiChat
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): (select)
4. Configuration for Making Audio/Video Calls from iChat UserA in Route Mode
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
Address Book Entry: (select), ichatServer
Service: (select) AppleiChat
Action: Permit
5. Configuration for Making Audio/Video Calls from iChat UserB in NAT Mode
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserB
Destination Address
Address Book Entry: (select), iChatServer
Service: (select) AppleiChat
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): (select)
6. Configuration for Making Audio/Video Calls from iChat UserB in Route Mode
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserB
Destination Address
Address Book Entry: (select), iChatServer
CLI
1. Configuring iChat UserA to Log Into iChat Server in NAT Mode
set policy from trust to untrust "ichatUserA" "ANY" apple-ichat nat src permit
OR
OR
OR
OR
Ethernet
NAT
Ethernet
iChat Server
iChat User B NAT
Device B
iChat User C
WebUI
1. Configuration on Firewall 1 for Login from iChat UserA in NAT Mode
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
Address Book Entry: (select), any
Service: (select) AppleiChat
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): (select)
2. Configuration on Firewall 1 for File Transfer from iChat UserA to iChat UserB in NAT
Mode
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
Address Book Entry: (select), iChatserver_IP_range
Service: (select) AppleiChat
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): (select)
3. Configuration on Firewall 1 for Making Audio/Video Calls from iChat UserA in NAT
Mode
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
Address Book Entry: (select), iChatserver_IP_range
Service: (select) AppleiChat
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): (select)
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
Address Book Entry: (select), iChat UserB
Service: (select) AppleiChat
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): (select)
4. Configuration on Firewall 1 for Making Audio/Video Calls from iChat UserA in Route
Mode
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserA
Destination Address
Address Book Entry: (select), iChatserver_IP_range
Service:(select) AppleiChat
Action: Permit
5. Configuration on Firewall 2 for Making Audio/Video Calls from iChat UserB in NAT
Mode
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserB
Destination Address
Address Book Entry: (select), iChat server
Service: (select) AppleiChat
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): (select)
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserB
Destination Address
Address Book Entry: (select), ichatUserA_public
Service: (select) AppleiChat
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): (select)
6. Configuration on Firewall 2 for Making Audio/Video Calls from iChat UserB in Route
Mode
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserB
Destination Address
Address Book Entry: (select), iChatserver_IP_range
Service:(select) AppleiChat
Action: Permit
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address
Address Book Entry: (select), iChat UserB
Destination Address
Address Book Entry: (select), iChatserver_IP_range
Service:(select) AppleiChat
Action: Permit
CLI
1. Configuration on Firewall 1 for Login from iChat UserA in NAT Mode
set policy from trust to untrust "ichatUserA" "ANY" apple-ichat nat src permit
OR
OR
3. Configuration on Firewall 1 for Making Audio/Video calls from iChat UserA in NAT
mode
set policy from trust to untrust "ichatUserA" "ANY" apple-ichat nat src permit
OR
OR
OR
OR
R
reassembly, Apple iChat ALG .....................................113
Registration Confirm (RCF) messages ...........................2
S
SDP .........................................................................19 to 20
service book, service groups (WebUI) .........................65
SIP
ALG .....................................................................19, 22
connection information ..........................................20
defined .....................................................................15
media announcements ...........................................20
messages ..................................................................16
multimedia sessions ...............................................15
pinholes ....................................................................19
request methods .....................................................16
Index IX-I
Concepts & Examples ScreenOS Reference Guide
IX-II Index
Concepts & Examples
ScreenOS Reference Guide
Volume 7:
Routing
Juniper Networks, the Juniper Networks logo, JUNOS, NetScreen, ScreenOS, and Steel-Belted Radius are registered trademarks of Juniper Networks, Inc.
in the United States and other countries. JUNOSe is a trademark of Juniper Networks, Inc. All other trademarks, service marks, registered trademarks, or
registered service marks are the property of their respective owners.
All specifications are subject to change without notice. Juniper Networks assumes no responsibility for any inaccuracies in this document or for any
obligation to update information in this document. Juniper Networks reserves the right to change, modify, transfer, or otherwise revise this publication
without notice.
FCC Statement
The following information is for FCC compliance of Class A devices: This equipment has been tested and found to comply with the limits for a Class A
digital device, pursuant to part 15 of the FCC rules. These limits are designed to provide reasonable protection against harmful interference when the
equipment is operated in a commercial environment. The equipment generates, uses, and can radiate radio-frequency energy and, if not installed and
used in accordance with the instruction manual, may cause harmful interference to radio communications. Operation of this equipment in a residential
area is likely to cause harmful interference, in which case users will be required to correct the interference at their own expense.
The following information is for FCC compliance of Class B devices: The equipment described in this manual generates and may radiate radio-frequency
energy. If it is not installed in accordance with Juniper Networks’ installation instructions, it may cause interference with radio and television reception.
This equipment has been tested and found to comply with the limits for a Class B digital device in accordance with the specifications in part 15 of the FCC
rules. These specifications are designed to provide reasonable protection against such interference in a residential installation. However, there is no
guarantee that interference will not occur in a particular installation.
If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user
is encouraged to try to correct the interference by one or more of the following measures:
Connect the equipment to an outlet on a circuit different from that to which the receiver is connected.
Caution: Changes or modifications to this product could void the user's warranty and authority to operate this device.
Disclaimer
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED
WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED
WARRANTY, CONTACT YOUR JUNIPER NETWORKS REPRESENTATIVE FOR A COPY.
ii
Table of Contents
About This Volume ix
Document Conventions.................................................................................... x
Web User Interface Conventions .............................................................. x
Command Line Interface Conventions ...................................................... x
Naming Conventions and Character Types .............................................. xi
Illustration Conventions .......................................................................... xii
Requesting Technical Support ........................................................................ xii
Self-Help Online Tools and Resources..................................................... xiii
Opening a Case with JTAC ...................................................................... xiii
Document Feedback ..................................................................................... xiii
Chapter 2 Routing 13
Overview ....................................................................................................... 14
Virtual Router Routing Tables......................................................................... 15
Destination-Based Routing Table ............................................................. 16
Source-Based Routing Table .................................................................... 17
Source Interface-Based Routing Table...................................................... 19
Creating and Modifying Virtual Routers.......................................................... 21
Modifying Virtual Routers ........................................................................ 21
Assigning a Virtual Router ID ................................................................... 22
Forwarding Traffic Between Virtual Routers ............................................ 23
Configuring Two Virtual Routers .............................................................. 23
Creating and Deleting Virtual Routers...................................................... 25
Creating a Custom Virtual Router ...................................................... 26
Deleting a Custom Virtual Router ...................................................... 26
Virtual Routers and Virtual Systems......................................................... 26
Creating a Virtual Router in a Vsys ....................................................27
Sharing Routes Between Virtual Routers ........................................... 28
iv Table of Contents
Table of Contents
Table of Contents v
Concepts & Examples ScreenOS Reference Guide
vi Table of Contents
Table of Contents
Routing..................................................................................................139
PBR Elements........................................................................................140
Extended Access Lists .....................................................................140
Match Groups..................................................................................141
Action Group...................................................................................141
PBR Policies ....................................................................................142
Interface Binding ...................................................................................142
Advanced PBR with High Availability and Scalability....................................142
Resilient PBR Solution ...........................................................................142
Scalable PBR Solution ............................................................................143
Index..........................................................................................................................IX-I
Chapter 1, “Static Routing,” explains route tables and how to configure static
routes for destination-based routing, source interface-based routing, or
source-based routing.
Chapter 3, “Open Shortest Path First,” describes how to configure the OSPF
dynamic routing protocol on security devices.
ix
Concepts & Examples ScreenOS Reference Guide
Document Conventions
This document uses the conventions described in the following sections:
The following example shows the WebUI path and parameters for defining an
address:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
To open Online Help for configuration settings, click the question mark (?) in the
upper left of the screen.
The navigation tree also provides a Help > Config Guide configuration page to help
you configure security policies and Internet Protocol Security (IPSec). Select an
option from the list, and follow the instructions on the page. Click the ? character in
the upper left for Online Help on the Config Guide.
In text, commands are in boldface type and variables are in italic type.
In examples:
x Document Conventions
About This Volume
If there is more than one choice, each choice is separated by a pipe ( | ). For
example, the following command means “set the management options for the
ethernet1, the ethernet2, or the ethernet3 interface”:
NOTE: When entering a keyword, you only have to type enough letters to identify the
word uniquely. Typing set adm u whee j12fmt54 will enter the command set
admin user wheezer j12fmt54. However, all the commands documented in this
guide are presented in their entirety.
If a name string includes one or more spaces, the entire string must be
enclosed within double quotes; for example:
Any leading spaces or trailing text within a set of double quotes are trimmed;
for example, “ local LAN ” becomes “local LAN”.
NOTE: A console connection only supports SBCS. The WebUI supports both SBCS and
MBCS, depending on the character sets that your browser supports.
Document Conventions xi
Concepts & Examples ScreenOS Reference Guide
Illustration Conventions
Figure 1 shows the basic set of images used in illustrations throughout this volume.
Policy Engine
Security Zone Interfaces:
White = Protected Zone Interface
(example = Trust Zone)
Black = Outside Zone Interface
(example = Untrust Zone)
Generic Network Device
Tunnel Interface
Server
VPN Tunnel
Router
Juniper Networks
Switch Security Devices
Hub
Download the latest versions of software and review your release notes—
http://www.juniper.net/customers/csc/software/
To verify service entitlement by product serial number, use our Serial Number
Entitlement (SNE) Tool—
https://tools.juniper.net/SerialNumberEntitlementSearch/
Document Feedback
If you find any errors or omissions in this document, contact Juniper Networks at
[email protected].
This chapter discusses static routing and explains when and how to set up static
routes. It contains the following sections:
“Overview” on page 2
1
Concepts & Examples ScreenOS Reference Guide
Overview
A static route is a manually configured mapping of an IP network address to a
next-hop destination (another router) that you define on a Layer 3 forwarding
device, such as a router.
For a network that has few connections to other networks, or for networks where
inter-network connections are relatively unchanging, it is usually more efficient to
define static routes rather than dynamic routes. ScreenOS retains static routes until
you explicitly remove them. However, you can override static routes with dynamic
route information if necessary.
You can view static routes in the ScreenOS routing table. To force load-balancing,
you can configure Equal Cost Multi-Path (ECMP). To only use active gateways, you
can set gateway tracking.
You should set at least a null route as a default route (network address 0.0.0.0/0). A
default route is a catch-all entry for packets that are destined for networks other
than those defined in the routing table.
NOTE: The most specific route is determined by first performing a bit-wise logical AND of
the destination address and network mask for each entry in the routing table. For
example, a bit-wise logical AND of the IP address 10.1.1.1 with the subnet mask
255.255.255.0 is 10.1.1.0. The route that has the highest number of bits set to 1
in the subnet mask is the most specific route (also called the “longest matching
route”).
Figure 2 represents a network that uses static routing and a sample IP packet. In
this example, host 1 in network A wants to reach host 2 in network C. The packet to
be sent contains the following data in the header:
Source IP address
Destination IP address
Payload (message)
2 Overview
Chapter 1: Static Routing
Router X
In Table 1, router X has a static route configured for network C with the gateway
(next-hop) as router Y. When router X receives the packet destined for host 2 in
network C, it compares the destination address in the packet with its routing table
and finds that the last route entry in the table is the most specific route to the
destination address. The last route entry specifies to send traffic destined for
network C to router Y for delivery. Router Y receives the packet, and, because it
knows that network C is directly connected, it sends the packet through the
interface connected to that network.
If router Y fails, or if the link between router Y and network C is unavailable, the
packet cannot reach host 2. While there is another route for network C through
router Z, that route has not been statically configured on router X, so router X does
not detect the alternate route.
You need to define a static route to add a default route (0.0.0.0/0) to the routing
table for a virtual router (VR). For example, if you are using two VRs on the
same security device, the trust-vr routing table could contain a default route
that specifies the untrust-vr as the next hop. This allows traffic for destinations
that are not in the trust-vr routing table to be routed to the untrust-vr. You can
also define a default route in the untrust-vr to route to a specific IP address
traffic for destinations not found in the untrust-vr routing table.
Overview 3
Concepts & Examples ScreenOS Reference Guide
If you are using two VRs on the same security device, and inbound traffic
arrives on an untrust-vr interface that is destined for a network connected to a
trust-vr interface, you need to define a static entry in the untrust-vr routing
table for the destination network with the trust-vr as the next hop. You can
avoid setting a static route in this case by exporting the routes in the trust-vr to
the untrust-vr.
When the device is in transparent mode, you must define static routes that
direct management traffic originating from the device itself (as opposed to user
traffic traversing the firewall) to remote destinations. For example, you need to
define static routes directing syslog, SNMP, and WebTrends messages to a
remote administrator’s address. You must also define routes that direct
authentication requests to the RADIUS, SecurID, and LDAP servers, and URL
checks to the Websense server.
NOTE: When the security device is in Transparent mode, you must define a static route
for management traffic from the device even if the destination is on the same
subnet as the device.
For outbound Virtual Private Network (VPN) traffic where there is more than
one outgoing interface to the destination, you need to set a route for directing
the outbound traffic through the desired interface to the external router.
If an interface for a security zone in the trust-vr is NAT, and if you configured a
mapped IP (MIP) or virtual IP (VIP) on that interface to receive incoming traffic
from a source in the untrust-vr routing domain, then you must create a route to
the MIP or VIP in the untrust-vr that points to the trust-vr as the gateway.
By default, the security device uses destination IP addresses to find the best
route on which to forward packets. You can also enable source-based or source
interface-based routing tables on a VR. Both source-based and source
interface-based routing tables contain static routes that you configure on the
VR.
4 Overview
Chapter 1: Static Routing
Next hop for the route, which can be either another VR on the security device
or a gateway (router) IP address. If you specify another VR, make sure that an
entry for the destination network exists in the routing table of that VR.
The interface through which the routed traffic is forwarded. The interface can
be any ScreenOS-supported interface, such as a physical interface (for example,
ethernet1/2) or a tunnel interface. You can also specify the Null interface for
certain applications. See “Forwarding Traffic to the Null Interface” on page 10.
Route metric is used to select the active route when there are multiple routes to
the same destination network, all with the same preference value. The default
metric for static routes is 1.
Route tag is a value that can be used as a filter when redistributing routes. For
example, you can choose to import into a VR only those routes that contain
specified tag values.
Preference value for the route. By default, all static routes have the same
preference value, which is set in the VR.
Whether the route is permanent (kept active even if the forwarding interface is
down or the IP address is removed from the interface).
NOTE: The following zones must be bound before this example can be completed:
ethernet1 to the Trust zone, ethernet2 to the DMZ zone, and ethernet3 to the
Untrust zone. The interface IP addresses are 10.1.1.1/24, 2.2.10.1/24, and
2.2.2.1/24, respectively.
Overview 5
Concepts & Examples ScreenOS Reference Guide
The trust-vr and untrust-vr routing tables must contain routes for the following
destinations:
untrust-vr
1. Default gateway to the Internet (default route for the VR)
trust-vr
5. untrust-vr for all addresses not found in the trust-vr routing table (default route
for the VR)
2.2.10.0/24 4
200.20.2.2/24 2.2.40.1/24
2.20.30.0/24
2.2.2.2/24 3.3.3.1/24 3 2.2.40.0/24
2.2.2.3/24
2.2.2.0/24 2.20.30.2/24
2.2.45.7/32 2.20.3.1/24
2.20.4.1/24
2.20.3.0/24 2.20.4.0/24
5
Default Security Device
Route
= Router
Trust Zone
6 Overview
Chapter 1: Static Routing
WebUI
1. untrust-vr
Network > Routing > Destination > untrust-vr New: Enter the following to
create the untrust default gateway, then click OK:
Network > Routing > Destination> untrust-vr New: Enter the following to
direct system reports generated by the security device to remote management,
then click OK:
Network > Routing > Destination > untrust-vr New: Enter the following, then
click OK:
Network > Routing > Destination > untrust-vr New: Enter the following, then
click OK:
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
Overview 7
Concepts & Examples ScreenOS Reference Guide
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
NOTE: To remove an entry, click Remove. A message appears prompting you to confirm
the removal. Click OK to proceed or Cancel to cancel the action.
CLI
1. untrust-vr
set vrouter untrust-vr route 0.0.0.0/0 interface ethernet3 gateway 2.2.2.2
set vrouter untrust-vr route 3.3.3.0/24 interface ethernet3 gateway 2.2.2.3
set vrouter untrust-vr route 2.2.40.0/24 interface ethernet2 gateway 2.2.10.2
set vrouter untrust-vr route 2.20.0.0/16 interface ethernet2 gateway 2.2.10.3
2. trust-vr
set vrouter trust-vr route 0.0.0.0/0 vrouter untrust-vr
set vrouter trust-vr route 10.10.0.0/16 interface ethernet1 gateway 10.1.1.2
set vrouter trust-vr route 10.20.0.0/16 interface ethernet1 gateway 10.1.1.3
set vrouter trust-vr route 10.30.1.0/24 interface ethernet1 gateway 10.1.1.4
save
Internet
VPN Tunnel
tunnel.1 Router
10.10.1.1/24 1.1.1.250
WebUI
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
8 Overview
Chapter 1: Static Routing
NOTE: For tunnel.1 to appear in the Interface drop-down list, you must first create the
tunnel.1 interface.
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
CLI
set vrouter trust-vr route 10.2.2.5/32 interface tunnel.1
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 1.1.1.250
save
To add a static route with gateway tracking, you need to explicitly set the route at
the virtual router (VR) level and at the gateway address. The security device tracks
only the specified gateway IP and does not depend on the route interface.
NOTE: You can use gateway tracking only to track remote gateway addresses. Gateway
tracking cannot be applied for the default gateway address of your local subnet. To
enable gateway tracking on a static route, you must use the IP address, not the
interface, to identify the gateway.
Use the CLI command given below to add a static route with a tracked gateway for
IP address 1.1.1.254 with prefix 1.1.1.0 and a length of 24.
WebUI
Network > Routing > Destination: Click New, then enter the following:
IPv4/Netmask: 1.1.1.0/24
Gateway: (select)
Gateway IP Address: 1.1.1.254
CLI
set vrouter trust route 1.1.1.0/24 gateway 1.1.1.254
unset vrouter trust route 1.1.1.0/24 gateway 1.1.1.254
save
Routes with gateway tracking are only applied locally in the device, so if the device
is participating in NSRP cluster it is necessary to manually set the route in the NSRP
peer as well.
Overview 9
Concepts & Examples ScreenOS Reference Guide
In this example, you set a NULL interface for the summarized route that you created
to the network 2.1.1.0/24 in the previous example. Within the network 2.1.1.0/24
you have hosts 2.1.1.2, 2.1.1.3, and 2.1.1.4. Any packets addressed to 2.1.1.10 fall
into the range for the summarized route. The security device accepts these packets
but has nowhere to forward them except back out to the origin and this begins a
network loop. To avoid this pattern, you set a NULL interface for this route. Setting a
high preference and metric are important when setting a NULL interface.
WebUI
Network > Routing >Destination > trust-vr New: Enter the following and then
click OK:
CLI
set vrouter trust-vr route 2.1.1.0/24 interface null preference 255 metric 65535
save
This chapter describes routing and virtual router (VR) management. It contains the
following sections:
“Overview” on page 14
13
Concepts & Examples ScreenOS Reference Guide
Overview
Routing is the process of forwarding packets from one network to another toward a
final destination. A router is a device that resides where one network meets another
network and directs traffic between those networks.
By default, a security device enters the Route operational mode and operate as a
Layer-3 router. However, you can configure a security device to operate in
Transparent mode as a Layer-2 switch.
NOTE: For either operational mode, you need to manually configure some routes.
trust-vr, which by default contains all the predefined security zones and any
user-defined zones
You cannot delete the trust-vr or untrust-vr VRs. Multiple VRs can exist, but trust-vr
remains the default VR. In the VR table an asterisk (*) designates trust-vr as the
default VR in the command line interface (CLI). You can view the VR table with the
get vrouter CLI command. To configure zones and interfaces within other VRs, you
must specify the VR by name, such as untrust-vr. For more information about
zones, see “Zones” on page 2-25.
Some security devices allow you to create additional custom VRs. By separating
routing information into multiple VRs, you can control how much routing
information is visible to other routing domains. For example, you can keep the
routing information for all the security zones inside a corporate network on the
predefined VR trust-vr, and the routing information for all the zones outside the
corporate network on the other predefined VR untrust-vr. You can keep internal
network routing information separate from untrusted sources outside the company
because routing table details of one VR are not visible to the other.
14 Overview
Chapter 2: Routing
Each route table entry identifies the destination network to which traffic can be
forwarded. The destination network can be an IP network, subnetwork, supernet,
or host. Each routing table entry can be unicast (packet sent to single IP address
that references a single host machine) or multicast (packet sent to a single IP
address that references multiple host machines).
Directly connected networks (the destination network is the IP address that you
assign to an interface in Route mode)
Dynamic routing protocols, such as Open Shortest Path First (OSPF), Border
Gateway Protocol (BGP), or Routing Information Protocol (RIP)
Host routes
NOTE: When you set an IP address for an interface in Route mode, the routing table
automatically creates a connected route to the adjacent subnet for traffic
traversing the interface.
The destination-based routing table allows the security device to perform route
lookups based on the destination IP address of an incoming data packet. By
default, the security device uses only destination IP addresses to find the best
route on which to forward packets.
The source-based routing table allows the security device to perform route
lookups based on the source IP address of an incoming data packet. To add
entries to the source-based routing table, you must configure static routes for
specific source addresses on which the security device can perform route
lookup. This routing table is disabled by default. See “Source-Based Routing
Table” on page 17.
The source interface-based routing table allows the security device to perform
route lookups based on the interface on which a data packet arrives on the
device. To add entries to the source interface-based routing table, you must
configure static routes for specific interfaces on which the VR performs route
lookup. This routing table is disabled by default. See “Source Interface-Based
Routing Table” on page 19.
For each destination network, the routing table contains the following information:
The interface on the security device on which traffic for the destination network
is forwarded.
The protocol from which the route is derived. The protocol column of the
routing table allows you know the route type:
Static (S)
Auto-exported (A)
Imported (I)
Dynamic routing protocols, such as RIP (R), Open Shortest Path First or
OSPF (O), OSPF external type 1 or type 2 (E1 or E2, respectively), internal
or external Border Gateway Protocol (iB or eB, respectively)
Permanent (P)
Host (H)
A host-route entry with a 32-bit mask appears when you configure each
interface with an IP address. The host route is always active in the route
table so that route lookup always succeeds. The host routes automatically
update with configured changes, such as interface IP address deletion, and
they are never redistributed or exported. Host routes remove the possibility
of wandering traffic and conserve processing capability.
The preference is used to select the route to use when there are multiple routes
to the same destination network. This value is determined by the protocol or
the origin of the route. The lower the preference value of a route, the more
likely the route is to be selected as the active route.
You can modify the preference value for each protocol or route origin on a
per-virtual router basis. See “Route Selection” on page 30 for more information.
The metric can also be used to select the route to use when there are multiple
routes for the same destination network with the same preference value. The
metric value for connected routes is always 0. The default metric value for static
routes is 1, but you can specify a different value when defining a static route.
The virtual system (vsys) to which this route belongs. For more information
about virtual routers and vsys, see “Virtual Routers and Virtual Systems” on
page 26. In this example, no entries appear under the untrust-vr table header;
eleven entries appear under the trust-vr table header.
Most routing tables include a default route (network address 0.0.0.0/0), which is a
catch-all entry for packets that are destined for networks other than those defined
in the routing table.
The next-hop for the source-based route (If you have already specified a
default gateway for the interface with the CLI set interface interface
gateway ip_addr command, you do not need to specify the gateway
parameter; the interface’s default gateway is used as the next hop for the
source-based route. You can also specify another VR as the next-hop for the
source-based route with the set vrouter vrouter route source
ip_addr/netmask vrouter next-hop_vrouter.)
The metric for the source-based route. (If there are multiple source-based
routes with the same prefix, only the route with the lowest metric is used
for route lookup; other routes with the same prefix are marked as
“inactive.”)
2. Enable source-based routing for the VR. The security device uses the source IP
of the packet for route lookup in the source-based routing table. If no route is
found for the source IP address, the destination IP address is used for the
routing table lookup.
10.1.1.0/24 ISP 1
1.1.1.1
ethernet1
ethernet2
ISP 2
10.1.2.0/24
2.2.2.2
WebUI
Network > Routing > Source Routing > New (for trust-vr): Enter the following,
then click OK:
Network > Routing > Source Routing > New (for trust-vr): Enter the following,
then click OK:
NOTE: In the WebUI, the default preference and metric value are 1.
Network > Routing > Virtual Routers > Edit (for trust-vr): Select Enable
Source Based Routing, then click OK.
CLI
set vrouter trust-vr route source 10.1.1.0/24 interface ethernet3 gateway 1.1.1.1
metric 1
set vrouter trust-vr route source 10.1.2.0/24 interface ethernet4 gateway 2.2.2.2
metric 1
set vrouter trust-vr source-routing enable
save
You define source interface-based routes as static routes for specified source
interfaces. Source interface-based routes apply to the VR in which you configure
them, but you can also specify another VR as the next hop for a source
interface-based route. You cannot, however, export source interface-based routes
into another VR or redistribute them into a routing protocol.
The source interface on which the security device performs a lookup in the
SIBR table. (The interface appears as an entry in the routing table.)
The next-hop for the source interface-based route. (If you have already
specified a default gateway for the interface with the CLI set interface
interface gateway ip_addr command, you do not need to specify the
gateway parameter; the interface’s default gateway is used as the next hop
for the source interface-based route. You can also specify another VR as the
next-hop for the source-based route with the set vrouter vrouter route
source ip_addr/netmask vrouter next-hop_vrouter.)
The metric for the source interface-based route. (If there are multiple
source interface-based routes with the same prefix, only the route with the
lowest metric is used for route lookup; other routes with the same prefix
are marked as “inactive.”)
2. Enable SIBR for the VR. The security device uses the source interface of the
packet for route lookup in the SIBR table.
In Figure 6, traffic from users on the 10.1.1.0/24 subnetwork arrives on the security
device on the ethernet1 interface and is forwarded to ISP 1, while traffic from users
on the 10.1.2.0/24 subnetwork arrives on the device on ethernet2 and is forwarded
to ISP 2. You need to configure two entries in the default trust-vr VR routing table
and enable SIBR:
10.1.1.0/24 ISP1
1.1.1.1
ethernet1 ethernet3
ethernet2 ethernet4
ISP2
10.1.2.0/24 2.2.2.2
WebUI
Network > Routing > Source Interface Routing > New (for ethernet1): Enter
the following, then click OK:
Network > Routing > Source Interface Routing > New (for ethernet2): Enter
the following, then click OK:
NOTE: In the WebUI, the default preference and metric value are 1.
Network > Routing > Virtual Routers > Edit (for trust-vr): Select Enable
Source Interface Based Routing, then click OK.
CLI
set vrouter trust-vr route source in-interface ethernet1 10.1.1.0/24 interface
ethernet3 gateway 1.1.1.1 metric 1
set vrouter trust-vr route source in-interface ethernet2 10.1.2.0/24 interface
ethernet4 gateway 2.2.2.2 metric 1
set vrouter trust-vr sibr-routing enable
save
WebUI
Network > Routing > Virtual Router (trust-vr) > Edit
CLI
set vrouter trust-vr
Preference value for routes, based on protocol (see “Setting a Route Preference”
on page 30).
Direct the VR to forward traffic based on the source IP address of a data packet
(by default, the VR forwards traffic based on the destination IP address of a data
packet. See “Source-Based Routing Table” on page 17.)
Add a default route with another VR as the next hop (for the trust-vr only).
Make SNMP traps for the dynamic routing MIBs private (for the default
root-level VR only).
Direct the VR to ignore overlapping subnet addresses for interfaces (by default,
you cannot configure overlapping subnet IP addresses for interfaces in the
same VR).
By default all security devices have IP address 192.168.1.1 assigned to the VLAN1
interface. If you do not specify a router ID before enabling a dynamic routing
protocol on a security device, the IP address chosen for the router ID will likely be
the default 192.168.1.1 address. This can cause a problem with routing because
there cannot be multiple security VRs with the same VR ID in a routing domain. We
recommend that you always explicitly assign a VR ID that is unique in the network.
You can set the VR ID to the loopback interface address, as long as the loopback
interface is not a Virtual Security Interface (VSI) in a NetScreen Redundancy
Protocol (NSRP) cluster. (See Volume 11: High Availability for more information about
configuring an NSRP cluster.)
In this example, you assign 0.0.0.10 as the router ID for the trust-vr.
NOTE: In the WebUI, you must enter the router ID in dotted decimal notation. In the CLI,
you can enter the router ID either in dotted decimal notation (0.0.0.10) or you can
simply enter 10 (this is converted by the CLI to 0.0.0.10).
WebUI
Network > Routing > Virtual Router (trust-vr) > Edit: Enter the following, then
click OK:
CLI
set vrouter trust-vr router-id 10
save
NOTE: You cannot assign or change a router ID if you have already enabled a dynamic
routing protocol in the VR. If you need to change the router ID, you must first
disable the dynamic routing protocol(s) in the VR. For information about disabling
a dynamic routing protocol in the VR, see the appropriate chapter in this volume.
Configure a static route in one VR that defines another VR as the next-hop for
the route. This route can even be the default route for the VR. For example, you
can configure a default route for the trust-vr with the untrust-vr as the next-hop.
If the destination in an outbound packet does not match any other entries in
the trust-vr routing table, it is forwarded to the untrust-vr. For information about
configuring static routes, see “Configuring Static Routes” on page 5.
Export routes from the routing table in one VR into the routing table of another
VR. You can export and import specific routes. You can also export all routes in
the trust-vr routing table to the untrust-vr. This enables packets received in the
untrust-vr to be forwarded to destinations in the trust-vr. For information, see
“Exporting and Importing Routes Between Virtual Routers” on page 42.
You can bind a security zone to only one VR. You can bind multiple security zones
to a single VR when there is no address overlap between zones. That is, all
interfaces in the zones must be in route mode. Once a zone is bound to a VR, all the
interfaces in that zone belong to the VR. You can change the binding of a security
zone from one VR to another, however, you must first remove all interfaces from the
zone. (For more information about binding and unbinding an interface to a security
zone, see “Interfaces” on page 2-35.)
The following are the basic steps in binding a security zone to the untrust-vr VR:
1. Remove all interfaces from the zone that you want to bind to the untrust-vr. You
cannot modify a zone-to-VR binding if there is an interface assigned to the
zone. If you have assigned an IP address to an interface, you need to remove
the address assignment before removing the interface from the zone.
In the following example, the untrust security zone is bound by default to the
trust-vr, and the interface ethernet3 is bound to the untrust security zone. (There are
no other interfaces bound to the untrust security zone.) You must first set the IP
address and netmask of the ethernet3 interface to 0.0.0.0, then change the
bindings so that the untrust security zone is bound to the untrust-vr.
WebUI
1. Unbind Interface from Untrust Zone
Network > Interfaces (ethernet3) > Edit: Enter the following, then click OK:
CLI
1. Unbind Interface from Untrust Zone
unset interface ethernet3 ip
unset interface ethernet3 zone
2. Bind Untrust Zone to untrust-vr
set zone untrust vrouter untrust-vr
3. Bind Interface to Untrust Zone
set interface eth3 zone untrust
save
In the following example output, the get zone command shows the default
interface, zone, and VR bindings. In the default bindings, the untrust zone is bound
to the trust-vr.
You can choose to change the zone binding for the untrust-vr. Executing the get
zone command shows the changed interface, zone, and VR bindings; in this case,
the untrust zone is now bound to the untrust-vr.
NOTE: Only certain security devices support custom VRs. To create custom VRs, you need
a software license key.
WebUI
Network > Routing > Virtual Routers > New: Enter the following, then click
OK:
CLI
set vrouter name trust2-vr
set vrouter trust2-vr auto-route-export
save
WebUI
Network > Routing > Virtual Routers: Click Remove for the trust2-vr.
When the prompt appears asking you to confirm the removal, click OK.
CLI
unset vrouter trust2-vr
When the prompt appears asking you to confirm the removal (vrouter unset,
are you sure? y/[n]), enter Y.
save
NOTE: You cannot delete the predefined untrust-vr and trust-vr VRs, but you can delete
any user-defined VR. To modify the name of a user-defined VR or change the VR
ID, you must first delete the VR and then recreate it with the new name or VR ID.
Any root-level VRs that have been defined as sharable. The untrust-vr is, by
default, a shared VR that is accessible by any vsys. You can configure other
root-level VRs to be sharable.
You can define one or more custom VRs for a vsys. For more information about
virtual systems, see Volume 10: Virtual Systems. In Figure 7, each of the three vsys
has two VRs associated with it: a vsys-level VR named vsysname-vr and the
untrust-vr.
trust-vr
untrust-vr Finance
(shared root-level
virtual router) DMZ
Untrust vsys1
vsys2-vr Automatically
vsys2 created when you
Trust-vsys2 create vsys
vsys3
vsys3-vr
Trust-vsys3
WebUI
Vsys > Configure > Enter (for my-vsys1) > Network > Routing > Virtual
Routers > New: Enter the following, then click Apply:
CLI
set vsys my-vsys1
(my-vsys1) set vrouter name vr-1a
(my-vsys1/vr-1a) set router-id 10.1.1.9
(my-vsys1/vr-1a) exit
(my-vsys1) exit
The vsys-level VR that is created when you create the vsys is the default VR for a
vsys. You can change the default VR for a vsys to a custom VR. For example, you
can make the custom VR vr-1a that you created previously in this example the
default VR for the vsys my-vsys1:
WebUI
Vsys > Configure > Enter (for my-vsys1) > Network > Routing > Virtual
Routers > Edit (for vr-1a): Select Make This Vrouter Default-Vrouter for the
System, then click Apply.
CLI
set vsys my-vsys1
(my-vsys1) set vrouter vr-1a
(my-vsys1/vr-1a) set default-vrouter
(my-vsys1/vr-1a) exit
(my-vsys1) exit
The untrust-vr is shared by default across all vsys. While vsys-level VRs are not
sharable, you can define any root-level VR to be shared by the vsys. This allows you
to define routes in a vsys-level VR that use a shared root-level VR as the next-hop.
You can also configure route redistribution between a vsys-level VR and a shared
root-level VR.
WebUI
Network > Routing > Virtual Routers > New: Enter the following, then click
OK:
Vsys > Configure > Enter (for my-vsys1) > Network > Routing > Routing
Entries > New (for my-vsys1-vr): Enter the following, then click OK:
CLI
set vrouter name my-router sharable
set vsys my-vsys1
(my-vsys1) set vrouter my-vsys1-vr route 40.0.0.0/8 vrouter my-router
(my-vsys1) exit
NOTE: See the relevant product datasheet to determine the maximum number of routing
table entries available on your Juniper Networks security device.
In this example, you set the maximum number of routing table entries for the
trust-vr to 20.
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr): Enter the following,
then click OK:
CLI
set vrouter trust-vr max-routes 20
save
Route Selection
Multiple routes with the same prefix (IP address and mask) can exist in the routing
table. Where the routing table contains multiple routes to the same destination, the
preference values of each route are compared. The route that has the lowest
preference value is selected. If the preference values are the same, the metric values
are then compared. The route with the lowest metric value is then selected.
NOTE: If there are multiple routes to the same destination with the same preference
values and the same metric values, then any one of those routes can be selected.
In this case, selection of one specific route over another is not guaranteed or
predictable.
In a VR, you can set the preference value for routes according to protocol. Table 2
lists the default preference values for routes of each protocol.
You can also adjust the route preference value to direct traffic along preferred paths.
In this example, you specify a value of 4 as the preference for any “connected”
routes added to the route table for the untrust-vr.
NOTE: If the route preference changes for any type of route (for example, OSPF type 1
routes), the new preference displays in the route table but the new preference
does not take effect until the route is relearned (which can be achieved by
disabling, then enabling, the dynamic routing protocol), or, in the case of static
routes, deleted and added again.
Changing the route preference does not affect existing routes. To apply changes to
existing routes, you need to delete the routes then re-add them. For dynamic
routes, you need to disable the protocol then re-enable it or restart the device.
A route is connected when the router has an interface with an IP address in the
destination network.
WebUI
Network > Routing > Virtual Routers > Edit (for untrust-vr): Enter the
following, then click OK:
Route Preference:
Connected: 4
CLI
set vrouter untrust-vr preference connected 4
save
Route Metrics
Route metrics determine the best path a packet can take to reach a given
destination. Routers use route metrics to weigh two routes to the same destination
and determine the use of one route over the other. When there are multiple routes
to the same destination network with the same preference value, the route with the
lowest metric prevails.
Other factors
When routes are learned dynamically, the neighboring router from which the route
originates provides the metric. The default metric for connected routes is always 0.
The default metric for static routes is 1.
If an incoming packet does not match an existing session, the security device
performs First Packet Processing, a procedure that involves route lookup. Figure 8
shows the default route lookup sequence.
incoming packet
No No
No
Yes
Route found
in DRT?
No
Drop packet
1. If source interface-based routing is enabled in the VR, the security device first
checks the source interface-based routing table for a route entry that matches
the interface on which the packet arrived. If the security device finds a route
entry for the source interface in the source interface-based routing table, it
forwards the packet as specified by the matching routing entry. If the security
device does not find a route entry for the source interface in the source
interface-based routing table, the device checks to see if source-based routing is
enabled in the VR.
2. If source based routing is enabled in the VR, the security device checks the
source based routing table for a route entry that matches the source IP address
of the packet. If the security device finds a matching route entry for the source
IP address, it forwards the packet as specified by the entry. If the security
device does not find a route entry for the source IP address in the source based
routing table, the device checks the destination-based routing table.
3. The security device checks the destination-based routing table for a route entry
that matches the destination IP address of the packet. If the security device
finds a matching route entry for the destination IP address, it forwards the
packet as specified by the entry. If the device does not find an exact matching
route entry for the destination IP address but a default route configured for the
VR, the device forwards the packet as specified by the default route. If the
security device does not find a route entry for the destination IP address and
there is no default route configured for the VR, the packet is dropped.
The order in which the security device checks routing tables for a matching route is
determined by a preference value assigned to each routing table. The routing table
with the highest preference value is checked first while the routing table with the
lowest preference value is checked last. By default, the source interface-based
routing table has the highest preference value (3), the source based routing table
has the next-highest preference value (2), and the destination-based routing table
has the lowest preference value (1).
You can reassign new preference values to a routing table to change the order in
which the security device performs route lookup in a VR. Remember that the device
checks routing tables from the highest to lowest preference values.
In the following example, you enable both SIBR and source-based routing in the
trust-vr. You want the security device to perform route lookups in the routing tables
in the following order: source-based routing first, SIBR, and then destination-based
routing. To configure this sequence of route table lookup, you need to configure
source-based routing with a higher preference value than SIBR — in this example,
you assign a preference value of 4 to source-based routing.
WebUI
Network > Routing > Virtual Router > Edit (for trust-vr): Enter the following,
then click OK:
CLI
set vrouter trust-vr sibr-routing enable
set vrouter trust-vr source-routing enable
set vrouter trust-vr route-lookup preference source-routing 4
save
In the example, you enable source-based routing in both the trust-vr and untrust-vr
routing tables. The trust-vr has the following routing entries:
A default route, with ethernet3 as the forwarding interface and the router at
1.1.1.1 as the next-hop
Figure 9 shows how traffic from the subnetwork 10.1.2.0/24 will always be
forwarded on ethernet3 to the router at 1.1.1.1.
ISP 1
10.1.1.0/24 1.1.1.1
ethernet1 ethernet3
ethernet2 ethernet4
ISP 2
10.1.2.0/24 2.2.2.2
The source-based routing table for the trust-vr includes the following entry:
The destination-based routing table for the untrust-vr includes the following entry:
Next, the security device does not check the source-based routing table for the
untrust-vr to find the following entry:
Instead, the security device checks the destination-based Routing Table and finds
the following entry:
In the untrust-vr, the security device performs route lookup in the destination-based
routing table only, even though the source-based routing table in the untrust-vr
contains an entry that would match the traffic. The matching route in the
destination-based routing table (the default route) forwards the traffic out on the
ethernet3 interface.
NOTE: If the outgoing interfaces do not belong to the same zone and the return packet
goes to a zone other than the intended one, a session match cannot occur and the
traffic may not go through.
NOTE: When ECMP is enabled and the outgoing interfaces are different and in NAT
mode, applications, such as HTTP, that create multiple sessions will not work
correctly. Applications, such as telnet or SSH, that create one session should work
correctly.
ECMP assists with load-balancing among two to four routes to the same destination
or increases the effective bandwidth usage among two or more destinations. When
ECMP is enabled, security devices use the statically defined routes or dynamically
learn multiple routes to the same destination through a routing protocol. The
security device assigns routes of equal cost in rotating (round-robin) fashion.
Without ECMP, the security device only uses the first learned or defined route.
Other routes that are of equal cost remain unused until the currently active route is
no longer active.
NOTE: When using ECMP, if you have two security devices in a neighbor relationship and
you notice packet loss and improper load-balancing, check the Address Resolution
Protocol (ARP) configuration of the neighbor device to make sure the arp
always-on-dest feature is disabled (default). For more information about
ARP-related commands, see “Down Interfaces and Traffic Flow” on page 2-74.
For example, consider the following two routes that appear in the trust-vr
destination-based routing table:
In this example, two default routes exist to provide connections to two different
ISPs, and the goal is to use both default routes with ECMP.
The two routes have the same metric values; however, the first route is a connected
route (C with a preference of 0). The security device acquired the first route through
DHCP or PPP, and the device acquired the default route through manual
configuration. The second route is a manually configured static route (S with an
automatic preference of 20). With ECMP disabled, the security device forwards all
traffic to the connected route on ethernet3.
To achieve load-balancing with both routes, you change the route preference of the
static route to zero (0) to match the connected route by entering the set vrouter
trust-vr preference static 0 command and then enabling ECMP. With ECMP
enabled, the security device load-balances the traffic by alternating between the
two eligible ECMP routes. The following display shows the updated routing table.
If you enable ECMP, and the security device finds more than one matching route of
the same cost in a routing table, the device selects a different equal-cost route for
each route lookup. With the routes shown above, the security device alternates
between ethernet3 and ethernet2 to forward traffic to the 0.0.0.0/0 network.
If more than two equal-cost routes to the network exist, the security device selects
from the routes in round-robin order up to the configured maximum so that the
device selects a different ECMP route for each route lookup.
ECMP is disabled by default (the maximum number of routes is 1). To enable ECMP
routing, you need to specify the maximum number of equal-cost routes on a
per-virtual router basis. You can specify up to four routes. Once you set the
maximum number of routes, the security device will not add or change routes even
if more routes are learned.
In the following example, you set the maximum number of ECMP routes in the
trust-vr to 2. Even though 3 or 4 routes of equal cost might exist within the same
zone and in the routing table, the security device only alternates between the
configured number of eligible routes. In this case, data only forwards along the 2
specified ECMP paths.
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr): Enter the following,
then click OK:
CLI
set vrouter trust-vr max-ecmp-routes 2
save
Route Redistribution
The routing table in a VR contains routes gathered by all dynamic routing protocols
running in the VR, as well as static routes and directly connected routes. By default,
a dynamic routing protocol (such as OSPF, RIP, or BGP) advertises to its neighbors
or peers only the routes that meet the following conditions:
NOTE: OSPF, RIP, and BGP also advertise connected routes for the ScreenOS interfaces on
which these protocols are enabled.
You can redistribute routes learned from a routing protocol (including statically
configured routes) into a different routing protocol in the same VR. This allows the
receiving routing protocol to advertise the redistributed routes. When importing a
route, the current domain has to translate all the information, particularly known
routes, from the other protocol to its own protocol. For example, if a routing domain
uses OSPF and it connects to a routing domain using BGP, the OSPF domain has to
import all the routes from the BGP domain to inform all of its OSPF neighbors about
how to reach devices in the BGP domain.
NOTE: You can only define one redistribution rule between any two protocols.
On the security device, you configure a route map to specify which routes are to be
redistributed and the attributes of the redistributed routes.
For each match condition, you specify whether a route that matches the condition
is accepted (permitted) or rejected (denied). If a route matches a condition and is
permitted, you can optionally set attribute values for the route. Table 4 lists route
map attributes and descriptions of each.
Route Filtering
Route filtering allows you to control which routes to permit into a VR, which routes
to advertise to peers, and which routes to redistribute from one routing protocol to
another. You can apply filters to incoming routes sent by a routing peer or to
outgoing routes sent by the security VR to peer routers. You can use the following
filtering mechanisms:
You can also use access lists to control the flow of multicast traffic. For information,
see “Access Lists” on page 149.
In this example, you create an access list on the trust-vr. The access list has the
following characteristics:
Identifier: 2 (you must specify an access list identifier when configuring the
access list)
WebUI
Network > Routing > Virtual Routers > Access List: > New (for trust-vr):
Enter the following, then click OK:
CLI
set vrouter trust-vr access-list 2 permit ip 1.1.1.1/24 10
save
WebUI
1. BGP AS-Path Access List
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> AS Path: Enter the following, then click Add:
CLI
1. BGP AS-Path Access List
set vrouter trust-vr protocol bgp as-path-access-list 1 permit _65000_
2. Route Map
set vrouter trust-vr
device(trust-vr)-> set route-map name rtmap1 permit 10
device(trust-vr/rtmap1-10)-> set match as-path 1
device(trust-vr/rtmap1-10)-> exit
device(trust-vr)-> exit
3. Redistribution Rule
set vrouter trust-vr protocol ospf redistribute route-map rtmap1 protocol bgp
save
2. (Optional) On the destination VR, define an import rule. While this step is
optional, an import rule allows you to further control the routes that the
destination VR accepts from the source VR.
On the security device, you configure an export or import rule by specifying the
following:
You can configure the trust-vr to automatically export all its route table entries to
the untrust-vr. You can also configure a user-defined VR to automatically export
routes to other VRs. Routes in networks directly connected to interfaces in NAT
mode cannot be exported.
WebUI
trust-vr
1. Access List
Network > Routing > Virtual Routers > Access List: > New (for trust-vr):
Enter the following, then click OK:
CLI
trust-vr
1. Access List
set vrouter trust-vr
device(trust-vr)-> set access-list 2 permit ip 1.1.1.1/24 10
2. Route Map
device(trust-vr)-> set route-map name rtmap1 permit 10
device(trust-vr/rtmap1-10)-> set match ip 2
device(trust-vr/rtmap1-10)-> exit
3. Export Rule
device(trust-vr)-> set export-to vrouter untrust-vr route-map rtmap1 protocol
ospf
device(trust-vr)-> exit
save
CAUTION: This feature can override the isolation between the trust-vr and
untrust-vr by making all trusted routes visible in the untrusted network.
If you define import rules for the untrust-vr, only routes that match the import rules
are imported. In this example, the trust-vr automatically exports all routes to the
untrust-vr, but an import rule on the untrust-vr allows only internal OSPF routes to
be exported.
WebUI
trust-vr
Network > Routing > Virtual Router > Edit (for trust-vr): Select Auto Export
Route to Untrust-VR, then click OK.
untrust-vr
Network > Routing > Virtual Router > Route Map (for untrust-vr) > New:
Enter the following, then click OK:
CLI
trust-vr
set vrouter trust-vr auto-route-export
untrust-vr
set vrouter untrust-vr
device(untrust-vr)-> set route-map name from-ospf-trust permit 10
device(untrust-vr/from-ospf-trust-10)-> set match route-type internal-ospf
device(untrust-vr/from-ospf-trust-10)-> exit
device(untrust-vr)-> set import-from vrouter trust-vr route-map from-ospf-trust
protocol ospf
device(untrust-vr)-> exit
save
This chapter describes the Open Shortest Path First (OSPF) routing protocol on
security devices. It contains the following sections:
“Overview” on page 46
“Areas” on page 46
45
Concepts & Examples ScreenOS Reference Guide
Overview
The Open Shortest Path First (OSPF) routing protocol is an Interior Gateway
Protocol (IGP) intended to operate within a single Autonomous System (AS). A
router running OSPF distributes its state information (such as usable interfaces and
neighbor reachability) by periodically flooding link-state advertisements (LSAs)
throughout the AS.
Each OSPF router uses LSAs from neighboring routers to maintain a link-state
database. The link-state database is a listing of topology and state information for
the surrounding networks. The constant distribution of LSAs throughout the routing
domain enables all routers in an AS to maintain identical link-state databases.
OSPF uses the link-state database to determine the best path to any network within
the AS. This is done by generating a shortest-path tree, which is a graphical
representation of the shortest path to any network within the AS. While all routers
have the same link state database, they all have unique shortest-path trees because
routers always generate the tree with themselves at the top of the tree.
Areas
By default, all routers are grouped into a single “backbone” area called area 0
(usually denoted as area 0.0.0.0). However, large geographically dispersed networks
are typically segmented into multiple areas. As networks grow, link-state databases
grow and dividing the link-state database into smaller groups allows for better
scalability.
Areas reduce the amount of routing information passed throughout the network
because a router only maintains a link-state database for the area in which it
resides. No link-state information is maintained for networks or routers outside the
area. A router connected to multiple areas maintains a link-state database for each
area to which it is connected. Areas must be directly connected to area 0 except
when creating a virtual link. For more information about virtual links, see “Virtual
Links” on page 59.
46 Overview
Chapter 3: Open Shortest Path First
Stub area - An area that receives route summaries from the backbone area but
does not receive link-state advertisements from other areas for routes learned
through non-OSPF sources (BGP, for example). A stub area can be considered a
totally stubby area if no summary routes are allowed in the stub area.
Not So Stubby Area (NSSA) - Like a normal stub area, NSSAs cannot receive
routes from non-OSPF sources outside the current area. However, external
routes learned within the area can be learned and passed to other areas.
Router Classification
Routers that participate in OSPF routing are classified according to their function or
location in the network:
Internal Router - A router with all interfaces belonging to the same area.
Area Border Router - A router that attaches to multiple areas is called an area
border router (ABR). An ABR summarizes routes from non-backbone areas for
distribution to the backbone area. On security devices running OSPF, the
backbone area is created by default. If you create a second area in a virtual
router, the device functions as an ABR.
AS Boundary Router - When an OSPF area borders another AS, the router
between the two autonomous systems is called an autonomous system
boundary router (ASBR). An ASBR is responsible for advertising external AS
routing information throughout an AS.
Hello Protocol
Two routers with interfaces on the same subnet are considered neighbors. Routers
use the Hello protocol to establish and maintain these neighbor relationships. When
two routers establish bidirectional communication, they are said to have established
an adjacency. If two routers do not establish an adjacency, they cannot exchange
routing information.
Overview 47
Concepts & Examples ScreenOS Reference Guide
Network Types
Juniper Networks security devices support the following OSPF network types:
Broadcast Networks
Point-to-Point Networks
Point-to-Multipoint Networks
Broadcast Networks
A broadcast network is a network that connects many routers together and can
send, or broadcast, a single physical message to all the attached routers. Pairs of
routers on a broadcast network are assumed to be able to communicate with each
other. Ethernet is an example of a broadcast network.
On broadcast networks, the OSPF router dynamically detects its neighbor routers
by sending hello packets to the multicast address 224.0.0.5. For broadcast
networks, the Hello protocol elects a Designated Router and Backup Designated
Router for the network.
Point-to-Point Networks
A point-to-point network typically joins two routers over a Wide Area Network
(WAN). An example of a point-to-point network is two security devices connected
by an IPSec VPN tunnel. On point-to-point networks, the OSPF router dynamically
detects neighbor routers by sending hello packets to the multicast address
224.0.0.5.
Point-to-Multipoint Networks
A point-to-multipoint network is a non-broadcast network where OSPF treats
connections between routers as point-to-point links. No election of a designated
router or LSA flooding exists for the network. A router in a point-to-multipoint
network sends hello packets to all neighbors with which it can directly
communicate.
48 Overview
Chapter 3: Open Shortest Path First
Link-State Advertisements
Each OSPF router sends out LSAs that define the local state information for the
router. Additionally, there are other types of LSAs that a router can send out,
depending upon the OSPF function of the router. Table 5 lists LSA types, where each
type is flooded, and the contents of each type of LSA.
Flooded
LSA Type Sent By Throughout Information Sent in LSA
Router LSA All OSPF routers Area Describes the state of all router interfaces throughout the
area.
Network LSA Designated Router on broadcast Area Contains a list of all routers connected to the network.
and NBMA networks
Summary Area Border Routers Area Describes a route to a destination outside the area but still
LSA inside the AS. There are two types:
Type 3 summary-LSAs describe routes to networks.
Type 4 summary-LSAs describe routes to AS boundary
routers.
AS-External Autonomous System Boundary Autonomous Routes to networks in another AS. Often, this is the default
Router System route (0.0.0.0/0).
NOTE: Before you configure a dynamic routing protocol on the security device, you
should assign a VR ID, as described in “Routing” on page 13.
1. Create and enable the OSPF routing instance in a VR. This step also
automatically creates an OSPF backbone area, with an area ID of 0.0.0.0,
which cannot be deleted.
2. (Optional) Unless all OSPF interfaces will be connected to the backbone area,
you need to define a new OSPF area with its own area ID. For example, if the
security device is to act as an ABR, you need to create a new OSPF area in
addition to the backbone area. You can configure the new area as a normal,
stub, or not-so-stubby area.
3. Assign one or more interfaces to each OSPF area. You must explicitly add
interfaces to an OSPF area, including the backbone area.
In this example, you configure the security device as an ABR connecting to area 0
through the ethernet3 interface and connecting to area 10 through the ethernet1
interface. See Figure 10.
Internet
10.1.1.0/24 10.1.2.0/24
Area 10
Area 0
You can optionally configure other OSPF parameters, such as the following:
Global parameters, such as virtual links, that are set at the VR level for the OSPF
protocol (see “Global OSPF Parameters” on page 58).
WebUI
1. Router ID
Network > Routing > Virtual Router (trust-vr) > Edit: Enter the following, then
click OK:
CLI
1. Router ID
set vrouter trust-vr router-id 10
2. OSPF Routing Instance
set vrouter trust-vr protocol ospf
set vrouter trust-vr protocol ospf enable
save
NOTE: In the CLI, you must first create the OSPF routing instance before you can enable
it. Thus, you must issue two separate CLI commands to enable an OSPF routing
instance.
WebUI
Network > Routing > Virtual Routers (trust-vr) > Edit > Edit OSPF Instance:
Uncheck OSPF Enabled, then click OK.
Network > Routing > Virtual Routers (trust-vr) > Edit > Delete OSPF
Instance, then click OK at the confirmation prompt.
CLI
unset vrouter trust-vr protocol ospf
deleting OSPF instance, are you sure? y/[n]
save
NOTE: In the CLI, you confirm the deletion of the OSPF instance.
All areas must be connected to area 0, which is created when you configure an
OSPF routing instance on the virtual router. If you need to create an additional
OSPF area, you can optionally define the area as a stub area or not-so-stubby area.
See “Areas” on page 46 for more information about these types of areas.
Table 6 lists area parameters, with descriptions of each parameter, and gives the
default value for each.
WebUI
Network > Routing > Virtual Routers > Edit (trust-vr) > Edit OSPF Instance
> Area: Enter the following, then click OK:
Area ID: 10
Type: normal (select)
Action: Add
CLI
set vrouter trust-vr protocol ospf area 10
save
WebUI
Network > Routing > Virtual Routers (trust-vr) > Edit > Edit OSPF Instance:
Deselect OSPF Enabled, then click OK.
Network > Routing > Virtual Routers > Edit (trust-vr) > Edit OSPF Instance
> Area: Click Remove.
CLI
unset vrouter trust-vr protocol ospf enable
unset vrouter trust-vr protocol ospf area 0.0.0.10
save
WebUI
Network > Routing > Virtual Routers > Edit (trust-vr) > Edit OSPF Instance
> Area > Configure (Area 10): Use the Add button to move the ethernet1
interface from the Available Interface(s) column to the Selected Interfaces
column. Click OK.
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit OSPF
Instance > Area > Configure (Area 0): Use the Add button to move the
ethernet3 interface from the Available Interface(s) column to the Selected
Interfaces column. Click OK.
CLI
set interface ethernet1 protocol ospf area 10
set interface ethernet3 protocol ospf area 0
save
In the following example, you define the following area ranges for area 10:
10.1.1.0/24 to be advertised
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit OSPF
Instance > Area > Configure (0.0.0.10): Enter the following in the Area Range
section, then click Add:
IP / Netmask: 10.1.1.0/24
Type: (select) Advertise
Enter the following in the Area Range section, then click Add:
IP / Netmask: 10.1.2.0/24
Type: (select) No Advertise
CLI
set vrouter trust-vr protocol ospf area 10 range 10.1.1.0/24 advertise
set vrouter trust-vr protocol ospf area 10 range 10.1.2.0/24 no-advertise
save
NOTE: If you disable the OSPF routing instance in the VR (see “Removing an OSPF
Instance” on page 51), OSPF stops transmitting and processing packets on all
OSPF-enabled interfaces in the VR.
WebUI
Network > Interfaces > Edit (for ethernet1) > OSPF: Select Enable Protocol
OSPF, then click Apply.
Network > Interfaces > Edit (for ethernet3) > OSPF: Select Enable Protocol
OSPF, then click Apply.
CLI
set interface ethernet1 protocol ospf enable
set interface ethernet3 protocol ospf enable
save
WebUI
Network > Interfaces > Edit (for ethernet1) > OSPF: Clear Enable Protocol
OSPF, then click Apply.
CLI
unset interface ethernet1 protocol ospf enable
save
NOTE: If you disable the OSPF routing instance in the VR, OSPF stops transmitting and
processing packets on all OSPF-enabled interfaces in the VR (see “Removing an
OSPF Instance” on page 51).
You can verify that OSPF is running on the virtual router with the get vrouter
trust-vr protocol ospf command.
The highlighted areas show that OSPF is running and verify the active OSPF areas
and active interfaces in each OSPF area.
NOTE: We recommend that you explicitly assign a router ID rather than use the default
value. For information on setting a router ID, see “Routing” on page 13.
You can verify that OSPF is enabled on the interfaces and see the state of the
interfaces with the get vrouter trust-vr protocol ospf interface command.
You can configure the priority of the virtual router to be elected the Designated
Router (DR) or the Backup Designated Router (BDR). In the example above, the
State column lists the priority of the virtual router.
You can verify that the OSPF routing instance on the security device has established
adjacencies with OSPF neighbors with the get vrouter trust-vr protocol ospf
neighbor command.
In the State column in the example above, Full indicates full OSPF adjacencies with
neighbors.
Imported routes
When you configure route redistribution, you must first specify a route map to filter
the routes that are redistributed. For more information about creating route maps
for route redistribution, see “Routing” on page 13.
In the following example, you redistribute a route that originated from a BGP
routing domain into the current OSPF routing domain. Both the CLI and WebUI
examples assume that you previously created a route map called add-bgp.
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit OSPF
Instance > Redistributable Rules: Enter the following, then click Add:
CLI
set vrouter trust-vr protocol ospf redistribute route-map add-bgp protocol bgp
save
In addition to creating fewer entries in the routing tables on the backbone routers,
route summarization prevents the propagation of LSAs to other areas when one of
the summarized networks goes down or comes up. You can also summarize
inter-area routes or external routes.
Sometimes a summarized route can create opportunities for loops to occur. You can
configure a route to a NULL interface to avoid loops. An example of creating a
summarized route and then an example of setting a NULL interface follows this
section.
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit OSPF
Instance > Redistributable Rules: Enter the following, then click Add:
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit OSPF
Instance > Summary Import: Enter the following, then click Add:
IP/Netmask: 2.1.1.0/24
CLI
set vrouter trust-vr protocol ospf redistribute route-map add-bgp protocol bgp
set vrouter trust-vr protocol ospf summary-import ip 2.1.1.0/24
save
OSPF Global
Parameters Description Default Value
Advertise default Specifies that an active default route (0.0.0.0/0) in the Default route is not
route VR route table is advertised into all OSPF areas. You advertised.
can also specify the metric value or whether the
route’s original metric is preserved, and the metric
type (ASE type 1 or type 2). You can also specify that
the default route is always advertised.
Reject default route Specifies that any default route learned in OSPF is Default route
not added to the route table. learned in OSPF is
added to the route
table.
Automatic virtual Specifies that the VR is to automatically create a Disabled.
link virtual link when it cannot reach the OSPF backbone.
Maximum hello Specifies the maximum number of OSPF hello 10.
packets packets that the VR can receive in a hello interval.
Maximum LSA Specifies the maximum number of OSPF LSA packets No default.
packets that the VR can receive within the specified number
of seconds.
RFC 1583 Specifies that the OSPF routing instance is OSPF version 2, as
compatibility compatible with RFC 1583, an earlier version of defined by
OSPF. RFC 2328.
Equal cost Specifies the maximum number of paths (1-4) to use Disabled (1).
multipath routing for load-balancing with destinations that have
(ECMP) multiple equal cost paths. See “Configuring Equal
Cost Multipath Routing” on page 35.
Virtual link Configures the OSPF area and router ID for the virtual No virtual link
configuration link. You can optionally configure the authentication configured.
method, hello interval, retransmit interval, transmit
delay, or neighbor dead interval for the virtual link.
In this example, you advertise the default route of the current OSPF routing
instance.
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit OSPF
Instance: Select Advertising Default Route Enable, then click OK.
NOTE: In the WebUI, the default metric (1) 62 must be manually entered, and the default
metric-type is ASE type 1.
CLI
set vrouter trust-vr protocol ospf advertise-default-route metric 1 metric-type 1
save
Virtual Links
Although all areas should be connected directly to the backbone, sometimes you
need to create a new area that cannot be physically connected to the backbone
area. To solve this problem, you can configure a virtual link. A virtual link provides a
remote area with a logical path to the backbone through another area.
You must configure the virtual link on the routers on both ends of the link. To
configure a virtual link on the security device, you need to define:
The ID of the OSPF area through which the virtual link will pass. You cannot
create a virtual link that passes through the backbone area or a stub area.
Virtual Link
Parameter Description Default Value
Authentication Specifies either clear text password or MD5 No authentication
authentication.
Dead interval Specifies the number of seconds that elapses with no 40 seconds
response from an OSPF neighbor before the neighbor is
determined to be not running.
Hello interval Specifies the number of seconds between OSPF hellos. 10 seconds
Retransmit Specifies the number of seconds that elapses before the 5 seconds
interval interface resends an LSA to a neighbor that did not
respond to the original LSA.
Transmit delay Specifies the number of seconds between transmissions 1 second
of link-state update packets sent on an interface.
Area 0
Area 10 Device-B
ethernet1 ethernet2
Router ID Internet
10.1.1.250
Device-A ethernet 1
Router ID
10.1.1.250 Device-A and Device-B have a
virtual link to each other through
ethernet 2 OSPF area 10.
Area 20
NOTE: You must enable OSPF on both interfaces of each device and make sure that OSPF
is running on the interfaces in devices A and B before the virtual link becomes
active.
WebUI (Device-A)
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit OSPF
Instance > Virtual Link: Enter the following, then click Add:
> Configure: In the Transmit Delay field, type 10, then click OK.
CLI (Device-A)
set vrouter trust-vr protocol ospf vlink area-id 10 router-id 10.1.1.250
set vrouter trust-vr protocol ospf vlink area-id 10 router-id 10.1.1.250 transit-delay
10
save
NOTE: In the CLI, you must first create the virtual link before you can configure any
optional parameters for the virtual link. Thus, in the CLI example above, you must
issue two separate commands to create and then configure the virtual link.
WebUI (Device-B)
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit OSPF
Instance > Virtual Link: Enter the following, then click Add:
Area ID: 10
Router ID: 10.10.1.250
> Configure: In the Transmit Delay field, type 10, then click OK.
CLI (Device-B)
set vrouter trust-vr protocol ospf vlink area-id 10 router-id 10.10.1.250
set vrouter trust-vr protocol ospf vlink area-id 10 router-id 10.10.1.250
transit-delay 10
save
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit OSPF
Instance: Select Automatically Generate Virtual Links, then click OK.
CLI
set vrouter trust-vr protocol ospf auto-vlink
save
Table 9 lists optional OSPF interface parameters and their default values.
OSPF
Interface
Parameter Description Default Value
Authentication Specifies either clear text password or message No authentication used.
digest 5 (MD5) authentication to verify OSPF
communication on the interface. A clear text
password requires password string of up to 8 digits,
and an MD5 authentication password requires a
password string of up to 16 digits. The MD5
password also requires that you configure key
strings.
Cost Specifies the metric for the interface. The cost 1 for a 100MB or more
associated with an interface depends upon the link
bandwidth of the link to which the interface is 10 for a 10MB link
connected. The higher the bandwidth, the lower 100 for a 1MB link
(more desirable) the cost value.
Dead interval Specifies the number of seconds that elapses with 40 seconds.
no response from an OSPF neighbor before OSPF
determines the neighbor is not running.
Hello interval Specifies the interval, in seconds, at which OSPF 10 seconds.
sends out hello packets to the network.
Link type Specifies a tunnel interface as a point-to-point link Ethernet interfaces are
or as a point-to-multipoint link. See treated as broadcast
“Point-to-Multipoint Tunnel Interface” on page 68. interfaces.
Tunnel interfaces bound
to OSPF areas are
point-to-point by default.
Neighbor list Specifies subnets, in the form of an access list, on None (adjacencies are
which OSPF neighbors reside that are eligible to formed with all
form adjacencies. neighbors on the
interface).
Passive Specifies that the IP address of the interface is OSPF-enabled interfaces
interface advertised into the OSPF domain as an OSPF route transmit and receive
and not as an external route, but the interface does OSPF packets.
not transmit or receive OSPF packets. This option is
useful when BGP is also enabled on the interface.
Priority Specifies the priority for the virtual router to be 1.
elected the Designated Router or Backup
Designated Router. The router with the larger
priority value has the best chance (although not
guaranteed) chance of being elected.
OSPF
Interface
Parameter Description Default Value
Retransmit Specifies the number of seconds that elapses before 5 seconds.
interval the interface resends an LSA to a neighbor that did
not respond to the original LSA.
Transit delay Specifies the number of seconds between 1 second.
transmissions of link-state update packets sent on
the interface.
Demand circuit (Tunnel interfaces only) Configures a tunnel Disabled.
interface as a demand circuit, per RFC 1793. See
“Creating an OSPF Demand Circuit on a Tunnel
Interface” on page 67.
Reduce flooding Specifies the reduction of LSA flooding on a demand Disabled.
circuit.
Ignore MTU Specifies that any mismatches in maximum Disabled.
transmission unit (MTU) values between the local
and remote interfaces that are found during OSPF
database negotiations are ignored. This option
should only be used when the MTU on the local
interface is lower than the MTU on the remote
interface.
NOTE: To form adjacencies, all OSPF routers in an area must use the same hello, dead,
and retransmit interval values.
In the following example, you configure the following OSPF parameters for the
ethernet1 interface:
WebUI
Network > Interfaces > Edit (for ethernet1) > OSPF: Enter the following, then
click Apply:
Hello Interval: 15
Retransmit Interval: 7
Transit Delay: 2
CLI
set interface ethernet1 protocol ospf hello-interval 15
set interface ethernet1 protocol ospf retransmit-interval 7
set interface ethernet1 protocol ospf transit-delay 2
save
Security Configuration
This section describes possible security problems in the OSPF routing domain and
methods of preventing attacks.
NOTE: To make OSPF more secure, you should configure all routers in the OSPF domain
to be at the same security level. Otherwise, a compromised OSPF router can bring
down the entire OSPF routing domain.
Authenticating Neighbors
An OSPF router can be easily spoofed, since LSAs are not encrypted and most
protocol analyzers provide decapsulation of OSPF packets. Authenticating OSPF
neighbors is the best way to fend off these types of attacks.
OSPF provides both simple password and MD5 authentication to validate OSPF
packets received from neighbors. All OSPF packets received on the interface that
are not authenticated are discarded. By default, there is no authentication enabled
on any OSPF interface.
MD5 authentication requires that the same key be used for both the sending and
receiving OSPF routers. You can specify more than one MD5 key on the security
device; each key is paired with a key identifier. If you configure multiple MD5 keys
on the security device, you can then select the key identifier of the key that is to be
used for authenticating communications with the neighbor router. This allows MD5
keys on pairs of routers to be changed periodically with minimal risk of packets
being dropped.
WebUI
Network > Interfaces > Edit (for ethernet1) > OSPF: Enter the following, then
click Apply:
CLI
set interface ethernet1 protocol ospf authentication password 12345678
save
64 Security Configuration
Chapter 3: Open Shortest Path First
WebUI
Network > Interfaces > Edit (for ethernet1) > OSPF: Enter the following, then
click Apply:
Authentication:
MD5 Keys: (select)
1234567890123456
9876543210987654
Key ID: 1
Preferred: (select)
CLI
set interface ethernet1 protocol ospf authentication md5 1234567890123456
set interface ethernet1 protocol ospf authentication md5 9876543210987654
key-id 1
set interface ethernet1 protocol ospf authentication md5 active-md5-key-id 1
save
By default, the OSPF routing instance on a ScreenOS virtual router (VR) forms
adjacencies with all OSPF neighbors communicating on an OSPF-enabled interface.
You can limit the devices on an interface that can form adjacencies with the OSPF
routing instance by defining a list of subnets that contain eligible OSPF neighbors.
Only hosts or routers that reside in the specified subnets can form adjacencies with
the OSPF routing instance. To specify the subnets that contain eligible OSPF
neighbors, define an access list for the subnets at the VR level.
In this example, you configure an access list that permits the hosts on subnet
10.10.10.130/27. You then specify the access list to configure eligible OSPF
neighbors.
WebUI
Network > Routing > Virtual Router (trust-vr) > Access List > New: Enter the
following, then click OK:
Network > Interfaces > Edit (for ethernet1) > OSPF: Enter the following, then
click Apply:
Neighbor List: 4
CLI
set vrouter trust-vr access-list 4
set vrouter trust-vr access-list 4 permit ip 10.10.10.130/27 10
set interface ethernet1 protocol ospf neighbor-list 4
save
Security Configuration 65
Concepts & Examples ScreenOS Reference Guide
In the following example, you specify that a default route not be learned from OSPF.
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit OSPF
Instance: Select the Do Not Add Default-route Learned in OSPF check box, then
click OK.
CLI
set vrouter trust-vr protocol ospf reject-default-route
save
On VRs using ScreenOS, you can configure both the maximum number of hello
packets per hello interval and the maximum number of LSAs that can be received
on an OSPF interface within a certain interval. Packets that exceed a configured
threshold are dropped. By default, the OSPF hello packet threshold is 10 packets per
hello interval (the default hello interval for an OSPF interface is 10 seconds). There
is no default LSA threshold; if you do not set an LSA threshold, all LSAs are
accepted.
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit OSPF
Instance: Enter the following, then click OK:
66 Security Configuration
Chapter 3: Open Shortest Path First
CLI
set vrouter trust-vr protocol ospf hello-threshold 20
save
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit OSPF
Instance: Enter the following, then click OK:
CLI
set vrouter trust-vr protocol ospf lsa-threshold 20 10
save
WebUI
Network > Interfaces > Edit (for tunnel.1) > OSPF: Enter the following, then
click Apply:
CLI
set interface tunnel.1 protocol ospf reduce-flooding
save
On tunnel interfaces that are configured as demand circuits, the security device
suppresses sending OSPF hello packets and periodic refreshment of LSA flooding to
decrease overhead. After the OSPF neighbor reaches Full state (Hellos match and
router and network LSAs reflect all adjacent neighbors), the security device
suppresses periodic hello packets and LSA refreshes. The security device only floods
LSAs in which content has changed.
In the following example, you configure the tunnel.1 interface as a demand circuit.
NOTE: You need to configure the remote peer’s tunnel interface as a demand circuit.
However, you do not need to configure reduced LSA flooding on the remote peer.
WebUI
Network > Interfaces > Edit > OSPF: Enter the following, then click Apply:
CLI
set interface tunnel.1 protocol ospf demand-circuit
save
Setting the link-type (see “Setting the OSPF Link-Type” on page 68)
In the following example, you set the link type of tunnel.1 to point-to-multipoint
(p2mp) to match your networking needs.
WebUI
Network > Interface (Edit) > OSPF: Select Point-to-Multipoint from the Link
Type radio button list.
CLI
set interface tunnel.1 protocol ospf link-type p2mp
save
WebUI
NOTE: You must use the CLI to set the route-deny feature.
CLI
unset interface tunnel.1 route-deny
save
The following are the configuration requirements particular to the security device in
the CO:
1. Configure the VR to run an instance of OSPF, enable OSPF, and then configure
the tunnel.1 interface.
2. Configure the four VPNs and bind them to the tunnel.1 interface.
The following are the configuration requirements particular to the remote security
devices:
1. Configure the VR to run an instance of OSPF and enable OSPF and then
configure the tunnel.1 interface.
Timer values for all of the devices must match for adjacencies to form. Figure 12
shows the described network scenario.
VPN 2 VPN 3
Internet
VPN 1 VPN 4
In Figure 12, four VPNs originate from the San Francisco security device and radiate
out to remote offices in New York, Los Angeles, Montreal, and Chicago.
In this example, you configure the following settings on the CO security device:
2. VPN
2. VPN
3. Policy
NOTE: The WebUI procedures are abbreviated due to the length of the example. The CLI
portion of the example is complete. You can refer ahead to the CLI portion for the
exact settings and values to use.
Network > Interfaces > Edit (for ethernet3) and configure IP address and
zone.
Network > Interface > Edit (for tunnel.1) > OSPF: Select Point-to-Multipoint
from the Link Type radio button list.
2. VPN
VPNs > AutoKey Advanced > Gateway
NOTE: By default route-deny is disabled. However, if you enabled the route-deny feature
at some point, then you need to disable the feature for the proper operation of the
point-to-multipoint tunnel interface.
You can follow these steps to configure the remote office security device. Juniper
Networks security devices learn about neighbors through LSAs.
To complete the configuration shown in Figure 12 on page 70, you must repeat the
following section for each remote device and change the IP addresses, gateway
names and VPN names and set policies to match the network needs. For each
remote site, the trust and untrust zones change.
NOTE: The WebUI procedures are abbreviated due to the length of the example. The CLI
portion of the example is complete. You can refer ahead to the CLI portion for the
exact settings and values to use.
2. VPN
VPNs > AutoKey Advanced > Gateway
3. Policy
Policies (from All zones to All zones) > Click New.
You can view the new changes with the get vrouter vrouter protocol ospf config
command.
This chapter describes the Routing Information Protocol (RIP) version 2 on Juniper
Networks security devices. It contains the following sections:
“Overview” on page 74
73
Concepts & Examples ScreenOS Reference Guide
Overview
Routing Information Protocol (RIP) is a distance vector protocol used as an Interior
Gateway Protocol (IGP) in moderate-sized autonomous systems (AS). ScreenOS
supports RIP version 2 (RIPv2), as defined by RFC 2453. While RIPv2 supports only
simple password (plain text) authentication, the RIP implementation for ScreenOS
also supports MD5 authentication extensions, as defined in RFC 2082.
NOTE: RIP is not supported over unnumbered tunnel interfaces. All interfaces that use
RIP protocol must be numbered. Any attempt to configure and run an
unnumbered interface using RIP may lead to unpredictable routing failure.
RIP is not intended for large networks or networks where routes are chosen based
on real-time parameters such as measured delay, reliability, or load. RIP supports
both point-to-point networks (used with VPNs) and broadcast/multicast Ethernet
networks. RIP supports point-to-multipoint connections over tunnel interfaces with
or without a configured demand circuit. For more information about demand
circuits, see “Demand Circuits on Tunnel Interfaces” on page 93.
RIP sends out messages that contain the complete routing table to every
neighboring router every 30 seconds. These messages are normally sent as
multicasts to address 224.0.0.9 from the RIP port.
The RIP routing database contains one entry for every destination that is reachable
through the RIP routing instance. The RIP routing database includes the following
information:
IPv4 address of a destination. Note that RIP does not distinguish between
networks and hosts.
IP address of the first router along the route to the destination (the next hop).
74 Overview
Chapter 4: Routing Information Protocol
Metric that indicates the distance, or cost, of getting to the destination. Most
RIP implementations use a metric of 1 for each network.
A timer that indicates the time that has elapsed since the database entry was
last updated.
NOTE: Before you configure a dynamic routing protocol on the security device, you
should assign a VR ID, as described in “Routing” on page 13.
This section describes the following basic steps to configure RIP on a security
device:
4. Redistribute routes learned from different routing protocols (such as OSPF, BGP,
or statically configured routes) into the RIP instance.
This section describes how to perform each of these tasks using either the CLI or
the WebUI.
Global parameters, such as timers and trusted RIP neighbors, that are set at the
VR level for RIP (see “Global RIP Parameters” on page 82)
For more information about VRs and configuring a VR on security devices, see
“Routing” on page 13.
WebUI
Network > Routing > Virtual Router (trust-vr) > Edit: Enter a Virtual Router
ID and then Select Create RIP Instance.
CLI
1. Router ID
set vrouter trust-vr router-id 10
2. RIP Routing Instance
set vrouter trust-vr protocol rip
set vrouter trust-vr protocol rip enable
save
NOTE: In the CLI, creating a RIP routing instance is a two-step process. You create the RIP
instance and then enable RIP.
WebUI
Network > Routing > Virtual Router (trust-vr) > Edit > Edit RIP Instance:
Deselect Enable RIP and then click OK.
Network > Routing > Virtual Router (trust-vr) > Edit > Delete RIP Instance
and then click OK at the confirmation prompt.
CLI
unset vrouter trust-vr protocol rip enable
unset vrouter trust-vr protocol rip
save
NOTE: If you disable the RIP routing instance in the VR (see “Deleting a RIP Instance” on
page 76), RIP stops transmitting and processing packets on all RIP-enabled
interfaces in the VR.
WebUI
Network > Interface > Edit (for Trust) > RIP: Select Protocol RIP Enable, then
click Apply.
CLI
set interface trust protocol rip enable
save
WebUI
Network > Interface (for Trust) > RIP: Clear Protocol RIP Enable, then click
Apply.
CLI
unset interface trust protocol rip enable
unset interface trust protocol rip
save
Redistributing Routes
Route redistribution is the exchange of route information between routing
protocols. For example, you can redistribute the following types of routes into the
RIP routing instance in the same virtual router (VR):
Imported routes
You need to configure a route map to filter the routes that are redistributed. For
more information about creating route maps for route redistribution, see “Routing”
on page 13.
Routes imported into RIP from other protocols have a default metric of 10. You can
change the default metric (see “Global RIP Parameters” on page 82).
In this example, you redistribute static routes that are in the subnetwork
20.1.0.0/16 to RIP neighbors in the trust-vr. To do this, you first create an access list
to permit addresses in the 20.1.0.0/16 subnetwork. Then, configure a route map
that permits addresses that match the access list you configured. Use the route map
to specify the redistribution of static routes into the RIP routing instance.
WebUI
Network > Routing > Virtual Router (trust-vr) > Access List > New: Enter the
following, then click OK:
Network > Routing > Virtual Router (trust-vr) > Route Map > New: Enter the
following, then click OK:
Network > Routing > Virtual Router (trust-vr) > Edit > Edit RIP Instance >
Redistributable Rules: Enter the following, then click Add:
CLI
set vrouter trust-vr access-list 20 permit ip 20.1.0.0/16 1
set vrouter trust-vr route-map name rtmap1 permit 1
set vrouter trust-vr route-map rtmap1 1 match ip 20
set vrouter trust-vr protocol rip redistribute route-map rtmap1 protocol static
save
Protocol, which gives RIP and interface details for a virtual router (VR)
Neighbor
In this example, you view detailed information from the RIP database. You can
choose to view all database entries or limit the output to a single database entry by
appending the IP address and mask of the desired VR.
In this example, you specify the trust-vr and append the prefix and IP address
10.10.10.0/24 to view only a single table entry.
WebUI
NOTE: You must use the CLI to view the RIP database.
CLI
get vrouter trust-vr protocol rip database prefix 10.10.10.0/24
save
After you enter the following CLI command, you can view the RIP database entry:
Flags can be one or more of the following: multipath (M), RIP (R), Redistributed (I),
Advertised default (D), Permanent (P), Summary (S), Unreachable (U), or Hold (H).
You can view complete RIP information to check a configuration or verify that saved
changes are active.
WebUI
NOTE: You must use the CLI to view the RIP details.
CLI
get vrouter trust-vr protocol rip
You can view RIP settings, packet details, RIP timer information, and a summarized
interface table.
In the following example you view RIP neighbor information for the trust-vr.
WebUI
NOTE: You must use the CLI to view RIP neighbor information.
CLI
get vrouter trust-vr protocol rip neighbors
In addition to viewing the IP address and RIP version, you can view the following
RIP neighbor information:
Expiration time
Flags: static (S), demand circuit (T), NHTB (N), down (D), up (U), poll (P), or
demand circuit init (I)
In the following example, you can view information about the tunnel.1 interface for
the neighbor residing at IP address 10.10.10.2.
WebUI
NOTE: You must use the CLI to view the RIP interface details.
CLI
get interface tunnel.1 protocol rip neighbor 10.10.10.2
From this summary of information you can view the number of bad packets or bad
routes present, verify any overhead that RIP adds to the connection, and view
authentication settings.
Table 10 lists the RIP global parameters and their default values.
Default
RIP Global Parameter Description Value(s)
Default metric Default metric value for routes imported into RIP from other protocols, such as OSPF 10
and BGP.
Update timer Specifies, in seconds, when to issue updates of RIP routes to neighbors. 30 seconds
Maximum packets per Specifies the maximum number of packets received per update. No maximum
update
Invalid timer Specifies, in seconds, when a route becomes invalid from the time a neighbor stops 180 seconds
advertising the route.
Flush timer Specifies, in seconds, when a route is removed from the time the route is 120 seconds
invalidated.
Maximum neighbors The maximum number of RIP neighbors allowed. Depends on
platform
Trusted neighbors Specifies an access list that defines RIP neighbors. If no neighbors are specified, RIP All neighbors
uses multicasting or broadcasting to detect neighbors on an interface. See are trusted
“Configuring Trusted Neighbors” on page 86.
Allow neighbors on Specifies that RIP neighbors on different subnets are allowed. Disabled
different subnet
Advertise default route Specifies whether the default route (0.0.0.0/0) is advertised. Disabled
Reject default routes Specifies whether RIP rejects a default route learned from another protocol. See Disabled
“Rejecting Default Routes” on page 87.
Incoming route map Specifies the filter for routes to be learned by RIP. None
Outgoing route map Specifies the filter for routes to be advertised by RIP. None
Default
RIP Global Parameter Description Value(s)
Maximum alternate Specifies the maximum number of RIP routes for the same prefix that can be added 0
routes into the RIP route database. See “Setting Alternate Routes” on page 92.
Summarize advertised Specifies advertising of a summary route that corresponds to all routes that fall None
routes within a summary range. See “Enabling and Disabling a Prefix Summary” on
page 91.
RIP protocol version Specifies the version of RIP the VR uses. You can override the version on a Version 2
per-interface basis. See “Setting the RIP Version” on page 89.
Hold-timer Prevents route flapping to the route table. You can specify a value between the 90 seconds
minimum (three times the value of the update timer) and the maximum (sum of the
update timer and the hold timer, not to exceed the value of the flush timer) values.
Retransmit timer Specifies the retransmit interval of triggered responses over a demand circuit. You 5 seconds
can set the retransmit timer and assign a retry count that matches your network 10 retries
needs.
Poll-timer Checks the remote neighbor for the demand circuit to see if that neighbor is up. You 180 seconds
can configure the poll timer in minutes and assign a retry count that matches your 0 retries
network needs. A retry count of zero (0) means to poll forever.
By default, the default route (0.0.0.0/0) is not advertised to RIP neighbors. The
following command advertises the default route to RIP neighbors in the trust-vr VR
with a metric of 5 (you must enter a metric value). The default route must exist in
the routing table.
WebUI
Network > Routing > Virtual Router (trust-vr) > Edit > Edit RIP Instance:
Enter the following, then click OK:
CLI
set vrouter trust-vr protocol rip advertise-def-route metric number 5
save
NOTE: Refer to the ScreenOS CLI Reference Guide: IPv4 Command Descriptions for more
information about global parameters that you can configure in the RIP routing
protocol context.
Table 11 lists the RIP interface parameters and their default values.
You can define incoming and outgoing route maps at the virtual router (VR) level or
at the interface level. A route map that you define at the interface-level takes
precedence over a route map defined at the VR-level. For example, if you define an
incoming route map at the VR level and a different incoming route map at the
interface level, the incoming route map defined at the interface level takes
precedence. For more information, see “Configuring a Route Map” on page 38.
In the following example, you configure the following RIP parameters for the trust
interface:
Set MD5 authentication, with the key 1234567898765432 and the key ID 215.
WebUI
Network > Interfaces > Edit (for Trust) > RIP: Enter the following, then click
OK:
CLI
set interface trust protocol rip authentication md5 1234567898765432 key-id
215
set interface trust protocol rip split-horizon poison-reverse
save
Security Configuration
This section describes possible security problems in the RIP routing domain and
methods of preventing attacks.
NOTE: To make RIP more secure, you should configure all routers in the RIP domain to be
at the same security level. Otherwise, a compromised RIP router can bring down
the entire RIP routing domain.
RIP provides both simple password and MD5 authentication to validate RIP packets
received from neighbors. All RIP packets received on the interface that are not
authenticated are discarded. By default, there is no authentication enabled on any
RIP interface.
MD5 authentication requires that the same key be used for both the sending and
receiving RIP routers. You can specify more than one MD5 key on the security
device; each key is paired with a key identifier. If you configure multiple MD5 keys
on the security device, you can then select the key identifier of the key that is to be
used for authenticating communications with the neighbor router. This allows MD5
keys on pairs of routers to be changed periodically with minimal risk of packets
being dropped.
Security Configuration 85
Concepts & Examples ScreenOS Reference Guide
In the following example, you set the two different MD5 keys on interface ethernet1
and select one of the keys to be the active key. The default key-id is 0 so you do not
have to specify the key-id for the first MD5 key you enter.
WebUI
Network > Interfaces > Edit (for ethernet1) > RIP: Enter the following, then
click Apply:
CLI
set interface ethernet1 protocol rip authentication md5 1234567890123456
set interface ethernet1 protocol rip authentication md5 9876543210987654
key-id 1
set interface ethernet1 protocol rip authentication md5 active-md5-key-id 1
save
In this example, you configure the following global parameters for the RIP routing
instance running in the trust-vr:
WebUI
Network > Routing > Virtual Router (trust-vr) > Access List > New: Enter the
following, then click OK:
Network > Routing > Virtual Router (trust-vr) > Edit > Edit RIP Instance:
Enter the following, then click OK:
86 Security Configuration
Chapter 4: Routing Information Protocol
CLI
set vrouter trust-vr
device(trust-vr)-> set access-list 10 permit ip 10.1.1.1/32 1
device(trust-vr)-> set protocol rip
device(trust-vr/rip)-> set max-neighbor-count 1
device(trust-vr/rip)-> set trusted-neighbors 10
device(trust-vr/rip)-> exit
device(trust-vr)-> exit
save
In the following example, you configure the RIP routing instance running in trust-vr
to reject any default routes that are learned in RIP.
WebUI
Network > Routing > Virtual Router (trust-vr) > Edit > Edit RIP Instance:
Enter the following, then click OK:
CLI
set vrouter trust-vr protocol rip reject-default-route
save
You need to exercise care when configuring an update threshold when neighbors
have large routing tables, as the number of routing updates can be quite high within
a given duration because of flash updates. Update packets that exceed the threshold
are dropped and valid routes may not be learned.
Security Configuration 87
Concepts & Examples ScreenOS Reference Guide
WebUI
Network > Routing > Virtual Router (trust-vr) > Edit > Edit RIP Instance:
Enter the following, then click OK:
CLI
set vrouter trust-vr protocol rip threshold-update 4
save
10.10.0.0/16 2.2.2.2/16
VPN Tunnel
WebUI
Network > Routing > Virtual Router > Edit (for trust-vr) > Create RIP
Instance: Select Enable RIP, then click OK.
Network > Routing > Virtual Router > Access List (for trust-vr) > New: Enter
the following, then click OK:
88 Security Configuration
Chapter 4: Routing Information Protocol
Network > Routing > Virtual Router > Route Map (for trust-vr) > New: Enter
the following, then click OK:
Network > Routing > Virtual Router > Edit (for trust-vr) > Edit RIP Instance:
Select the following, then click OK:
Network > Interfaces > Edit (for tunnel.1) > RIP: Enter the following, then
click Apply:
Network > Interfaces > Edit (for trust) > RIP: Enter the following, then click
Apply:
CLI
set vrouter trust-vr protocol rip
set vrouter trust-vr protocol rip enable
set interface tunnel.1 protocol rip enable
set interface trust protocol rip enable
set vrouter trust-vr access-list 10 permit ip 10.10.0.0/16 10
set vrouter trust-vr route-map name abcd permit 10
set vrouter trust-vr route-map abcd 10 match ip 10
set vrouter trust-vr protocol rip route-map abcd out
save
On the VR, you can configure either RIP version 1 or version 2; the default is
version 2. For sending updates on RIP interfaces, you can configure either RIP
version 1, version 2, or version 1-compatible mode (described in RFC 2453). For
receiving updates on RIP interfaces, you can configure either RIP version 1, version
2, or both version 1 and 2.
NOTE: Using both versions 1 and 2 at the same time is not recommended. Network
complications can result between versions 1 and 2 of the protocol.
For both sending and receiving updates on RIP interfaces, the default RIP version is
the version that is configured for the VR.
In the following example, you set RIP version 1 in trust-vr. For the interface
ethernet3, you set RIP version 2 for both sending and receiving updates.
WebUI
Network > Routing > Virtual Router > Edit (for trust-vr) > Edit RIP Instance:
Select V1 for Version, then click Apply.
Network > Interfaces > Edit (for ethernet3) > RIP: Select V2 for Sending and
Receiving in Update Version, then click Apply.
CLI
set vrouter trust-vr protocol rip version 1
set interface ethernet3 protocol rip receive-version v2
set interface ethernet3 protocol rip send-version v2
save
To verify the RIP version in the VR and on RIP interfaces, you can enter the get
vrouter trust-vr protocol rip command.
In the example above, the security device is running RIP version 1 on the trust-vr;
but RIP version 2 is running on the ethernet3 interface for sending and receiving
updates.
NOTE: You cannot selectively enable summarization for a specific summary range; when
you enable summarization on an interface, all configured summary routes appear
on routing updates.
When configuring the summary route, you cannot specify multiple prefix ranges
that overlap. You also cannot specify a prefix range that includes the default route.
You can optionally specify a metric for the summary route. If you do not specify a
metric, the largest metric for all routes that fall within the summary range is used.
Sometimes a summarized route can create opportunities for loops to occur. You can
configure a route to a NULL interface to avoid loops. For more information about
setting a NULL interface, see “Preventing Loops Created by Summarized Routes” on
page 10.
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit RIP Instance
> Summary IP: Enter the following, then click Add:
Network > Interface > Edit (for ethernet3) > RIP: Select Summarization, then
click Apply.
CLI
set vrouter trust-vr protocol rip summary-ip 10.1.0.0/16
set interface ethernet3 protocol rip summary-enable
save
WebUI
Network > Interfaces > Edit > RIP: Uncheck Summarization, then click
Apply.
CLI
unset vrouter trust-vr protocol rip summary-ip 10.1.0.0/16
unset interface ethernet3 protocol rip summary-enable
save
NOTE: We recommend the use of alternate routes with demand circuits. For more
information about demand circuits, see “Demand Circuits on Tunnel Interfaces”
on page 93.
Only the best route in the RIP database for a given prefix is added to the routing
table of a virtual router (VR) and advertised in RIP updates. If the best route is
removed from the routing table of a VR, then RIP adds the next-best route for the
same prefix from the RIP database. If a new route, which is better than the best
existing route in the routing table of a VR, is added to the RIP database, then RIP
updates to use the new better route to the routing table and stops using the old
route. Depending upon the alternate route limit you configured, RIP may or may
not delete the old route from the RIP database.
You can view the RIP database by issuing this CLI command: get vrouter vrouter
protocol rip database. In the following example, the number of alternate routes for
the RIP database is set to a number greater than 0. The RIP database shows two
entries for the prefix 10.10.70.0/24 in the RIP database, one with a cost of 2 and the
other with a cost of 4. The best route for the prefix, the route with the lowest cost, is
included in the routing table of the VR.
If equal cost multipath (ECMP) routing is enabled (see “Configuring Equal Cost
Multipath Routing” on page 35) and multiple routes of equal cost exist in the RIP
database for a given prefix, then RIP adds multiple routes for the prefix into the
routing table of the VR up to the ECMP limit. In some cases, the alternate route limit
in the RIP database may result in RIP routes not being added to the routing table of
the VR. If the ECMP limit is less than or equal to the alternate route limit in the RIP
database, RIP routes that are not added to the routing table for the VR remain in the
RIP database; these routes are added into the routing table for the VR only if a
previously added route is either deleted or is no longer the “best” RIP route for the
network prefix.
For example, if the ECMP limit is 2 and the alternate route limit in the RIP database
is 3, there can be only two RIP routes for the same prefix with the same cost in the
routing table for the VR. Additional same prefix/same cost routes in the RIP
database can exist, but only two routes are added into the routing table for the VR.
In the following example, you set the number of alternate routes allowed for a
prefix in the RIP database to 1 in trust-vr. This allows one “best” route and one
alternate route for any given prefix in the RIP database in the VR.
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit RIP Instance:
Enter 1 in the Maximum Alternative Route field, then click Apply.
CLI
set vrouter trust-vr protocol rip alt-route 1
save
Demand circuits for RIP eliminate the periodic transmission of RIP packets over the
tunnel interface. To save overhead, the security device sends RIP information only
when changes occur in the routing database. The security device also retransmits
updates and requests until valid acknowledgements are received. The security
device learns RIP neighbors through the configuration of static neighbors; and if the
VPN tunnel goes down, RIP flushes routes learned from the neighbor’s IP address.
Routes learned from demand circuits do not age with RIP timers because demand
circuits are in a permanent state. Routes in permanent state are only removed
under the following conditions:
The VPN tunnel goes down or the demand circuit is down due to an excessive
number of unacknowledged retransmissions
You must configure VPN monitoring with rekey on VPN tunnels in order to learn
tunnel status.
After you configure the demand circuit and the static neighbor(s), you can set the
RIP retransmit-timer, poll-timer, and hold-down-timer to conform to your network
requirements.
Examples of how to configure a demand circuit and a static neighbor follow this
section. A RIP network configuration example with demand circuits over
point-to-multipoint tunnel interfaces begins on page 96.
WebUI
Network > Interfaces > (Edit) RIP: Select Demand Circuit, then click Apply.
CLI
set interface tunnel.1 protocol rip demand-circuit
save
After enabling a demand circuit, you can check its status and timers with the get
vrouter vrouter protocol rip database command. Table 12 lists suggestions for
troubleshooting performance issues influenced by timer settings.
In the following example you configure the RIP neighbor at IP address 10.10.10.2 of
the tunnel.1 interface.
WebUI
Network > Interfaces > (Edit) RIP: Click Static Neighbor IP button to advance
to the Static Neighbor IP table. Enter the IP address of the static neighbor, then
click Add.
CLI
set interface tunnel.1 protocol rip neighbor 10.10.10.2
unset interface tunnel.1 protocol rip neighbor 10.10.10.2
save
CAUTION: RIP is not supported over unnumbered tunnel interfaces. All interfaces
that use RIP protocol must be numbered. Any attempt to configure and run an
unnumbered interface using RIP may lead to unpredictable routing failure.
You must disable split horizon on a point-to-multipoint interface tunnel that you
configure with demand circuits so that messages reach all remote sites. For a
point-to-multipoint tunnel interface without demand circuits, you can leave split
horizon enabled (default). RIP dynamically learns about neighbors. RIP sends all
transmitted messages to the multicast address 224.0.0.9 and reduplicates them to
all tunnels as appropriate.
If you want to set up RIP as a point-to-multipoint tunnel with demand circuits, you
must design your network in a hub-and-spoke configuration.
NOTE: In this example, we only reference the command line interfaces, and we do not
discuss zones and other necessary configuration steps.
The network in this example is a medium-sized enterprise that has a central office
(CO) in San Francisco and remote sites in Chicago, Los Angeles, Montreal, and New
York. Each office has a single security device. See Figure 14 on page 97.
The following are the configuration requirements particular to the security device in
the CO:
1. Configure the VR to run an instance of RIP, enable RIP, and then configure
tunnel.1 interface.
The following are the configuration requirements particular to the remote Juniper
Networks security devices:
1. Configure the VR to run an instance of RIP and enable RIP and then configure
tunnel.1 interface.
3. Do not configure static neighbors on the remote office security devices. The
remote office devices only have one neighboring device that will be discovered
by initial multicast requests.
NOTE: It is not necessary to change the default timer values in this example.
VPN 2 VPN 3
Internet
VPN 1 VPN 4
In the network diagram shown in Figure 14, four VPNs originate from the San
Francisco security device and radiate out to remote offices in New York, Los
Angeles, Montreal, and Chicago.
In this example, you configure the following settings on the CO security device:
2. VPN
4. Static Neighbors
5. Summary Route
To be able to check the circuit status on the device in the CO, you must enable VPN
monitoring.
2. VPN
4. Static Neighbors
5. Summary Route
NOTE: The WebUI procedures are abbreviated due to the length of the example. The CLI
portion of the example is complete. You can refer ahead to the CLI portion for the
exact settings and values to use.
2. VPN
VPNs > AutoKey Advanced > Gateway
Network > Interfaces > Edit > Click Edit and then click RIP, then enable RIP
on the interface.
4. Static Neighbors
Network > Interfaces > Edit > RIP > Static Neighbor IP and then Add
Neighbor IP Address.
5. Summary Route
Network > Routing > Virtual Router Edit (RIP) > Click Summary IP and
configure the summary IP address.
set vpn vpn1 gateway gw1 no-replay tunnel idletime 0 proposal g2-esp-3des-sha
set vpn vpn1 monitor rekey
set vpn vpn1 bind interface tunnel.1
set vpn vpn2 gateway gw2 no-replay tunnel idletime 0 proposal g2-esp-3des-sha
set vpn vpn2 monitor rekey
set vpn vpn2 bind interface tunnel.1
set vpn vpn3 gateway gw3 no-replay tunnel idletime 0 proposal g2-esp-3des-sha
set vpn vpn3 monitor rekey
set vpn vpn3 bind interface tunnel.1
set vpn vpn4 gateway gw4 no-replay tunnel idletime 0 proposal g2-esp-3des-sha
set vpn vpn4 monitor rekey
set vpn vpn4 bind interface tunnel.1
3. Routes and RIP
set vrouter trust protocol rip
set vrouter trust protocol rip enable
set vrouter protocol rip summary-ip 100.10.0.0/16
You can follow these steps to configure the remote office security device. When
setting up the remote office, you do not need to configure static neighbors. In a
demand circuit environment only one neighbor exists for the remote device, and
the remote devices learns this neighbor’s information when it sends a multicast
message at startup.
To complete the configuration shown in the diagram on page 97, you must repeat
this section for each remote device and change the IP addresses, gateway names
and VPN names to match the network needs. For each remote site, the trust and
untrust zones change.
NOTE: The WebUI procedures are abbreviated due to the length of the example. The CLI
portion of the example is complete. You can refer ahead to the CLI portion for the
exact settings and values to use.
2. VPN
VPNs > AutoKey Advanced > Gateway
Network > Interfaces > Edit > Click Edit and then click RIP, then enable RIP
on the interface.
You can view the new changes with the get vrouter vrouter protocol rip neighbors
command. Neighbors for a demand circuit appear in the neighbor table; neighbor
information does not age or expire. You can view the RIP database with the get
vrouter vrouter protocol rip database command. P for permanent appears next to
demand circuit entries.
This chapter describes the Border Gateway Protocol (BGP) on Juniper Networks
security devices. It contains the following sections:
101
Concepts & Examples ScreenOS Reference Guide
Overview
The Border Gateway Protocol (BGP) is a path vector protocol that is used to carry
routing information between Autonomous Systems (ASs). An AS is a set of routers
that are in the same administrative domain.
The BGP routing information includes the sequence of AS numbers that a network
prefix (a route) has traversed. The path information that is associated with the
prefix is used to enable loop prevention and enforce routing policies. ScreenOS
supports BGP version 4 (BGP-4), as defined in RFC 1771.
Two BGP peers establish a BGP session in order to exchange routing information. A
BGP router can participate in BGP sessions with different peers. BGP peers must
first establish a TCP connection between themselves to open a BGP session. Upon
forming the initial connection, peers exchange entire routing tables. As routing table
changes occur, BGP routers exchange update messages with peers. A BGP router
maintains current versions of the routing tables of all the peers with which it has
sessions, periodically sending keepalive messages to peers to verify the
connections.
A BGP peer only advertises those routes that it is actively using. When a BGP peer
advertises a route to its neighbor, it also includes path attributes that describe the
characteristics of the route. A BGP router compares the path attributes and prefix to
select the best route from all paths that are available to a given destination.
Open messages identify BGP peers to each other to initiate the BGP session.
These messages are sent after the peers establish a TCP session. During the
exchange of open messages, BGP peers specify their protocol version, AS
number, hold time and BGP identifier.
Notification messages indicate errors. The BGP session is terminated and then
the TCP session is closed.
NOTE: The security device does not send a Notification message to a peer if, during the
exchange of open messages, the peer indicates that it supports protocol
capabilities that the security device does not support.
Keepalive messages are used to maintain the BGP session. By default, the
security device sends keepalive messages to peers at 60-second intervals. This
interval is configurable.
102 Overview
Chapter 5: Border Gateway Protocol
Path Attributes
BGP path attributes are a set of parameters that describe the characteristics of a
route. BGP couples the attributes with the route they describe, then compares all
paths available to a destination to select the best route to use to reach the
destination. The well-known mandatory path attributes are:
Origin describes where the route was learned—it can be IGP, EGP, or
incomplete.
Next-Hop is the IP address of the router to which traffic for the route is sent.
Multi-Exit Discriminator (MED) is a metric for a path where there are multiple
links between ASs (the MED is set by one AS and used by another AS to choose
a path).
Local-Pref is a metric used to inform BGP peers of the local router’s preference
for the route.
Aggregator specifies the AS and router that performed aggregation of the route.
Cluster List contains a list of the reflector clusters through which the route has
passed
A BGP router can choose to add or modify the optional path attributes before
advertising the route to peers.
Some path attributes are only applicable to EBGP or IBGP. For example, the MED
attribute is only used for EBGP messages, while the LOCAL-PREF attribute is only
present in IBGP messages.
Overview 103
Concepts & Examples ScreenOS Reference Guide
NOTE: Before you configure a dynamic routing protocol on the security device, you
should assign a virtual router ID, as described in “Routing” on page 13.
This section describes how to perform each of these tasks using either the CLI or
the WebUI for the following example. Figure 15 shows the security device as a BGP
peer in AS 65000. You need to configure the security device so that it can establish
a BGP session with the peer in AS 65500.
Autonomous Autonomous
System System
Number Number
Autonomous Systems
AS 65000 AS 65500
BGP Peers
NOTE: Autonomous System (AS) numbers are globally unique numbers that are used to
exchange EBGP routing information and to identify the AS. The following entities
allocate AS numbers: the American Registry for Internet Numbers (ARIN),
Réseaux IP Européens (RIPE), and Asia Pacific Network Information Center
(APNIC). The numbers 64512 through 65535 are for private use and not to be
advertised on the global Internet.
WebUI
1. Router ID
Network > Routing > Virtual Router (trust-vr) > Edit: Enter the following, then
click OK:
CLI
1. Router ID
set vrouter trust-vr router-id 10
2. BGP Routing Instance
set vrouter trust-vr protocol bgp 65000
set vrouter trust-vr protocol bgp enable
save
WebUI
Network > Routing > Virtual Routers (trust-vr) > Edit > Edit BGP Instance:
Deselect BGP Enabled, then click OK.
Network > Routing > Virtual Routers (trust-vr) > Edit: Select Delete BGP
Instance, then click OK at the confirmation prompt.
CLI
unset vrouter trust-vr protocol bgp enable
unset vrouter trust-vr protocol bgp 65000
save
WebUI
Network > Interfaces > Edit> BGP: Check Protocol BGP enable, then click
OK.
CLI
set interface ethernet4 protocol bgp
save
WebUI
Network > Interfaces > Configure (for ethernet4): Uncheck Protocol BGP
enable, then click OK.
CLI
unset interface ethernet4 protocol bgp
save
All BGP sessions are authenticated by checking the BGP peer identifier and the AS
number advertised by the peers. A successful connection with a peer is logged. If
anything goes wrong with the peer connection, a BGP notification message will
either be sent to or received from the peer, which causes the connection to fail or
close.
You can configure parameters for individual peer addresses. You can also assign
peers to a peer-group, which then allows you to configure parameters for the
peer-group as a whole.
NOTE: You cannot assign IBGP and EBGP peers to the same peer group.
Table 13 lists parameters you can configure for BGP peers and the default values. An
“X” in the Peer column indicates a parameter you can configure for an individual
peer IP address while an “X” in the Peer Group column indicates a parameter you
can configure for a peer-group.
Table 13: BGP Peer and Peer Group Parameters and Default Values
Peer
BGP Parameter Peer Group Description Default Value
Advertise default X Advertises the default route in the virtual route to BGP Default route is not
route peers. advertised
EBGP multihop X X Number of nodes between local BGP and neighbor. 0 (disabled)
Force connect X X Causes the BGP instance to drop an existing BGP N/A
connection with the specified peer and accept a new
connection. This parameter is useful when connecting to
a router that goes down, then comes back up and tries
to re-establish BGP peering as it allows faster
re-establishment of the peer connection.1
Hold time X X Time elapsed without a message from a peer before the 180 seconds
peer is considered down.
Keepalive X X Time between keepalive transmissions. 1/3 of hold-time
MD5 X X Configures MD-5 authentication. Only peer identifier and
authentication AS number checked
MED X Configures MED attribute value. 0
Next-hop self X X For routes sent to the peer, the next hop path attribute is Next hop attribute
set to the IP address of the interface of the local virtual unchanged
router.
Reflector client X X Peer is a reflector client when the local BGP is set as the None
route reflector.
Reject default X Ignores default route advertisements from BGP peers. Default routes from peers
route are added to routing table
Peer
BGP Parameter Peer Group Description Default Value
Retry time X X Time after a failed session attempt that the BGP session 120 seconds
is reattempted.
Send X X Transmits community attribute to peer. Community attribute not
community sent to peers
Weight X X Priority of path between local BGP and peer. 100
1.You can use the exec neighbor disconnect command to cause the BGP instance to drop an existing BGP connection with the
specified peer and accept a new connection. Using this exec command does not change the configuration of the BGP peer. For
example, you can use this exec command if you change the configuration of the route map that is applied to the peer.
You can configure some parameters at both the peer level and the protocol level
(see “Configuring a Confederation” on page 120). For example, you can configure
the hold-time value for a specific peer at 210 seconds, while the default hold-time
value at the protocol level is 180 seconds; the peer configuration takes precedence.
You can set different MED values at the protocol level and at the peer level; the MED
value you set at the peer level applies only to routes that are advertised to those
peers.
IP address 1.1.1.250
Resides in AS 65500
NOTE: You must enable each peer connection that you configure.
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Neighbors: Enter the following, then click Add:
AS Number: 65500
Remote IP: 1.1.1.250
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Neighbors > Configure (for the peer you just added): Select Peer Enabled,
then click OK.
CLI
set vrouter trust-vr protocol bgp neighbor 1.1.1.250 remote-as 65500
set vrouter trust-vr protocol bgp neighbor 1.1.1.250 enable
save
NOTE: You must enable each peer connection that you configure. If you configure peers
as part of a peer group, you still need to enable the peer connections one by one.
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Peer Group: Enter ibgp for Group Name, then click Add.
> Configure (for ibgp): In the Peer authentication field, enter verify03,
then click OK.
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Neighbors: Enter the following, then click Add:
AS Number: 65000
Remote IP: 10.1.2.250
Peer Group: ibgp (select)
AS Number: 65000
Remote IP: 10.1.3.250
Peer Group: ibgp (select)
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Neighbors > Configure (for 10.1.2.250): Select Peer Enabled, then click OK.
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Neighbors > Configure (for 10.1.3.250): Select Peer Enabled, then click OK.
CLI
set vrouter trust-vr protocol bgp neighbor peer-group ibgp
set vrouter trust-vr protocol bgp neighbor peer-group ibgp remote-as 65000
set vrouter trust-vr protocol bgp neighbor peer-group ibgp md5-authentication
verify03
set vrouter trust-vr protocol bgp neighbor 10.1.2.250 remote-as 65000
set vrouter trust-vr protocol bgp neighbor 10.1.2.250 peer-group ibgp
set vrouter trust-vr protocol bgp neighbor 10.1.3.250 remote-as 65000
set vrouter trust-vr protocol bgp neighbor 10.1.3.250 peer-group ibgp
set vrouter trust-vr protocol bgp neighbor 10.1.2.250 enable
set vrouter trust-vr protocol bgp neighbor 10.1.3.250 enable
save
output continues...
exit
You can verify that BGP is running on the virtual router by executing the get vrouter
vrouter protocol bgp command.
You can view the administrative state of the virtual router (VR) and the router ID, as
well as all other configured parameters particular to BGP.
NOTE: We recommend that you explicitly assign a router ID rather than use the default.
For information on setting a router ID, see “Routing” on page 13.
You can verify that a BGP peer or peer group is enabled and see the state of the BGP
session by executing the get vrouter vrouter protocol bgp neighbor command.
In this example you can verify that the BGP peer is enabled and the session is
active.
NOTE: A session state that continually changes between the Active and Connect may
indicate a problem with the connection between the peers.
Security Configuration
This section describes possible security problems in the BGP routing domain and
methods of preventing attacks.
NOTE: To make BGP more secure, you should configure all routers in the BGP domain to
be at the same security level. Otherwise, a compromised BGP router can bring
down the entire BGP routing domain.
BGP provides MD5 authentication to validate BGP packets received from peer. MD5
authentication requires that the same key be used for both the sending and
receiving BGP routers. All BGP packets received from the specified peer that are not
authenticated are discarded. By default, only the peer identifier and AS number are
checked for a BGP peer.
In the following example, you first configure a BGP peer with the remote IP address
1.1.1.250 in AS 65500. You then configure the peer for MD5 authentication using
the key 1234567890123456.
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Neighbors: Enter the following, then click Add:
AS Number: 65500
Remote IP: 1.1.1.250
> Configure (for Remote IP 1.1.1.250): Enter the following, then click OK:
CLI
set vrouter trust-vr
(trust-vr)-> set protocol bgp
(trust-vr/bgp)-> set neighbor 1.1.1.250 remote-as 65500
(trust-vr/bgp)-> set neighbor 1.1.1.250 md5-authentication 1234567890123456
(trust-vr/bgp)-> set neighbor 1.1.1.250 enable
(trust-vr/bgp)-> exit
(trust-vr)-> exit
save
In this example, you configure the BGP routing instance running in the trust-vr to
ignore any default routes that are sent from BGP peers.
WebUI
Network > Routing > Virtual Router (trust-vr) > Edit > Edit BGP Instance:
Enter the following, then click OK:
CLI
set vrouter trust-vr protocol bgp reject-default-route
save
Imported routes
When you configure route redistribution, you must first specify a route map to filter
the routes that are redistributed. For more information about creating route maps
for route redistribution, see “Routing” on page 13.
In the following example, you redistribute a route that originated from an OSPF
routing domain into the current BGP routing domain. Both the CLI and WebUI
examples assume that you previously created a route map called add-ospf.
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Redist. Rules: Enter the following, then click Add:
CLI
set vrouter trust-vr protocol bgp redistribute route-map add-ospf protocol ospf
save
Regular expressions are a way to define a search for specific pattern in the AS-path
attribute. You can use special symbols and characters in constructing a regular
expression. For example, to match routes that have passed through AS 65000, use
the regular expression _65000_ (the underscores match any characters before or
after 65000). You can use the regular expression “65000$” to match routes that
originated in AS 65000 (the dollar sign matches the end of the AS-path attribute,
which would be the AS where the route originated).
The following example configures an AS-path access list for the trust-vr that allows
routes that have passed through AS 65000 but does not allow routes that originated
in AS 65000.
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> AS Path: Enter the following, then click Add:
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> AS Path: Enter the following, then click Add:
CLI
set vrouter trust-vr protocol bgp as-path-access-list 2 deny 65000$
set vrouter trust-vr protocol bgp as-path-access-list 2 permit _65000_
save
By selecting “Yes” to the check reachability option, you can specify whether a
different network prefix must be reachable from the VR before BGP advertises
the route to peers. For example, if the prefix you want BGP to advertise must be
reached through a specific router interface, you want to ensure that the router
interface is reachable before BGP advertises the network to peers. If the router
interface you specify is reachable, BGP advertises the route to its peers. If the
router interface you specify is not reachable, the route is not added to BGP and
is consequentially not advertised to BGP peers. If the router interface you
specify becomes unreachable, BGP withdraws the route from its peers.
By selecting “No” to the check reachability option, you can specify that the
network prefix always be advertised whether reachable from the VR or not. By
default, the network prefix must be reachable from the VR before BGP
advertises the route to peers. If you enable check reachability, the route can be
connected.
You can assign a weight value to the network prefix. The weight is an attribute
that you can assign locally to a route; it is not advertised to peers. If there is
more than one route to a destination, the route with the highest weight value is
preferred.
You can set the attributes of the route to those specified in a route map (see
“Configuring a Route Map” on page 38). BGP advertises the route with the route
attributes specified in the route map.
4.4.4.0/24
5.5.5.0/24
Internet
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Networks: Enter the following, then click Add:
IP/Netmask: 4.4.4.0/24
Check Reachability:
Yes: (select), 5.5.5.0/24
CLI
set vrouter trust-vr protocol bgp network 4.4.4.0/24 check 5.5.5.0/24
save
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Networks: Enter the following, then click Add:
IP/Netmask: 4.4.4.0/24
Weight: 100
CLI
set vrouter trust-vr protocol bgp network 4.4.4.0/24 weight 100
save
WebUI
Network > Routing > Virtual Router > Route Map (for trust-vr) > New: Enter
the following, then click OK:
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Networks: Enter the following, then click Add:
IP/Netmask: 4.4.4.0/24
Route Map: setattr (select)
CLI
set vrouter trust-vr route-map name setattr permit 1
set vrouter trust-vr route-map setattr 1 metric 100
set vrouter trust-vr protocol bgp network 4.4.4.0/24 route-map setattr
save
Route-Refresh Capability
The BGP route-refresh feature as defined in RFC 2918 provides a soft reset
mechanism that allows the dynamic exchange of route refresh requests and routing
information between BGP peers and the subsequent re-advertisement of the
outbound or inbound routing table.
Routing policies for a BGP peer using route-maps might impact inbound or
outbound routing table updates because whenever a route policy change occurs, the
new policy takes effect only after the BGP session is reset. A BGP session can be
cleared through a hard or soft reset.
NOTE: A hard reset is disruptive because active BGP sessions are torn down and brought
back up.
A soft reset allows the application of a new or changed policy without clearing an
active BGP session. The route-refresh feature allows a soft reset to occur on a
per-neighbor basis and does not require preconfiguration or extra memory.
A dynamic inbound soft reset is used to generate inbound updates from a neighbor.
An outbound soft reset is used to send a new set of updates to a neighbor.
Outbound resets don't require preconfiguration or routing table update storage.
The route refresh feature requires that both BGP peers advertise route-refresh
feature support in the OPEN message. If the route-refresh method is successfully
negotiated, either BGP peer can use the route-refresh feature to request full routing
information from the other end.
NOTE: Use the get neighbor ip_addr command, an administrator can check whether the
route-refresh capability is negotiated. The command also displays counters, such
as the number of times the route-refresh request is sent or received.
NOTE: If the route refresh feature is not available, the command throws an exception
when the administrator tries to use it.
WebUI
This feature is not available in the WebUI.
CLI
clear vrouter trust-vr protocol bgp neighbor 10.10.10.10 soft-in
WebUI
This feature is not available in the WebUI.
CLI
clear vrouter trust-vr protocol bgp neighbor 10.10.10.10 soft-out
NOTE: Having a full mesh does not mean each pair of routers needs to be directly
connected, but each router needs to be able to establish and maintain an IBGP
session with every other router.
A full-mesh configuration of IBGP sessions does not scale well. For example, in an
AS with 8 routers, each of the 8 routers would need to peer with the 7 other routers,
which can be calculated with this formula:
x x–1 2
For an AS containing 8 routers, the number of full-mesh IBGP sessions would be 28.
Route reflection is a method for solving the IBGP scalability problem (described in
RFC 1966). A route reflector is a router that passes IBGP learned routes to specified
IBGP neighbors (clients), thus eliminating the need for full-mesh sessions. The route
reflector and its clients make up a cluster, which you can further identify with a
cluster ID. Routers outside of the cluster treat the entire cluster as a single entity,
instead of interfacing with each individual router in full mesh. This arrangement
greatly reduces overhead. The clients exchange routes with the route reflector, while
the route reflector reflects routes between clients.
The local virtual router (VR) of the security device can act as a route reflector and
can be assigned a cluster ID. If you specify a cluster ID, the BGP routing instance
appends the cluster ID to the Cluster-List attribute of a route. The cluster ID helps
prevent routing loops as the local BGP routing instance drops a route when its
cluster ID appears in the route’s cluster list.
NOTE: Before you can configure a cluster ID, the BGP routing instance must be disabled.
After you set up a route reflector on the local VR, you then define the route
reflector’s clients. You can specify individual IP addresses or a peer-group for the
clients. You do not need to configure anything on the clients.
In the following example, the EBGP router advertises the 5.5.5.0/24 prefix to Client
3. Without route reflection, Client 3 advertises the route to Device-A, but Device-A
does not readvertise that route to Clients 1 and 2. If you configure Device-A as the
route reflector with Clients 1, 2, and 3 as its clients, Device-A readvertises routes
received from Client 3 to Clients 1 and 2. See Figure 17.
Autonomous Autonomous
System System
Number Autonomous Systems Number
AS 65000 AS 65500
Router ID
Client 1 2.2.2.250
Router ID
1.1.3.250
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP
Instance: Enter the following, then click Apply:
AS Number: 65000
Remote IP: 1.1.2.250
AS Number: 65000
Remote IP: 1.1.3.250
AS Number: 65000
Remote IP: 1.1.4.250
> Configure (for Remote IP 1.1.2.250): Select Reflector Client, then click
OK.
> Configure (for Remote IP 1.1.3.250): Select Reflector Client, then click
OK.
> Configure (for Remote IP 1.1.4.250): Select Reflector Client, then click
OK.
CLI
set vrouter trust-vr protocol bgp reflector
set vrouter trust-vr protocol bgp reflector cluster-id 99
set vrouter trust-vr protocol bgp neighbor 1.1.2.250 remote-as 65000
set vrouter trust-vr protocol bgp neighbor 1.1.2.250 reflector-client
set vrouter trust-vr protocol bgp neighbor 1.1.3.250 remote-as 65000
set vrouter trust-vr protocol bgp neighbor 1.1.3.250 reflector-client
set vrouter trust-vr protocol bgp neighbor 1.1.4.250 remote-as 65000
set vrouter trust-vr protocol bgp neighbor 1.1.4.250 reflector-client
save
Configuring a Confederation
Like route reflection (see “Configuring Route Reflection” on page 118),
confederations are another approach to solving the problem of full-mesh scaling in
an IBGP environment and are described in RFC 1965. A confederation splits an
autonomous system into several smaller ASs, with each sub-AS a fully meshed IBGP
network. A router outside the confederation sees the entire confederation as a
single autonomous system with a single identifier; the sub-AS networks are not
visible outside the confederation. Sessions between routers in two different sub-ASs
in the same confederation, known as EIBGP sessions, are essentially EBGP sessions
between autonomous systems, but the routers also exchange routing information as
if they were IBGP peers. Figure 18 illustrates BGP confederations.
Autonomous Systems
AS 65000 (Confederation)
Sub-Autonomous Systems
The sub-AS number (this is the AS number that you specify when you create the
BGP routing instance)
The confederation to which the sub-AS belongs (this is the AS number that is
visible to BGP routers outside the confederation)
Whether the confederation supports RFC 1965 (the default) or RFC 3065
NOTE: The AS-Path attribute (see “Path Attributes” on page 103) is normally composed of
a sequence. ASs traversed by the routing update. RFC 3065 allows for the AS-Path
attribute to include the member ASs in the local confederation traversed by the
routing update.
Figure 19 shows the security device as a BGP router in sub-AS 65003 that belongs to
the confederation 65000. The peer sub-ASs in confederation 65000 are 65002 and
65003.
AS 65000 (Confederation)
Security Device
Sub-Autonomous Systems
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Create BGP
Instance: Enter the following, then click Apply:
Enable: (select)
ID: 65000
Supported RFC: RFC 1965 (select)
CLI
set vrouter trust-vr protocol bgp 65003
set vrouter trust-vr protocol bgp confederation id 65000
set vrouter trust-vr protocol bgp confederation peer 65001
set vrouter trust-vr protocol bgp confederation peer 65002
set vrouter trust-vr protocol bgp enable
save
BGP Communities
The communities path attribute provides a way of grouping destinations (called
communities), which a BGP router can then use to control the routes it accepts,
prefers, or redistributes to peers. A BGP router can either append communities to a
route (if the route does not have a communities path attribute) or modify the
communities in a route (if the route contains a communities path attribute). The
communities path attribute provides an alternative to distributing route information
based on IP address prefixes or AS path attribute. You can use the communities
path attribute in many ways, but its primary purpose is to simplify configuration of
routing policies in complex networking environments.
A well-known community signifies special handling for routes that contain these
community values. The following are well-known community values that you
can specify for BGP routes on the security device:
no-export: Routes with this communities path attribute are not advertised
outside a BGP confederation.
You can use a route map to filter routes that match a specified community list,
remove or set the communities path attributes in routes, or add or delete
communities from the route.
For example, if an ISP provides Internet connectivity to its customers, then all
routes from those customers can be assigned a specific community number. Those
customer routes are then advertised to peer ISPs. Routes from other ISPs are
assigned different community numbers and are not advertised to peer ISPs.
Route Aggregation
Aggregation is a technique for summarizing ranges of routing addresses (known as
contributing routes) into a single route entry. There are various optional parameters
you can set when configuring an aggregated route. This section presents examples
of aggregate route configuration.
NOTE: If you use the AS-Set option with an aggregated route, a change in a contributing
route can cause the path attribute in the aggregated route to also change. This
causes BGP to readvertise the aggregated route with the changed path attribute.
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Aggregate Address: Enter the following, then click Apply:
CLI
set vrouter trust protocol bgp
set vrouter trust protocol bgp aggregate
set vrouter trust protocol bgp aggregate 1.0.0.0/8 as-set
set vrouter trust protocol bgp enable
save
In the following example, BGP advertises the aggregate route 1.0.0.0/8, but
more-specific routes are filtered out from outgoing route updates.
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Aggregate Address: Enter the following, then click Apply:
CLI
set vrouter trust protocol bgp aggregate 1.0.0.0/8 summary-only
save
In the next example, you want routes in the 1.2.3.0/24 range to be filtered out from
updates that include the aggregate route 1.0.0.0/8. To do this, you first configure an
access list that specifies the routes to be filtered out (1.2.3.0/24). You then configure
a route map ‘noadvert’ to permit routes 1.2.3.0/24. You then configure an aggregate
route 1.0.0.0/8 and specify the route map ‘noadvert’ as a suppress option for
outgoing updates.
WebUI
Network > Routing > Virtual Router > Access List (for trust-vr) > New: Enter
the following, then click OK:
Network > Routing > Virtual Router > Route Map (for trust-vr) > New: Enter
the following, then click OK:
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Aggregate Address: Enter the following, then click Apply:
CLI
set vrouter trust-vr access-list 1 permit ip 1.2.3.0/24 777
set vrouter trust-vr route-map name noadvert permit 2
set vrouter trust-vr route-map noadvert 2 match ip 1
set vrouter trust protocol bgp aggregate 1.0.0.0/8 suppress-map noadvert
save
WebUI
Network > Routing > Virtual Router > Access List (for trust-vr) > New: Enter
the following, then click OK:
Network > Routing > Virtual Router > Access List (for trust-vr) > New: Enter
the following, then click OK:
Network > Routing > Virtual Router > Route Map (for trust-vr) > New: Enter
the following, then click OK:
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Aggregate Address: Enter the following, then click Apply:
CLI
set vrouter trust-vr access-list 3 deny ip 1.5.6.0/24 888
set vrouter trust-vr access-list 3 permit ip 1.5.0.0/16 999
set vrouter trust-vr route-map name advertset permit 4
set vrouter trust-vr route-map advertset 4 match ip 3
set vrouter trust protocol bgp aggregate 1.0.0.0/8 advertise-map advertset
save
WebUI
Network > Routing > Virtual Router > Route Map (for trust-vr) > New: Enter
the following, then click OK:
Network > Routing > Virtual Routers > Edit (for trust-vr) > Edit BGP Instance
> Aggregate Address: Enter the following, then click Apply:
CLI
set vrouter trust-vr route-map name aggmetric permit 5
set vrouter trust-vr route-map aggmetric 5 metric 1111
set vrouter trust protocol bgp aggregate 1.0.0.0/8 attribute-map aggmetric
save
This chapter describes policy based routing (PBR). PBR provides a flexible routing
mechanism for data forwarding over networks that rely on Application Layer
support such as for antivirus (AV), deep inspection (DI), or Web filtering.
127
Concepts & Examples ScreenOS Reference Guide
When a packet enters the security device, ScreenOS checks for PBR as the first part
of the route-lookup process, and the PBR check is transparent to all non-PBR traffic.
PBR is enabled at the interface level and configured within a virtual router context;
but you can choose to bind PBR policies to an interface, a zone, a virtual router (VR),
or a combination of interface, zone, or VRs.
You use the following three building blocks to create a PBR policy:
Match groups
Action groups
Extended Access-Lists
Extended access-lists list the match criteria you define for PBR policies. PBR match
criteria determine the path of a particular data traffic flow. Match criteria include
the following:
Source IP address
Destination IP address
Source port
Destination port
Match Groups
Match groups provide a way to organize (by group, name and priority) extended
access lists. Match groups associate an extended access-list ID number with a
unique match group name and a match-group ID number. This match-group ID
number defines the order in which you want the security device to process the
extended ACL lists. You can assign multiple extended access-lists to the same
match-group.
Action Groups
Action groups specify the route that you want a packet to take. You specify the
“action” for the route by defining the next interface, the next-hop, or both.
NOTE: Monitoring reachability does not refer to Layer 3 tracking or Layer 2 Address
Resolution Protocol (ARP) lookups.
If you associate the action entry with only a next-interface, link state
determines reachability.
If the next-interface is up, the action entry is reachable. Any interface including
all the logical interfaces, such as tunnel, aggregate, or redundant, that are
visible in the VR in which the policy resides are candidates for next-interface.
For example, if you configure the action entry with a NULL interface, the action
entry is reachable all the time. With a NULL interface as the next interface, PBR
lookup always succeeds; so, ScreenOS stops the route lookup and discards the
packet(s).
If you associate the action group with a next-hop only, that next-hop must be
reachable through a route entry in the destination routes routing table. The
configured next-hop is reachable as long as a valid route exists in the
destination routes routing table to resolve the next-hop.
If the next hop is reachable but the next interface is a NULL interface, ScreenOS
drops the packet. If you configure the action entry with a NULL interface as the
next interface and the next hop as a static route, ScreenOS passes the packet(s)
to the static route.
At the time of configuration, you also assign a sequence number to specify the
order in which you want the action group entry processed.
1. ScreenOS applies the PBR policy bound to the in-interface to the packet.
2. If no interface-level PBR policy exists, then ScreenOS applies the PBR policy
bound to the zone associated with the in-interface to the packet.
3. If no zone-level PBR policy exists, then ScreenOS applies the PBR policy bound
to the VR associated with the in-interface to the packet.
ScreenOS locates the match group and then processes the action group entries. The
first reachable action entry from the action-group with a valid route is used to
forward the packet. If no reachable route exists among the action entries, then a
regular route lookup is performed.
If the action entry is reachable, ScreenOS performs a route lookup with the
preferred interface as the next-interface (if specified) and the next-hop as the IP
address (if specified) instead of using the destination IP. If a route matches the
indicated next-interface and next-hop, ScreenOS forwards the packet. Otherwise,
ScreenOS uses the destination IP address.
NOTE: For more information about route lookup, see Volume 2: Fundamentals.
Configuring PBR
Figure 20 shows one way PBR differentiates service-traffic paths by sending HTTP
traffic along one path and HTTPS traffic along another. Figure 20 shows two nodes,
one at 172.18.1.10 and another at 172.18.2.10. When the security device receives
HTTP traffic, ScreenOS routes the traffic through the 172.24.76.1 router; and when
the security device receives HTTPS traffic, ScreenOS routes the traffic through the
172.24.76.2 router.
The opposite is true for the 172.18.2.10 node. HTTP traffic from the 172.18.2.10
node flows to the 172.24.76.2 router, and HTTPS traffic flows to the 172.24.76.1
router.
Figure 20: Routing HTTP and HTTPS Traffic with Policy Based Routing
172.24.76.1 172.24.76.2
Left Router Right Router
172.24.76.71/22
HTTP traffic flows from 172.18.2.10/24 to the 172.24.76.2 router
HTTPS traffic flows from 172.18.1.10/24 to the 172.24.76.1 router
10.25.10.0/24
172.18.1.10/24 172.18.2.10.24
In this example on page 131, the ingress VR is the trust-vr. If you are using the CLI,
you need to enter the virtual router context. This example requires two access lists:
10 and 20. The access sequence number is a number from 1 to 99. Entries 1 and 2
are required for each extended access list.
NOTE: Optionally, you can also add a type of service (TOS) number, which is a number
from 1 to 255. A TOS number is not required in this example.
Access list 10 defines the source IP address as 172.18.1.10, the destination port as
80, and the protocol as TCP. The destination point for access list 10 defines the
destination IP address as 172.18.2.10, the destination port as 443, and the protocol
as TCP.
Access list 20 defines the source IP address as 172.18.2.10, the destination port as
443, and the protocol as TCP. The destination point for access list 10 defines the
destination IP address as 172.18.1.10, the destination port as 80, and the protocol
as TCP.
In the CLI after configuring the extended access list, you exit the virtual router
context. The WebUI example only shows the creation of access list 10.
WebUI
Network > Routing > PBR > Extended ACL List: Select the virtual router from
the drop-down list, then click New to view the Configuration page.
Click New to configure a second entry for access list 10 and enter the following
information:
CLI
set vrouter trust-vr
set access-list extended 10 src-ip 172.18.1.10/32 dest-port 80-80 protocol tcp
entry 1
set access-list extended 10 src-ip 172.18.2.10/32 dest-port 443-443 protocol tcp
entry 2
set access-list extended 20 src-ip 172.18.2.10/32 dest-port 80-80 protocol tcp
entry 1
set access-list extended 20 src-ip 172.18.1.10/32 dest-port 443-443 protocol tcp
entry 2
exit
In the example on page 131, you need to configure two match-groups: Left Router
and Right Router. You bind extended access list 10 to Left Router and extended
access list 20 to Right Router. A match group name is a unique identifier of no more
than 31 alphanumeric characters.
The ingress VR is the trust-vr. If you are using the CLI, you need to enter the virtual
router context. In the CLI after configuring the extended access list, you exit the
virtual router context.
The WebUI example only shows the creation of a match group for Left Router.
WebUI
Network > Routing > PBR > Match Group > Select the correct virtual router
from the drop-down list, then click New to view the Match Group Configuration
page. Enter the following information to configure Left Router:
CLI
set vrouter trust-vr
set match-group name left_router
set match-group left ext-acl 10 match-entry 1
set match-group name right_router
set match-group right ext-acl 20 match-entry 1
exit
In the example on page 131 two different action groups are possible: the security
device can forward to traffic to the left router or the right router. For this reason, you
need to configure two different action groups.
1. Enter the virtual routing context. In this example, the virtual router is the
trust-vr.
2. Name the action-group with a meaningful, unique name. In this example, the
names action-right and action-left are descriptive of the possible traffic flows.
3. Configure the action-group details. In this example, you set the next-hop
address for each action-group and then assign a number to indicate the
processing priority. In this example, the priority of each action-group is 1.
WebUI
Network > Routing > PBR > Action Group > Click New to view the
Configuration page
CLI
set vrouter trust-vr
set action-group name action-right
set action-group action-right next-hop 172.24.76.2 action-entry 1
set action-group name action-left
set action-group action-left next-hop 172.24.76.1 action-entry 1
exit
Each PBR policy needs to have a unique name. In this example, the policy is named
redirect-policy.
A PBR policy can contain a match group name and action group name. In this
example, traffic can flow two different ways, so two different statements are
required: action-left with sequence number 1 and action-right with sequence
number 2. The policy statement with sequence number 1 is processed first.
WebUI
Network > Routing > PBR > Policy > Click New to view the Configuration
page
CLI
set vrouter trust-vr
set pbr policy name redirect-policy
set pbr policy redirect-policy match-group left action-group action-left 1
set pbr policy redirect-policy match-group right action-group action-right 2
exit
WebUI
Network > Routing > PBR > Policy Binding
CLI
set interface trust pbr redirect-policy
WebUI
Network > Routing > PBR > Policy Binding
CLI
set zone trust pbr redirect-policy
WebUI
Network > Routing > PBR > Policy Binding
CLI
set vrouter trust-vr pbr redirect-policy
In the CLI you can specify to view one particular extended access list. In the second
CLI example, the sample output shows that two extended access lists exist in the
trust-vr, but the user indicated extended access list 2. As specified, ScreenOS
returned two access-list entries, 10 and 20, for the second extended access list only.
WebUI
Network > Routing > PBR > Access List Ext
CLI 1
get vrouter trust-vr pbr access-list configuration
Sample output:
CLI 2
get vrouter trust-vr pbr access-list 2
Sample output:
WebUI
Network > Routing > PBR > Match Group
CLI
get vrouter trust-vr pbr match-group config
Sample output:
WebUI
Network > Routing > PBR > Action Group
CLI 1
get vrouter trust-vr pbr action-group configuration
Sample output:
CLI 2
get vrouter trust-vr pbr match-group name pbr1_ag2
Sample output:
WebUI
Network > Routing > PBR > Policy
CLI
get vrouter trust-vr pbr policy config
Sample output:
CLI
get vrouter trust-vr pbr policy name pbr1_policy
Sample output:
WebUI
Network > Routing > PBR > Access List Ext
Network > Routing > PBR > Match Group
Network > Routing > PBR > Action Group
Network > Routing > PBR > Policy
CLI
get vrouter trust-vr pbr configuration
Sample output:
NOTE: You could also configure PBR to send traffic specific for anti-spam, deep
inspection (DI), intrusion detection and prevention (IDP), Web filtering, or
caching.
You can combine several types of Juniper Networks security devices to work
together to provide services while keeping network processing speed fast and AV
scanning manageable. Figure 21 shows a security device running PBR to segregate
AV traffic from all other traffic (right).
TCP Traffic
AV Scanner
For example, if you want use PBR to offload only HTTP, SMTP, and POP3 traffic for
AV processing, at a minimum you need to use at least one security device with four
available 10/100 interfaces to provide routing and one security device to provide the
application (AV) support.
NOTE: If you have only three 10/100 interfaces available, you can place a switch between
the two security devices and use VLAN tagging (802.1q) to set up the same paths
for the traffic.
In the following example, you perform the following steps to set up the security
device that provides the routing paths:
1. Configure routing.
The next sections explain each of these steps. The examples show only CLI
commands and output.
Routing
In this example, you need to create two custom zones:
Using the information shown in Table 15, you set up four 10/100 Ethernet
interfaces.
After setting up the zones, interfaces and routes, you need to perform the following
two tasks:
1. Configure a static route from the untrust-vr to the trust-vr. Assign a gateway IP
address of 10.251.10.0/24 and a preference value of 20 to the entry:
2. Configure the NULL interface with a preference value greater than zero (0) from
the Trust interface to the Untrust interface:
You can verify the changes with the get route command:
Routing Table:
IPv4 Dest-Routes for <untrust-vr> (6 entries)
----------------------------------------------------------------------------
ID IP-Prefix Interface Gateway P Pref Mtr Vsys
----------------------------------------------------------------------------
* 6 0.0.0.0/0 eth4 172.24.76.1 C 0 1 Root
* 3 10.251.10.0/24 n/a trust-vr S 20 0 Root
* 4 172.24.76.0/22 eth4 0.0.0.0 C 0 0 Root
* 2 192.168.101.1/32 eth3 0.0.0.0 H 0 0 Root
* 5 172.24.76.127/32 eth4 0.0.0.0 H 0 0 Root
* 1 192.168.101.0/24 eth3 0.0.0.0 C 0 0 Root
PBR Elements
After you configure the interfaces and routes, you configure PBR. For PBR to work
correctly, you must configure the following items for the trust-vr:
Match group
Action group
PBR policy
NOTE: You do not need to set up an extended access list for the return traffic because the
security device performs a session lookup before a route lookup and then applies a
PBR policy as necessary. Return traffic has an existing session.
When any client in the 10.251.10.0/24 subnet initiates traffic that uses TCP to
port 80, 110, or 25, you want ScreenOS to match that traffic to extended access list
criteria and to perform the action associated with the access list. The action forces
ScreenOS to route the traffic as you indicate and not like other traffic. Each access
list needs three entries, one for each kind of TCP traffic that you are targeting.
To configure the extended access list for the trust-vr, enter the following commands:
Match Groups
A match group associates an extended access list with a meaningful name that gets
referenced in the PBR policy. You first enter a virtual router context, then create a
match group, and finally add an entry that associates the newly created match
group name with an access list and entry number.
Action Group
Next, you create an action-group, which indicates where to send the packet. For this
example, you create an action group for the trust-vr with the action set to send the
traffic to the next hop.
CAUTION: If the action is to send traffic to the next interface, the link-state change
will activate/deactivate the routing policy.
With next hop, the action resolves with Address Resolution Protocol (ARP).
For the trust-vr, you redirect traffic with the next hop statement through
192.168.100.254 by entering the following commands:
PBR Policies
Next, you define the PBR policy, which requires the following elements:
Interface Binding
Finally, you bind the PBR policy to the ingress interface, e1.
To bind the PBR policy to its ingress interface, enter the following commands:
You can also implement load balancing if you create an active/active NSRP
configuration. One device could process traffic from the lower /25 subnet, and the
other device could process traffic from the higher /25 subnet. Each device backs up
the other.
This chapter introduces basic multicast routing concepts. It contains the following
sections:
Overview
Enterprises use multicast routing to transmit traffic, such as data or video streams,
from one source to a group of receivers simultaneously. Any host can be a source,
and the receivers can be anywhere on the Internet.
Overview 145
Concepts & Examples ScreenOS Reference Guide
A multicast routing protocol to populate the multicast route table and forward
data to hosts throughout the network. Juniper Networks security devices
support Protocol Independent Multicast - Sparse-Mode (PIM-SM) and Protocol
Independent Multicast - Source-Specific Mode (PIM-SSM). (For information
about PIM-SM and PIM-SSM, see “Protocol Independent Multicast” on
page 179.)
Alternatively, you can use the IGMP Proxy feature to forward multicast traffic
without the CPU overhead of running a multicast routing protocol. (For more
information, see “IGMP Proxy” on page 161.)
Multicast Addresses
When a source sends multicast traffic, the destination address is a multicast group
address. Multicast group addresses are Class D addresses from 224.0.0.0 to
239.255.255.255.
146 Overview
Chapter 7: Multicast Routing
DST IF GATE
0.0.0.0.eth1 ---
10.1.1.0 eth3 ----
1.1.1.0 eth1 ---
The multicast routing table contains information specific to the routing protocol plus
the following information:
Each entry starts with the forwarding state. The forwarding state can be in one
of the following formats: (*, G) or (S, G). The (*, G) format is called a “star
comma G” entry where the * indicates any source and G is a specific multicast
group address. The (S, G) format is called an “S comma G” entry, where S is the
source IP address and G is the multicast group address.
In this example, you configure a static multicast route from a source with IP address
20.20.20.200 to the multicast group 238.1.1.1. Configure the security device to
translate the multicast group from 238.1.1.1 to 238.2.2.1 on the outgoing interface.
WebUI
Network > Routing > MCast Routing > New: Enter the following, then click
OK:
CLI
set vrouter trust-vr mroute mgroup 238.1.1.1 source 20.20.20.200 iif ethernet1
oif ethernet3 out-group 238.2.2.1
save
Access Lists
An access list is a sequential list of statements against which a route is compared.
Each statement specifies the IP address/netmask of a network prefix and the
forwarding status (permit or deny the route). In multicast routing, a statement can
also contain a multicast group address. In multicast routing, you create access lists
to permit multicast traffic for specified multicast groups or hosts. Therefore, the
action or forwarding status is always Permit. You cannot create access lists to deny
certain groups or hosts. (For additional information about access lists, see
“Configuring an Access List” on page 40.)
NOTE: You can enable GRE on a tunnel interface that is bound to a loopback interface as
long as the loopback interface is on the same zone as the outgoing interface. For
information about loopback interfaces, see “Loopback Interfaces” on page 2-58.
You must enable GRE when you transmit multicast packets through an IPSec VPN
tunnel between a Juniper Networks security device and a third-party device or
router.
In Figure 23, Router-A is upstream of Device-A. Router-A has two GRE tunnels
which terminate at Device-1 and Device-2. Device-A is connected to Device-1 and
Device-2 through VPN tunnels. Before Router-A transmits multicast packets, it first
encapsulates them in IPv4 unicast packets. Device-A receives these packets as
unicast packets and sends them through to Device-1 and Device-2.
Source
Internet
Router-A
GRE Tunnels
VPN Tunnels
with GRE
Device-1 Device-2
Receivers Receivers
In this example, you configure the tunnel interface on Device-1. You perform the
following steps:
1. Create the tunnel.1 interface and bind it to ethernet3 and to the Untrust zone
on the trust-vr.
This example shows the GRE configuration for the security device only. (For
information about VPNs, see Volume 5: Virtual Private Networks.)
WebUI
Network > Interfaces > New Tunnel IF: Enter the following, then click Apply:
Network > Interfaces > Tunnel (tunnel.1): Enter the following, then click
Apply:
CLI
set interface tunnel.1 zone untrust
set interface tunnel.1 ip unnumbered interface ethernet3
set interface tunnel.1 tunnel encap gre
set interface tunnel.1 tunnel local-if ethernet3 dst-ip 3.3.3.1
save
Multicast Policies
By default, Juniper Networks security devices do not permit multicast control traffic,
such as IGMP or PIM messages, to cross security devices. To permit multicast
control traffic between zones, you must configure a multicast policy that specifies
the following:
Multicast group—The multicast group for which you want the security device
to permit multicast control traffic. You can specify one of the following:
An access list that defines the multicast group(s) that hosts can join
The keyword any, to allow multicast control traffic for any multicast group
NOTE: Multicast policies control the flow of multicast control traffic only. To allow data
traffic (both unicast and multicast) to pass between zones, you must configure
firewall policies. (For information about policies, see Volume 2: Fundamentals.)
You do not sequence multicast policies, as you would firewall policies. Thus, the
latest multicast policy does not overwrite an earlier one, should there be a conflict.
Instead, the security device selects the longest match to resolve any conflict, as
used by other routing protocols. When it finds a smaller subnet to match the
request, it uses that policy.
NOTE: For an example of how to configure a multicast policy for IGMP messages, see
“Creating a Multicast Group Policy for IGMP” on page 165. For an example of how
to configure a multicast policy for PIM messages, see “Defining a Multicast Group
Policy for PIM-SM” on page 189.
This chapter describes the Internet Group Management Protocol (IGMP) multicast
protocol on Juniper Networks security devices. It contains the following sections:
“Multicast Policies for IGMP and IGMP Proxy Configurations” on page 165
153
Concepts & Examples ScreenOS Reference Guide
Overview
The Internet Group Management Protocol (IGMP) multicast protocol is used
between hosts and routers to establish and maintain multicast group memberships
in a network. security devices support the following versions of IGMP:
IGMPv1, as defined in RFC 1112, Host Extensions for IP Multicasting, defines the
basic operations for multicast group memberships.
IGMP provides a mechanism for hosts and routers to maintain multicast group
memberships. Multicast routing protocols, such as PIM, then process the
membership information from IGMP, create entries in the multicast routing table
and forward multicast traffic to hosts throughout the network.
The following sections explain the different types of IGMP messages that hosts and
routers exchange to maintain group membership information throughout the
network. Hosts and routers running newer versions of IGMP can operate with those
running older IGMP versions.
Hosts
Hosts send IGMP messages to join multicast groups and maintain their
memberships in those groups. Routers learn which hosts are members of multicast
groups by listening to these IGMP messages on their local networks. Table 16 lists
the IGMP messages that hosts send and the destination of the messages.
154 Overview
Chapter 8: Internet Group Management Protocol
Multicast Routers
Routers use IGMP to learn which multicast groups have members on their local
network. Each network selects a designated router, called the querier. There is
usually one querier for each network. The querier sends IGMP messages to all hosts
in the network to solicit group membership information. When the hosts respond
with their membership reports, the routers take the information from these
messages and update their list of group memberships on a per-interface basis.
IGMPv3 routers maintain a list which includes the multicast group address,
filter-mode (either include or exclude), and the source list.
NOTE: With IGMPv1, each multicast routing protocol determines the querier for a
network. With IGMPv2 and v3, the router interface with the lowest IP address in
the network is the querier.
WebUI
Network > Interfaces > Edit (for ethernet1) > IGMP: Enter the following, then
click Apply:
CLI
set interface ethernet1 protocol igmp router
set interface ethernet1 protocol igmp enable
save
WebUI
Network > Interfaces > Edit (for ethernet1) > IGMP: Clear Protocol IGMP
Enable, then click Apply.
CLI
unset interface ethernet1 protocol igmp enable
save
To delete the IGMP configuration, enter the unset interface interface protocol igmp
router command.
Hosts from which the IGMP router interface can receive IGMP messages
Queriers from which the IGMP router interface can receive IGMP messages
After you create an access list, you apply it to an interface. Once you apply an
access list to an interface, that interface accepts traffic only from those specified in
the access list. Therefore, to deny traffic from a particular multicast group, host or
querier, simply exclude it from the access list. (For additional information about
access lists, see “Configuring an Access List” on page 40.)
In this example, you create an access list on the trust-vr. The access list specifies the
following:
Access list ID is 1.
After you create the access list, allow the hosts on ethernet1 to join the multicast
group specified in the access list.
WebUI
Network > Routing > Virtual Routers > Access List: > New (for trust-vr):
Enter the following, then click OK:
Network > Interfaces > Edit (for ethernet1) > IGMP: Enter the following, then
click OK:
CLI
set vrouter trust-vr access-list 1 permit ip 224.4.4.1/32 1
set interface ethernet1 protocol igmp accept groups 1
save
Configuring IGMP
To run IGMP on a Juniper Networks security device, you simply enable it in Router
mode on the interfaces that are directly connected to hosts. To ensure the security
of your network, use access lists to limit multicast traffic to known multicast groups,
hosts, and routers.
In Figure 24, the hosts in the Trust zone protected by the security device NS1 are
potential receivers of the multicast stream from the source in the Untrust zone. The
interfaces ethernet1 and ethernet2 are connected to the hosts. The multicast source
is transmitting data to the multicast group 224.4.4.1. Perform the following steps to
configure IGMP on the interfaces that are connected to the hosts:
Source
NS1
Source ethernet3
Designated 1.1.1.1/24
Router ethernet 2
10.1.2.1/24
WebUI
1. Zones and Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet2) > IGMP: Enter the following, then
click Apply:
CLI
1. Zones and Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet2 zone trust
set interface ethernet2 ip 10.2.1.1/24
2. Access List
set vrouter trust access-list 1 permit ip 224.4.4.1/32 1
3. IGMP
set interface ethernet1 protocol igmp router
set interface ethernet1 protocol igmp accept groups 1
set interface ethernet1 protocol igmp enable
set interface ethernet2 protocol igmp router
set interface ethernet2 protocol igmp accept groups 1
set interface ethernet2 protocol igmp enable
save
After you configure IGMP on ethernet1 and ethernet2, you must configure a
multicast routing protocol, such as PIM, to forward multicast traffic. (For
information about PIM, see “Protocol Independent Multicast” on page 179.)
You can review the IGMP parameters of an interface by entering the following
command:
To display information about multicast groups, enter the following CLI command:
IGMP Interface
Parameters Description Default Value
General query interval The interval at which the querier interface sends general queries to the “all 125 seconds
hosts” group (224.0.0.1).
Maximum response The maximum time between a general query and a response from the host. 10 seconds
time
Last Member Query The interval at which the interface sends a Group-Specific query. If it does not 1 second
Interval receive a response after the second Group-Specific query, then it assumes
there are no more members for that group on its local network.
WebUI
Network > Interfaces > Edit (for ethernet1) > IGMP: Select the following, then
click OK:
CLI
set interface ethernet1 protocol igmp no-check-router-alert
save
IGMP Proxy
Routers listen for and send IGMP messages to their connected hosts only; they do
not forward IGMP messages beyond their local network. You can allow interfaces on
a Juniper Networks security device to forward IGMP messages one hop beyond its
local network by enabling IGMP proxy. IGMP proxy enables interfaces to forward
IGMP messages upstream toward the source without the CPU overhead of a
multicast routing protocol.
When you run IGMP proxy on a security device, interfaces connected to hosts
function as routers and those connected to upstream routers function as hosts. The
host and router interfaces are typically in different zones. To allow IGMP messages
to pass between zones, you must configure a multicast policy. Then, to allow
multicast data traffic to pass between zones, you must also configure a firewall
policy.
On devices that support multiple virtual systems, you must configure one interface
in the root virtual system (vsys) and the other interface in a separate vsys. Then,
create a multicast policy to allow multicast control traffic between the two virtual
systems. (For information about virtual systems, see Volume 10: Virtual Systems.)
As the interfaces forward IGMP membership information, they create entries in the
multicast route table of the virtual router to which the interfaces are bound, building
a multicast distribution tree from the receivers to the source. The following sections
describe how the IGMP host and router interfaces forward IGMP membership
information upstream toward the source, and how they forward multicast data
downstream from the source to the receiver.
If the router interface has an entry for the multicast group, it ignores the
membership report.
If the router interface does not have an entry for the multicast group, it checks
if there is a multicast policy for the group that specifies to which zone(s) the
router interface should send the report.
If there is no multicast policy for the group, the router interface does not
forward the report.
If there is a multicast policy for the group, the router interface creates an
entry for the multicast group and forwards the membership report to the
proxy host interface in the zone specified in the multicast policy.
When a proxy host interface receives the membership report, it checks if it has a (*,
G) entry for that multicast group.
If it has a (*, G) entry for the group, the host interface adds the router interface
to the list of egress interfaces for that entry.
If it does not have a (*, G) entry for that group, it creates such an entry; the
ingress interface is the proxy host interface and the egress interface is the
router interface. Then, the proxy host interface forwards the report to its
upstream router.
When the host interface on the security device receives multicast data for a
multicast group, it checks if there is an existing session for that group.
If there is a session for the group, the interface forwards the multicast data
based on the session information.
If there is no session for the group, the interface checks if the group has an (S,
G) entry in the multicast route table.
If there is no (S, G) entry, the interface checks if there is a (*, G) entry for
the group.
If there is no (*, G) entry for the group, the interface drops the packet.
If there is a (*, G) entry for the group, the interface creates an (S, G) entry.
When the interface receives subsequent multicast packets for that group, it
forwards the traffic to the router interface (the egress interface), which in
turn forwards the traffic to its connected host.
• If no, creates entry and forwards • If no, checks for (S,G) entry for the
membership report to upstream router. Internet group:
Receivers
4. Configure a multicast policy that allows multicast control traffic to pass between
zones.
By default, an IGMP interface accepts IGMP messages from its own subnet only. It
ignores IGMP messages from external sources. You must enable the security device
to accept IGMP messages from sources in other subnets when you run IGMP proxy.
WebUI
1. Zones and Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3) > IGMP: Enter the following, then
click OK:
CLI
1. Zones and Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.2.1/24
set interface ethernet3 zone trust
set interface ethernet1 ip 10.1.1.1/24
2. IGMP
set interface ethernet1 protocol igmp host
set interface ethernet1 protocol igmp enable
set interface ethernet1 protocol igmp no-check-subnet
set interface ethernet3 protocol igmp router
set interface ethernet3 protocol igmp proxy
set interface ethernet3 protocol igmp proxy always
set interface ethernet3 protocol igmp enable
set interface ethernet3 protocol igmp no-check-subnet
save
In addition, you can specify that the policy is bidirectional to apply the policy to
both directions of traffic.
WebUI
MCast Policies (From: Trust, To: Untrust) > New: Enter the following, then click
OK:
CLI
set multicast-group-policy from trust mgroup 224.2.202.99/32 to untrust
igmp-message bi-directional
save
3. Enable IGMP on the host and router interfaces, and enable IGMP proxy on the
router interface. (IGMP proxy is enabled by default on host interfaces.)
b. By default, an IGMP interface accepts IGMP packets from its own subnet
only. In the example, the interfaces are on different subnets. When you
enable IGMP, allow the interfaces to accept IGMP packets (queries,
membership reports, and leave messages) from any subnet.
4. Set up routes.
NSI-Related Items
ethernet3
ethernet1 2.2.2.2/24
10.2.2.1/24
Tunnel Interface
Designated tunnel.1 Receivers
Router NS1 Internet
Source
NS2
Tunnel Interface ethernet1
VPN Tunnel tunnel.1 10.3.1.1/24
ethernet3
3.1.1.1/24
Untrust Zone
Trust Zone
NS2-Related Items
WebUI (NS1)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
3. IGMP
Network > Interfaces > Edit (for ethernet1) > IGMP: Enter the following, then
click Apply:
Network > Interfaces > Edit (for tunnel.1) > IGMP: Enter the following, then
click Apply:
>> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
Source Address:
Address Book Entry: (select), branch
Destination Address:
Address Book Entry: (select), any (select)
Service: any
Action: Permit
7. Multicast Policy
MCast Policies > (From: Trust, To: Untrust) > New: Enter the following, then
click OK:
WebUI (NS2)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click Apply:
Policy > Policy Elements > Addresses > List > New: Enter the following
information, then click OK:
Network > Interfaces > Edit (for tunnel.1) > IGMP: Enter the following, then
click Apply:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
Source Address:
Address Book Entry: (select), source-dr
Destination Address:
Address Book Entry: (select), mgroup1
Service: ANY
Action: Permit
7. Multicast Policy
MCast Policies > (From: Untrust, To: Trust) > New: Enter the following, then
click OK:
CLI (NS1)
1. Interfaces
Set interface ethernet1 zone trust
set interface ethernet1 ip 10.2.2.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 2.2.2.2/24
CLI (NS2)
1. Interfaces
Set interface ethernet1 zone trust
set interface ethernet1 ip 10.3.1.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 3.1.1.1/24
set interface tunnel.1 zone untrust
set interface tunnel.1 ip unnumbered interface ethernet3
2. Addresses
set address trust mgroup1 224.4.4.1/32
set address untrust source-dr 10.2.2.1/24
3. IGMP
set interface ethernet1 protocol igmp router
set interface ethernet1 protocol igmp proxy
set interface ethernet1 protocol igmp proxy always
set interface ethernet1 protocol igmp enable
set interface tunnel.1 protocol igmp host
set interface tunnel.1 protocol igmp enable
set interface tunnel.1 protocol igmp no-check-subnet
4. Routes
set route 10.2.2.0/24 interface tunnel.1
5. VPN Tunnel
set ike gateway To_Corp address 2.2.2.2 main outgoing-interface ethernet3
preshare fg2g4hvj proposal pre-g2-3des-sha
set vpn Branch_Corp gateway To_Corp sec-level compatible
set vpn Branch_Corp bind interface tunnel.1
set vpn Branch_Corp proxy-id local-ip 10.3.1.0/24 remote-ip 10.2.2.0/24 any
6. Policy
set policy from untrust to trust source-dr mgroup1 any permit
7. Multicast Policy
set multicast-group-policy from untrust mgroup 224.4.4.1/32 to trust
igmp-message bi-directional
save
A multicast group policy allowing traffic from the source zone to the zone of the
IGMP proxy host interface
If there is no multicast policy between the source zone and the zone of the proxy
IGMP interface or if the source is not on the list of acceptable sources, the security
device drops the traffic. If there is a multicast policy between the source zone and
the zone of the proxy IGMP interface, and the source is on the list of acceptable
sources, then the device creates an (S,G) entry for that interface in the multicast
route table; the incoming interface is the interface to which the source is connected
and the outgoing interface is the IGMP proxy host interface. The security device
then sends the data upstream to the IGMP proxy host interface which sends the
data to all its connected proxy router interfaces, except to the interface connected
to the source.
ethernet1
Receivers Internet
ethernet2
Receivers
multicast traffic
In Figure 28, the source is connected to the ethernet2 interface, which is bound to
the DMZ zone on NS2. It is sending multicast traffic to the multicast group
224.4.4.1/32. There are receivers connected to the ethernet1 interface bound to the
Trust zone on NS2. Both ethernet1 and ethernet2 are IGMP proxy router interfaces.
The ethernet3 interface bound to the Untrust zone of NS2 is an IGMP proxy host
interface. There are also receivers connected to the ethernet1 interface bound to the
Trust zone on NS1. Perform the following steps on NS2:
NOTE: This example includes only the configuration for NS2, not the configuration for
NS1.
ethernet1, 10.2.2.1
ethernet1 ethernet1 ethernet3 Trust Zone IGMP
10.2.2.1/24 1.1.1.1/24 2.2.2.2/24 Router Proxy Receivers
Trust Zone Untrust Zone Untrust Zone
IGMP Host Proxy
Receivers
NS1 NS2
Internet
Source
3.2.2.5
Note: Security zones are not
shown in this illustration.
ethernet2, 3.2.2.1/24
DMZ Zone, IGMP
Router Proxy
WebUI (NS2)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > List > New: Enter the following
information, then click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following
information, then click OK:
Network > Interfaces > Edit (for ethernet2) > IGMP: Enter the following, then
click Apply:
Network > Interfaces > Edit (for ethernet3) > IGMP: Enter the following, then
click Apply:
Source Address:
Address Book Entry: source-dr
Destination Address:
Address Book Entry: (select), mgroup1
Service: ANY
Action: Permit
Policies > (From: DMZ, To: Untrust) > New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), source-dr
Destination Address:
Address Book Entry: (select), mgroup1
Service: ANY
Action: Permit
Policies > (From: Untrust, To: Trust) > New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), proxy-host
Destination Address:
Address Book Entry: (select), mgroup1
Service: ANY
Action: Permit
6. Multicast Policy
MCast Policies > (From: DMZ, To: Untrust) > New: Enter the following, then
click OK:
MCast Policies > (From: DMZ, To: Trust) > New: Enter the following, then click
OK:
MCast Policies > (From: Untrust, To: Trust) > New: Enter the following, then
click OK:
CLI (NS2)
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.2.2.1/24
set interface ethernet1 nat
set interface ethernet2 zone dmz
set interface ethernet2 ip 3.2.2.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 2.2.2.2/24
2. Addresses
set address trust mgroup1 224.4.4.1/32
set address dmz source-dr 3.2.2.5/32
set address untrust proxy-host 2.2.2.2/32
3. IGMP
set interface ethernet1 protocol igmp router
set interface ethernet1 protocol igmp proxy always
set interface ethernet1 protocol igmp enable
set interface ethernet2 protocol igmp router
set interface ethernet2 protocol igmp proxy always
set interface ethernet2 protocol igmp enable
set interface ethernet3 protocol igmp host
set interface ethernet3 protocol igmp no-check-subnet
set interface ethernet3 protocol igmp enable
4. Route
set vrouter trust-vr route 0.0.0.0/0 interface ethernet3 gateway 2.2.2.250
5. Policies
set policy from dmz to trust source-dr mgroup1 any permit
set policy from dmz to untrust source-dr mgroup1 any permit
set policy from untrust to trust proxy-host mgroup1 any permit
6. Multicast Policies
set multicast-group-policy from dmz mgroup 224.4.4.1/32 to untrust
igmp-message bi-directional
set multicast-group-policy from dmz mgroup 224.4.4.1/32 to trust igmp-message
bi-directional
set multicast-group-policy from trust mgroup 224.4.4.1/32 to untrust
igmp-message bi-directional
save
179
Concepts & Examples ScreenOS Reference Guide
Overview
Protocol Independent Multicast (PIM) is a multicast routing protocol that runs
between routers. Whereas the Internet Group Management Protocol (IGMP) runs
between hosts and routers to exchange multicast group membership information,
PIM runs between routers to forward multicast traffic to multicast group members
throughout the network. (For information about IGMP, see “Internet Group
Management Protocol” on page 153.)
180 Overview
Chapter 9: Protocol Independent Multicast
Source
Multicast routing
protocols, such as
PIM-SM, populate the
multicast route table and
forward data to hosts
Internet throughout the network.
When you run PIM, you must also configure either static routes or a dynamic
routing protocol. PIM is called protocol independent because it uses the route table of
the underlying unicast routing protocol to perform its RPF (reverse path forwarding)
checks, but does not depend on the functionality of the unicast routing protocol.
(For information about RPF, see “Reverse Path Forwarding” on page 146.)
PIM-Dense Mode (PIM-DM) floods multicast traffic throughout the network and
then prunes routes to receivers that do not want to receive the multicast traffic.
Overview 181
Concepts & Examples ScreenOS Reference Guide
PIM-SM
PIM-SM is a multicast routing protocol that forwards multicast traffic to interested
receivers only. It can use either a shared distribution tree or the shortest path tree
(SPT) to forward multicast traffic throughout the network. (For information about
multicast distribution trees, see “Multicast Distribution Trees” on page 182.) By
default, PIM-SM uses the shared distribution tree with a rendezvous point (RP) at
the root of the tree. All sources in a group send their packets to the RP, and the RP
sends data down the shared distribution tree to all receivers in a network. When a
configured threshold is reached, the receivers can form an SPT to the source,
decreasing the time it takes the receivers to receive the multicast data.
NOTE: By default, Juniper Networks security devices switch to the SPT upon receiving the
first byte.
Regardless of which tree is used to distribute traffic, only receivers that explicitly
join a multicast group can receive the traffic for that group. PIM-SM uses the unicast
routing table to perform its reverse path forwarding (RPF) lookups when it receives
multicast control messages, and it uses the multicast routing table to send multicast
data traffic to receivers.
Shortest-Path Tree (SPT) - The source is at the root of the tree and forwards the
multicast data downstream to each receiver. This is also referred to as a
source-specific tree.
Shared Distribution Tree - The source transmits the multicast traffic to the
rendezvous point (RP), which is typically a router at the core of the network.
The RP then forwards the traffic downstream to receivers on the distribution
tree.
182 Overview
Chapter 9: Protocol Independent Multicast
Shortest-Path Tree
Shared Distribution Tree
Shared Distribution Tree
RP
Receivers Receivers
Designated Router
When there are multiple multicast routers in a multi-access local area network
(LAN), the routers elect a designated router (DR). The DR on the LAN of the source
is responsible for sending the multicast packets from the source to the RP and to
the receivers that are on the source-specific distribution tree. The DR on the LAN of
the receivers is responsible for forwarding join-prune messages from the receivers
to the RP, and for sending multicast data traffic to the receivers in the LAN.
Receivers send join-prune messages when they want to join or leave a multicast
group.
The DR is selected through an election process. Each PIM-SM router in a LAN has a
DR priority that is user configurable. PIM-SM routers advertise their DR priorities in
hello messages they periodically send their neighbors. When the routers receive the
hello messages, they select the router with the highest DR priority as the DR for the
LAN. If multiple routers have the highest DR priority, then the router with the
highest IP address becomes the DR of the LAN.
Static RP Mapping
To create a static mapping between an RP and a multicast group, you must
configure the RP for the multicast group on each router in the network. Each time
the address of the RP changes, you must reconfigure the RP address.
Overview 183
Concepts & Examples ScreenOS Reference Guide
Dynamic RP Mapping
PIM-SM also provides a mechanism for dynamically mapping RPs to multicast
groups. First, you configure candidate rendezvous points (C-RPs) for each multicast
group. Then, the C-RPs send Candidate-RP advertisements to one router in the LAN,
called the bootstrap router (BSR). The advertisements contain the multicast group(s)
for which the router is to be an RP and the priority of the C-RP.
The BSR collects these C-RP advertisements and sends them out in a BSR message
to all routers in the domain. The routers collect these BSR messages and use a
well-known hash algorithm to select one active RP per multicast group. If the
selected RP fails, then the router selects a new RP-group mapping from among the
candidate RPs. For information about the BSR selection process, refer to
draft-ietf-pim-sm-bsr-03.txt.
Source
1.Source sends multicast
packets downstream.
3. RP decapsulates register
messages and sends multicast
packets to receivers.
Receivers Receivers
184 Overview
Chapter 9: Protocol Independent Multicast
If the data rate from the source DR reaches a configured threshold, the RP sends a
PIM-SM join message toward the source DR so the RP can receive the native
multicast data, instead of the register messages. When the source DR receives the
join message, it sends the multicast packets and the register messages toward the
RP. When the RP receives the multicast packets from the DR, it sends the DR a
register-stop message. When the DR receives the register-stop message, it stops
sending the register messages and sends the native multicast data, which the RP
then sends downstream to the receivers.
Source
Hosts/Receivers Hosts/Receivers
Each downstream router performs an RPF check when it receives the multicast
data. Each router checks if it received the multicast packets from the same interface
it uses to send traffic toward the RP. If the RPF check is successful, the router then
looks for a matching (*, G) forwarding entry in the multicast route table. If it finds
the (*, G) entry, it places the source in the entry, which becomes an (S, G) entry, and
forwards the multicast packets downstream. This process continues down the
distribution tree until the host receives the multicast data.
When the traffic rate reaches a configured threshold, the DR on the LAN of the host
can form the shortest-path tree directly to the multicast source. When the DR starts
receiving traffic directly from the source, it sends a source-specific prune message
upstream toward the RP. Each intermediate router “prunes” the link to the host off
the distribution tree, until the prune message reaches the RP, which then stops
sending the multicast traffic down that particular branch of the distribution tree.
Overview 185
Concepts & Examples ScreenOS Reference Guide
PIM-SSM
In addition to PIM-SM, security devices also support PIM-Source-Specific Multicast
(SSM). PIM-SSM follows the source-specific model (SSM) where multicast traffic is
transmitted to channels, not just multicast groups. A channel consists of a source
and multicast group. A receiver subscribes to a channel with a known source and
multicast group. The receivers provide information about the source through
IGMPv3. The designated router on the LAN sends messages to the source and not to
a rendezvous point (RP).
The IANA has reserved the multicast address range 232/8 for the SSM service in
IPv4. If IGMPv3 is running on a device along with PIM-SM, PIM-SSM operations are
guaranteed within this address range. The security device handles IGMPv3
membership reports for multicast groups within the 232/8 address range as follows:
If the report contains a filter-mode of include, the device sends the report
directly to the sources in the source list.
If the report contains a filter mode of exclude, the device drops the report. It
does not process (*,G) reports for multicast groups in the 232/8 address range.
The steps for configuring PIM-SSM on a security device are the same as those for
configuring PIM-SM with the following differences:
Open Shortest Path First (OSPF)—For more information, see “Open Shortest
Path First” on page 45.
The following sections describe the basic steps for configuring PIM-SM on a security
device:
WebUI
Network > Routing > Virtual Routers > Edit (for trust-vr) > Create PIM
Instance: Select Protocol PIM: Enable, then click Apply.
CLI
device-> set vrouter trust-vr
device(trust-vr)-> set protocol pim
device(trust.vr/pim)-> set enable
device(trust.vr/pim)-> exit
device(trust-vr)-> exit
save
WebUI
Network > Routing > Virtual Router (trust-vr) > Edit > Delete PIM Instance,
then click OK at the confirmation prompt.
CLI
unset vrouter trust-vr protocol pim
deleting PIM instance, are you sure? y/[n] y
save
WebUI
Network > Interfaces > Edit (for ethernet1) > PIM: Enter the following, then
click Apply:
CLI
set interface ethernet1 protocol pim
set interface ethernet1 protocol pim enable
save
WebUI
Network > Interfaces > Edit (for ethernet1) > PIM: Clear Protocol PIM
Enable, then click Apply.
CLI
unset interface ethernet1 protocol pim enable
save
Static-RP-BSR Messages
Static-RP-BSR messages contain information about static rendezvous points (RPs)
and dynamic RP-group mappings. Configuring a multicast policy that allows static
RP mappings and bootstrap (BSR) messages between zones enables the security
device to share RP-group mappings across zones within a virtual router or between
two virtual routers. Routers are able to learn about RP-group mappings from other
zones, so you do not have to configure RPs in all zones.
When the security device receives a BSR message, it verifies that it came from its
reverse path forwarding (RPF) neighbor. Then it checks if there are multicast
policies for the multicast groups in the BSR message. It filters out groups not
allowed in the multicast policy and sends the BSR message for the allowed groups
to all destination zones that are allowed by the policy.
Join-Prune Messages
Multicast group policies also control join-prune messages. When the security device
receives a join-prune message for a source and group or source and RP on its
downstream interface, it looks up the RPF neighbor and interface in the unicast
routing table.
If the RPF interface is on the same zone as the downstream interface, then
multicast policy validation is not necessary.
If the RPF interface is on another zone, then the security device checks if there
is a multicast policy that allows join-prune messages for the group between the
zone of the downstream interface and the zone of the RPF interface.
WebUI
Policies (From: Trust, To: Untrust) > New: Enter the following, then click OK:
CLI
set multicast-group-policy from trust mgroup 224.4.4.1/32 to untrust
pim-message bsr-static-rp join-prune bi-directional
save
You can configure PIM-SM on one virtual router (VR) or across two VRs. Perform the
following steps to configure PIM-SM on one virtual router:
3. Create a firewall policy to pass unicast and multicast data traffic between zones.
4. Create and enable a PIM-SM routing instance on the same virtual router on
which you configured the static routes or a dynamic routing protocol.
When you configure PIM-SM across two VRs, you must configure the RP in the zone
of the VR in which the RP is located. Then, configure a multicast group policy
allowing join-prune and BSR-static-RP messages between the zones in each VR. You
must also export unicast routes between the two VRs to ensure the accuracy of the
reverse path forwarding (RPF) information. For information about exporting routes,
see “Exporting and Importing Routes Between Virtual Routers” on page 42.
NOTE: If a security device is configured with multiple VRs, all VRs must have the same
PIM-SM options.
Some Juniper Networks security devices support multiple virtual systems. (For
information about virtual systems, see Volume 10: Virtual Systems.) When you
configure PIM-SM in a virtual system, it is the same as configuring PIM-SM in the
root system. When you configure PIM-SM on two virtual routers that are each in a
different virtual system, then you must configure a proxy RP. (For information about
configuring a proxy RP, see “Configuring a Proxy Rendezvous Point” on page 202.)
In this example, you configure PIM-SM in the trust-vr. You want hosts in the Trust
zone to receive multicast traffic for the multicast group 224.4.4.1/32. You configure
RIP as the unicast routing protocol in the trust-vr and create a firewall policy to pass
data traffic between the Trust and Untrust zones. You create a PIM-SM instance in
the trust-vr and enable PIM-SM on ethernet1 and ethernet2 in the Trust zone, and
on ethernet3 in the Untrust zone. All interfaces are in route mode. Then, you
configure IGMP on ethernet1 and ethernet2, which are connected to receivers.
Finally, create a multicast policy that permits static-RP-BSR and join-prune
messages between the zones.
Untrust Zone
Source
Designated
Router
Bootstrap
Router
Rendezvous
Point
ethernet3 Receivers
1.1.1.1/24
Receivers
WebUI
1. Zones and Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Policy > Policy Elements > Addresses > List > New: Enter the following
information, then click OK:
Network > Interfaces > Edit (for ethernet2) > IGMP: Enter the following, then
click OK:
Network > Interfaces > Edit (for ethernet3) > RIP: Enter the following, then
click Apply:
5. PIM-SM
Network > Routing > Virtual Router (trust-vr) > Edit > Create PIM Instance:
Select the following, then click OK.
Network > Interfaces > Edit (for ethernet1) > PIM: Enter the following, then
click Apply:
Network > Interfaces > Edit (for ethernet2) > PIM: Enter the following, then
click Apply:
Network > Interfaces > Edit (for ethernet3) > PIM: Enter the following, then
click Apply:
Source Address:
Address Book Entry: (select), source-dr
Destination Address:
Address Book Entry: (select), mgroup1
Service: any
Action: Permit
7. Multicast Policy
MCast Policies (From: Trust, To: Untrust) > New: Enter the following and click
OK:
CLI
1. Zones and Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet2 zone trust
set interface ethernet2 ip 10.1.2.1/24
set interface ethernet2 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Addresses
set address trust mgroup1 224.4.4.1/32
set address untrust source-dr 6.6.6.1/24
3. IGMP
set interface ethernet1 protocol igmp router
set interface ethernet1 protocol igmp enable
set interface ethernet2 protocol igmp router
set interface ethernet2 protocol igmp enable
4. RIP
set vrouter trust-vr protocol rip
set vrouter trust-vr protocol rip enable
set interface ethernet3 protocol rip enable
5. PIM-SM
set vrouter trust-vr protocol pim
set vrouter trust-vr protocol pim enable
set interface ethernet1 protocol pim
set interface ethernet1 protocol pim enable
set interface ethernet2 protocol pim
set interface ethernet2 protocol pim enable
set interface ethernet3 protocol pim
set interface ethernet3 protocol pim enable
6. Policy
set policy from untrust to trust source-dr mgroup1 any permit
7. Multicast Policy
set multicast-group-policy from trust mgroup 224.4.4.1/32 any to untrust
pim-message bsr-static-rp join bi-directional
save
If the forwarding state is (*, G), the RP IP address; If the forwarding state is (S,
G), the source IP address
Timer values
To view the rendezvous points in each zone, execute the following command:
Active Groups : 1
236.1.1.1
To verify that there is a Reverse Path Forwarding neighbor, execute the following
command:
To view the status of join-prune messages the security device sends to each
neighbor in a virtual router, execute the following command:
You must configure a static RP when there is no bootstrap router in the network.
Although a security device can receive and process bootstrap messages, it does not
function as a bootstrap router.
You can configure a virtual router as a candidate RP (C-RP) when you want to map
RPs dynamically to multicast groups. You can create one C-RP for each zone.
An access list that defines the multicast groups of the static RP (For more
information, see “Access Lists” on page 149.)
To ensure that the multicast groups in the access list always use the same RP,
include the keyword always. If you do not include this keyword, and the security
device discovers another RP dynamically mapped to the same multicast groups, it
uses the dynamic RP.
In this example, you create an access list for the multicast group 224.4.4.1, and
then create a static RP for that group. The IP address of the static RP is 1.1.1.5/24.
You specify the keyword always to ensure that the security device always uses the
same RP for that.
WebUI
Network > Routing > Virtual Routers > Access List: > New (for trust-vr):
Enter the following, then click OK:
Network > Routing > Virtual Router (trust-vr) > Edit > Edit PIM Instance >
RP Address > New: Select the following, then click OK:
CLI
set vrouter trust-vr access-list 2 permit ip 224.4.4.1/32 1
set vrouter trust-vr protocol pim zone trust rp address 1.1.1.5 mgroup-list 2 always
save
In this example, you enable PIM-SM on the ethernet1 interface which is bound to
the Trust zone. You create an access list that defines the multicast groups of the
C-RP. Then you create a C-RP in the Trust zone of the trust-vr. You set the priority of
the C-RP to 200.
WebUI
Network > Interfaces > Edit (for ethernet1) > PIM: Enter the following, then
click Apply:
Network > Routing > Virtual Routers > Access List: > New (for trust-vr):
Enter the following, then click OK:
Select Add Seq No: Enter the following, then click OK:
Sequence No.: 2
IP/Netmask: 224.3.3.1/32
Action: Permit
Network > Routing > Virtual Router (trust-vr) > Edit > Edit PIM Instance >
RP Candidate > Edit (Trust Zone): Select the following, then click OK.
CLI
setinterface ethernet1 protocol pim
setinterface ethernet1 protocol pim enable
setvrouter trust-vr access-list 1 permit ip 224.2.2.1/32 1
setvrouter trust-vr access-list 1 permit ip 224.3.3.1/32 2
setvrouter trust-vr protocol pim zone trust rp candidate interface ethernet1
mgroup-list 1 priority 200
save
Security Considerations
When you run PIM-SM, there are certain options that you can set at the virtual
router (VR) level to control traffic to and from the VR. Settings defined at the VR
level affect all PIM-SM-enabled interfaces in the VR.
In this example, you create an access list with ID number 1 that allows the following
multicast groups: 224.2.2.1/32 and 224.3.3.1/32. Then you configure the trust-vr to
accept join-prune messages from the multicast groups in the access list.
WebUI
Network > Routing > Virtual Routers > Access List: > New (for trust-vr):
Enter the following, then click OK:
Select Add Seq No: Enter the following, then click OK:
Sequence No: 2
IP/Netmask: 224.3.3.1/32
Action: Permit
Network > Routing > Virtual Router (trust-vr) > Edit > Edit PIM Instance:
Select the following, then click Apply:
CLI
set vrouter trust-vr access-list 1 permit ip 224.2.2.1/32 1
set vrouter trust-vr access-list 1 permit ip 224.3.3.1/32 2
set vrouter trust-vr protocol pim accept-group 1
save
In this example, you first create an access list with ID number 5 that specifies the
allowed source, 1.1.1.1/32. Then you configure the trust-vr to accept multicast data
for the multicast group 224.4.4.1/32 from the source specified in the access list.
WebUI
Network > Routing > Virtual Routers > Access List: > New (for trust-vr):
Enter the following, then click OK:
Network > Routing > Virtual Router (trust-vr) > Edit > Edit PIM Instance >
MGroup: Select the following, then click Add:
MGroup: 224.4.4.1/32
Accept Source: 5 (select)
CLI
set vrouter trust-vr access-list 5 permit ip 1.1.1.1/32 1
set vrouter trust-vr protocol pim mgroup 224.4.4.1/32 accept-source 5
save
In this example, you create an access list with ID number 6 that specifies the
allowed RP, 2.1.1.1/32. Then you configure the trust-vr to accept the RPs in the
access list for the multicast group, 224.4.4.1/32.
WebUI
Network > Routing > Virtual Routers > Access List: > New (for trust-vr):
Enter the following, then click OK:
Network > Routing > Virtual Router (trust-vr) > Edit > Edit PIM Instance >
MGroup: Select the following, then click Add:
MGroup: 224.4.4.1/32
Accept RP: 6 (select)
CLI
set vrouter trust-vr access-list 6 permit ip 2.1.1.1/32 1
set vrouter trust-vr protocol pim mgroup 224.4.4.1/32 accept-rp 6
save
In this example, you create an access list that specifies the following:
ID number is 1.
Then you specify that ethernet 1 can form an adjacency with the neighbors in the
access list.
WebUI
Network > Routing > Virtual Routers > Access List: > New (for trust-vr):
Enter the following, then click OK:
Select Add Seq No: Enter the following and click OK:
Sequence No: 2
IP/Netmask: 2.1.1.3/24
Action: Permit
Network > Interfaces > Edit (for ethernet1) > PIM: Enter the following, then
click Apply:
Accepted Neighbors: 1
CLI
set vrouter trust-vr access-list 1 permit ip 2.1.1.1/24 1
set vrouter trust-vr access-list 1 permit ip 2.1.1.3/24 2
set interface ethernet1 protocol pim neighbor-policy 1
save
WebUI
Network > Interfaces > Edit (for ethernet1) > PIM: Select Bootstrap Border,
then click Apply.
CLI
set interface ethernet1 protocol pim boot-strap-border
save
On Juniper Networks security devices, interfaces bound to a Layer-3 zone can run
either in NAT mode or in route mode. To run PIM-SM on a device with interfaces
operating in different modes, each zone must be in a different PIM-SM domain. For
example, if interfaces in the Trust zone are in NAT mode and interfaces in the
Untrust zone are in route mode, each zone must be in a different PIM-SM domain.
In addition, when configuring PIM-SM across two virtual routers that are in two
different virtual systems, each virtual router must be in a separate PIM-SM domain.
You can advertise multicast groups from one PIM-SM domain to another by
configuring a proxy RP. A proxy RP acts as the RP for multicast groups learned from
other PIM-SM domains either through a static RP or through bootstrap messages
allowed by the multicast group policy. It functions as the root of the shared tree for
receivers in its domain and it can form the shortest path tree to the source.
You can configure one proxy RP per zone in a virtual router. To configure a proxy RP
in a zone, you must configure a candidate-RP (C-RP) in that zone. The security
device then advertises the IP address of the C-RP as the IP address of the proxy RP.
When you configure the C-RP, do not specify any multicast group in the multicast
group list. This enables the C-RP to act as the proxy RP for any group imported from
other zones. If you specify multicast groups, then the C-RP functions as the real RP
for the groups specified in the list.
If there is a BSR in the zone, the proxy RP advertises itself as the RP for the
multicast groups imported from other zones. If there is no BSR in the zone of the
proxy RP, then the proxy RP functions as the static RP for the multicast groups
imported from other zones. You must then configure the IP address of the C-RP as
the static RP on all the other routers in the zone.
Proxy RP supports the use of mapped IP (MIP) addresses for source address
translation. A MIP is a direct one-to-one mapping of one IP address to another. You
can configure a MIP when you want the security device to translate a private
address in a zone whose interfaces are in NAT mode to another address. When a
MIP host in the zone of a proxy RP sends a register message, the security device
translates the source IP address to the MIP address and sends a new register
message to the real RP. When the security device receives a join-prune message for
a MIP address, the device maps the MIP to the original source address and sends it
to the source.
Proxy RP also supports the translation of multicast group addresses between zones.
You can configure a multicast policy that specifies the original multicast group
address and the translated multicast group address. When the security device
receives a join-prune message on an interface in the zone of the proxy RP, it
translates the multicast group, if required, and sends the join message to the real
RP.
ethernet1 in the Trust zone is in NAT mode, and ethernet3 in the Untrust zone
is in Route mode.
The source in the Trust zone sends multicast traffic to the multicast group
224.4.4.1/32.
There is a multicast policy that allows PIM-SM messages between the Trust and
Untrust zones.
Rendezvous
Point (RP)
Source Bootstrap
Router
(BSR)
Receivers
Receivers
2. The designated router (DR) encapsulates the data and sends Register messages
toward the RP.
3. The RP proxy in the Trust zone receives the Register message, and changes the
original source IP address to the IP address of the MIP. It then forwards the
message toward the RP for the multicast group.
5. Receivers in the Trust zone send join messages to the proxy RP.
In this example, the security devices NS1 and NS2 are connected through a VPN
tunnel. Both devices are running the dynamic routing protocol, BGP. You configure
PIM-SM on ethernet1 and tunnel.1 on NS1 and on NS2. Then, on NS2, you
configure ethernet1 as a static RP and create a proxy RP in the Trust zone of the
trust-vr.
NS2-Related Items
Tunnel Interface
tunnel.1 ethernet1
10.4.1.1/24
Source ethernet3 Proxy
4.1.1.1/24 Rendezvous
NS2 Point
VPN
NS1
Bootstrap ethernet3
Router ethernet1 2.2.2.2/24
10.2.2.1/24
Actual Tunnel
Rendezvous Interface
Point tunnel.1
Receivers
Receivers
NS1-Related Items
WebUI (NS1)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
2. Addresses
Policy > Policy Elements > Addresses > List > New: Enter the following
information, then click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following
information, then click OK:
Network > Interfaces > Edit (for ethernet1) > PIM: Enter the following, then
click Apply:
Network > Interfaces > Edit (for tunnel.1) > PIM: Enter the following, then
click Apply:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
Network > Routing > Virtual Router (trust-vr) > Edit: Select Create BGP
Instance.
Network > Routing > Virtual Router (trust-vr) > Edit > Edit BGP Instance >
Neighbors: Enter the following, then click Add:
AS Number: 65000
Remote IP: 4.1.1.1
Outgoing Interface: ethernet3
Network > Routing > Virtual Router (trust-vr) > Edit > Edit BGP Instance >
Neighbors > Configure (for the peer you just added): Select Peer Enabled and
then click OK.
Network > Routing > Virtual Router (trust-vr) > Edit > Edit BGP Instance >
Networks: Enter 2.2.2.0/24 in the IP/Netmask field, then click Add. Then enter
10.2.2.0/24 in the IP/Netmask field, and click Add again.
Network > Interfaces > Edit (for ethernet3) > BGP: Enter the following, then
click Apply:
Source Address:
Address Book Entry: (select), branch
Destination Address:
Address Book Entry: (select), mgroup1
Service: any
Action: Permit
7. Multicast Policy
MCast Policies (From: Trust, To: Untrust) > New: Enter the following and click
OK:
WebUI (NS2)
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Policy > Policy Elements > Addresses > List > New: Enter the following
information, then click OK:
Network > Interfaces > Edit (for ethernet1) > PIM: Enter the following, then
click Apply:
Network > Routing > Virtual Router (trust-vr) > Edit > Edit PIM Instance >
RP Address > New: Select the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Gateway configuration page:
Network > Routing > Virtual Router (trust-vr) > Edit: Select Create BGP
Instance.
Network > Routing > Virtual Router (trust-vr) > Edit > Edit BGP Instance >
Neighbors: Enter the following, then click Add:
AS Number: 65000
Remote IP: 2.2.2.2
Outgoing Interface: ethernet3
Network > Routing > Virtual Router (trust-vr) > Edit > Edit BGP Instance >
Neighbors > Configure (for the peer you just added): Select Peer Enabled and
then click OK.
Network > Routing > Virtual Router (trust-vr) > Edit > Edit BGP Instance >
Networks:
Network > Interfaces > Edit (for ethernet3) > BGP: Select Protocol BGP:
Enable, then click Apply.
6. Policy
Policies > (From: Untrust, To: Trust) > New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), corp
Destination Address:
Address Book Entry: (select), mgroup1
Service: any
Action: Permit
7. Multicast Policy
MCast Policies (From: Trust, To: Untrust) > New: Enter the following and click
OK:
CLI (NS1)
1. Interfaces
Set interface ethernet1 zone trust
set interface ethernet1 ip 10.2.2.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 2.2.2.2/24
set interface tunnel.1 zone untrust
set interface tunnel.1 ip unnumbered interface ethernet3
2. Addresses
set address trust mgroup1 224.4.4.1/32
set address untrust branch 10.4.1.0/24
3. PIM-SM
set vrouter trust-vr
set vrouter trust-vr protocol pim enable
set interface ethernet1 protocol pim
set interface ethernet1 protocol pim enable
set interface tunnel.1 protocol pim
set interface tunnel.1 protocol pim enable
4. VPN Tunnel
set ike gateway To_Branch address 4.1.1.1 main outgoing-interface ethernet3
preshare fg2g4h5j proposal pre-g2-3des-sha
set vpn Corp_Branch gateway To-Branch3 sec-level compatible
set vpn Corp_Branch bind interface tunnel.1
set vpn Corp_Branch proxy-id local-ip 10.2.2.0/24 remote-ip 10.4.1.0/24
5. BGP
set vrouter trust-vr router-id 10
set vrouter trust-vr protocol bgp 6500
set vrouter trust-vr protocol bgp enable
set vrouter trust-vr protocol bgp neighbor 4.1.1.1
set vrouter trust-vr protocol bgp network 2.2.2.0/24
set vrouter trust-vr protocol bgp network 10.2.2.0/24
set interface ethernet3 protocol bgp enable
set interface ethernet3 protocol bgp neighbor 4.1.1.1
6. Policy
set policy name To-Branch from untrust to trust branch any any permit
7. Multicast Policy
set multicast-group-policy from trust mgroup 224.4.4.1/32 any to untrust
pim-message bsr-static-rp join bi-directional
save
CLI (NS2)
1. Interfaces
set interface ethernet 1 zone trust
set interface ethernet 1 ip 10.4.1.1/24
set interface ethernet 1 protocol igmp router
set interface ethernet 1 protocol igmp enable
set interface ethernet 3 zone untrust
set interface ethernet 3 ip 4.1.1.1/24
set interface tunnel.1 zone untrust
set interface tunnel.1 ip unnumbered interface ethernet3
2. Addresses
set address trust mgroup1 224.4.4.1/32
set address untrust corp 2.2.2.0/24
3. PIM-SM
set vrouter trust protocol pim
set interface ethernet1 protocol pim
set interface ethernet1 protocol pim enable
set interface tunnel.1 protocol pim
set interface tunnel.1 protocol pim enable
set vrouter trust protocol pim zone trust rp proxy
set vrouter trust protocol pim zone trust rp candidate interface ethernet1
set vrouter trust protocol pim enable
4. VPN Tunnel
set ike gateway To_Corp address 2.2.2.2 main outgoing-interface ethernet3
preshare fg2g4h5j proposal pre-g2-3des-sha
set vpn Branch_Corp gateway To_Corp sec-level compatible
set vpn Branch_Corp bind interface tunnel.1
set vpn Branch_Corp proxy-id local-ip 10.4.1.0/24 remote-ip 10.2.2.0/24
5. BGP
set vrouter trust-vr router-id 10
set vrouter trust-vr protocol bgp 6500
set vrouter trust-vr protocol bgp enable
set vrouter trust-vr protocol bgp neighbor 2.2.2.2
set vrouter trust-vr protocol bgp network 4.1.1.0/24
set vrouter trust-vr protocol bgp network 10.4.1.0/24
set interface ethernet3 protocol bgp neighbor 2.2.2.2
6. Policy
set policy name To-Corp from untrust to trust corp any any permit
7. Multicast Policy
set multicast-group-policy from trust mgroup 224.4.4.1/32 any to untrust
pim-message bsr-static-rp join bi-directional
save
Hosts running IGMPv3 indicate which multicast groups they want to join and the
sources from which they expect to receive multicast traffic. The IGMPv3
membership reports contain the multicast group address, the filter-mode, which is
either include or exclude, and a list of sources.
If the filter-mode is include, then receivers accept multicast traffic only from the
addresses in the source list. When PIM-SM receives an IGMPv3 membership report
with a source list and a filter mode of include, it creates (S,G) entries in the multicast
route table for all sources in the source list.
If the filter mode is exclude, then receivers do not accept multicast traffic from the
sources in the list; they accept multicast traffic from all other sources. When
PIM-SM receives an IGMPv3 membership report with source list and a filter mode of
exclude, then it creates a (*,G) for the group and sends a prune message for sources
in the source list. In this case, you might need to configure a rendezvous point if the
receivers do not know the address of the source.
This chapter explains Internet Control Messages Protocol (ICMP) Router Discovery
Protocol as defined in RFC 1256. It contains the following sections:
“Configuring ICMP Router Discovery Protocol from the CLI” on page 215
Overview
ICMP Router Discovery Protocol (IRDP) is an ICMP message exchange between a
host and a router. The security device is the router and advertises the IP address of
a specified interface periodically or on-demand. If the host is configured to listen,
you can configure the security device to send periodic advertisements. If the host
explicitly sends router solicitations, you can configure the security device to
respond on demand.
NOTE: IRDP is not available on all platforms. Check your datasheet to see if this feature is
available on your security device.
Overview 213
Concepts & Examples ScreenOS Reference Guide
In the following example, you configure IRDP for the Trust interface.
WebUI
Network > Interfaces (edit) > IRDP: Select the IRDP Enable check box.
CLI
set interface trust protocol irdp enable
Network > Interface > Edit > IRDP: Enter the desired settings, then click OK.
Table 20 lists the IRDP parameters, default values, and available settings.
Advertising an Interface
By default, ScreenOS advertises the primary IP address of the security device;
however, the IP address is not advertised for WebAuth and management.
You can also associate a preference status for a security device. The preference
status is a number from -1 through 2147483647. Higher numbers have greater
preference. You can assign different preference values for different security devices.
For example, you can assign a higher preference number for the security device
that primarily handles network traffic. For a backup security device, you can assign
a lower preference number.
To configure the default broadcast address for the Untrust interface, enter the
following command:
To set the maximum advertisement interval to be 800 seconds for the Untrust
interface, enter the following commands:
When you set the maximum advertisement interval to 800 seconds, ScreenOS
automatically recalculates the minimum advertisement interval to be 600 seconds.
To set the minimum advertisement interval value to 500 seconds for the Untrust
interface, enter the following commands:
To set the advertisement lifetime value to 5000 seconds for the Untrust interface,
enter the following commands:
To set a delay the response delay value to 4 seconds to the Untrust interface, enter
the following commands:
To set the Initial Advertise Interval to 24 seconds for the Untrust interface, enter the
following commands:
Disabling IRDP
You can disable an interface from running IRDP; however, when you do so,
ScreenOS deletes all related memory from the original configuration.
To disable the Trust interface from running IRDP, enter the following command:
To view IRDP settings, enter the get irdp or get irdp interface interface_name
commands.
WebUI
Network > Interface > Edit > IRDP: You can view whether IRDP is enabled.
CLI 1
device> get irdp
Total 1 IRDP instance enabled
----------------------------------------------------------------
interface dest-addr lifetime adv-interval Next-Adv(sec)
----------------------------------------------------------------
untrust 255.255.255.255 6000 450 to 600 358
CLI 2
device-> get irdp interface untrust
IRDP enabled on untrust:
advertisement interval : 450 to 600 sec
next advertisement in : 299 sec
advertisement lifetime : 6000 sec
advertisement address : 255.255.255.255
initial advertise interval : 16 sec
initial advertise packet : 3
solicitation response delay : 4 sec
10.100.37.90 : pref 250, advertise YES
Index IX-I
Concepts & Examples ScreenOS Reference Guide
IX-II Index
Index
See RIP
routing tables .................................................................15
lookup .......................................................................32
lookup in multiple VRs ...........................................34
multicast .................................................................147
route selection .........................................................30
types .........................................................................15
routing, multicast.........................................................145
routing, policy based ...................................................127
S
source interface-based routing (SIBR) .........................19
source-based routing (SBR) ..........................................17
static routing .........................................................2, 2 to 9
configuring .................................................................5
multicast .................................................................148
Null interface, forwarding on .................................10
using ...........................................................................3
V
virtual routers
See VRs
VRs .........................................................................37 to 42
access lists................................................................40
BGP ..............................................................104 to 111
ECMP ........................................................................36
modifying .................................................................22
on vsys .....................................................................26
OSPF ................................................................49 to 67
RIP....................................................................75 to 89
route metrics ...........................................................31
router IDs .................................................................22
SBR............................................................................17
SIBR ..........................................................................19
using two ..................................................................23
VRs, routes
exporting ..................................................................42
filtering .....................................................................39
importing .................................................................42
maps .........................................................................38
preference ................................................................30
redistribution ...........................................................37
selection ...................................................................30
VRs, routing tables
lookup .......................................................................32
lookup in multiple VRs ...........................................34
maximum entries ....................................................29
Index IX-III
Concepts & Examples ScreenOS Reference Guide
IX-IV Index
Concepts & Examples
ScreenOS Reference Guide
Volume 8:
Address Translation
Juniper Networks, the Juniper Networks logo, JUNOS, NetScreen, ScreenOS, and Steel-Belted Radius are registered trademarks of Juniper Networks, Inc.
in the United States and other countries. JUNOSe is a trademark of Juniper Networks, Inc. All other trademarks, service marks, registered trademarks, or
registered service marks are the property of their respective owners.
All specifications are subject to change without notice. Juniper Networks assumes no responsibility for any inaccuracies in this document or for any
obligation to update information in this document. Juniper Networks reserves the right to change, modify, transfer, or otherwise revise this publication
without notice.
FCC Statement
The following information is for FCC compliance of Class A devices: This equipment has been tested and found to comply with the limits for a Class A
digital device, pursuant to part 15 of the FCC rules. These limits are designed to provide reasonable protection against harmful interference when the
equipment is operated in a commercial environment. The equipment generates, uses, and can radiate radio-frequency energy and, if not installed and
used in accordance with the instruction manual, may cause harmful interference to radio communications. Operation of this equipment in a residential
area is likely to cause harmful interference, in which case users will be required to correct the interference at their own expense.
The following information is for FCC compliance of Class B devices: The equipment described in this manual generates and may radiate radio-frequency
energy. If it is not installed in accordance with Juniper Networks’ installation instructions, it may cause interference with radio and television reception.
This equipment has been tested and found to comply with the limits for a Class B digital device in accordance with the specifications in part 15 of the FCC
rules. These specifications are designed to provide reasonable protection against such interference in a residential installation. However, there is no
guarantee that interference will not occur in a particular installation.
If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user
is encouraged to try to correct the interference by one or more of the following measures:
Connect the equipment to an outlet on a circuit different from that to which the receiver is connected.
Caution: Changes or modifications to this product could void the user's warranty and authority to operate this device.
Disclaimer
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED
WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED
WARRANTY, CONTACT YOUR JUNIPER NETWORKS REPRESENTATIVE FOR A COPY.
ii
Table of Contents
About This Volume v
Document Conventions................................................................................... vi
Web User Interface Conventions ............................................................. vi
Command Line Interface Conventions ..................................................... vi
Naming Conventions and Character Types ............................................. vii
Illustration Conventions ......................................................................... viii
Requesting Technical Support ....................................................................... viii
Self-Help Online Tools and Resources....................................................... ix
Opening a Case with JTAC ........................................................................ ix
Document Feedback ....................................................................................... ix
Index..........................................................................................................................IX-I
iv Table of Contents
About This Volume
v
Concepts & Examples ScreenOS Reference Guide
Document Conventions
This document uses the conventions described in the following sections:
The following example shows the WebUI path and parameters for defining an
address:
Policy > Policy Elements > Addresses > List > New: Enter the following, then
click OK:
To open Online Help for configuration settings, click the question mark (?) in the
upper left of the screen.
The navigation tree also provides a Help > Config Guide configuration page to help
you configure security policies and Internet Protocol Security (IPSec). Select an
option from the list, and follow the instructions on the page. Click the ? character in
the upper left for Online Help on the Config Guide.
In text, commands are in boldface type and variables are in italic type.
In examples:
vi Document Conventions
About This Volume
If there is more than one choice, each choice is separated by a pipe ( | ). For
example, the following command means “set the management options for the
ethernet1, the ethernet2, or the ethernet3 interface”:
NOTE: When entering a keyword, you only have to type enough letters to identify the
word uniquely. Typing set adm u whee j12fmt54 will enter the command set
admin user wheezer j12fmt54. However, all the commands documented in this
guide are presented in their entirety.
If a name string includes one or more spaces, the entire string must be
enclosed within double quotes; for example:
Any leading spaces or trailing text within a set of double quotes are trimmed;
for example, “ local LAN ” becomes “local LAN”.
NOTE: A console connection only supports SBCS. The WebUI supports both SBCS and
MBCS, depending on the character sets that your browser supports.
Illustration Conventions
Figure 1 shows the basic set of images used in illustrations throughout this volume.
Policy Engine
Security Zone Interfaces:
White = Protected Zone Interface
(example = Trust Zone)
Black = Outside Zone Interface
(example = Untrust Zone)
Generic Network Device
Tunnel Interface
Server
VPN Tunnel
Router
Juniper Networks
Switch Security Devices
Hub
Download the latest versions of software and review your release notes—
http://www.juniper.net/customers/csc/software/
To verify service entitlement by product serial number, use our Serial Number
Entitlement (SNE) Tool—
https://tools.juniper.net/SerialNumberEntitlementSearch/
Document Feedback
If you find any errors or omissions in this document, contact Juniper Networks at
[email protected].
Document Feedback ix
Concepts & Examples ScreenOS Reference Guide
x Document Feedback
Chapter 1
Address Translation
ScreenOS provides many methods for performing source and destination IP and
port address translation. This chapter describes the various address translation
methods available and contains the following sections:
NOTE: Deterministic address translation uses a technique called address shifting, which
is explained later in this chapter. For information about address shifting that
applies to NAT-src, see “NAT-Src from a DIP Pool with Address Shifting” on
page 20. For information about address shifting that applies to NAT-dst, see
“NAT-Src and NAT-Dst in the Same Policy” on page 50.
If the translated address comes from the egress interface, the security device
translates the source IP address in all packets to the IP address of that interface. You
can configure the security device to apply NAT-src at either the interface level or at
the policy level. If you configure a policy to apply NAT-src and the ingress interface
is in NAT mode, the policy-based NAT-src settings override the interface-based NAT.
(This chapter focusses on policy-based NAT-src. For details on interface-based
NAT-src—or NAT alone—see “NAT Mode” on page 2-92. For more information about
DIP pools, see “Dynamic IP Pools” on page 2-141.)
NOTE: You can use policy-based NAT-src when the ingress interface is in Route or NAT
mode. If it is in NAT mode, the policy-level NAT-src parameters supersede the
interface-level NAT parameters.
With policy-based NAT-src, you can optionally choose to have the security device
perform Port Address Translation (PAT) on the original source port number. When
PAT is enabled, the security device can translate up to ~64,500 different IP
addresses to a single IP address with up to ~64,500 different port numbers. The
security device uses the unique, translated port number to maintain session state
information for traffic to and from the same, single IP address. For interface-based
NAT-src—or just NAT—PAT is enabled automatically. Because the security device
translates all original IP addresses to the same translated IP address (that of the
egress interface), the security device uses the translated port number to identify
each session to which a packet belongs. Similarly, if a DIP pool consists of only one
IP address and you want the security device to apply NAT-src to multiple hosts using
that address, then PAT is required for the same reason.
NOTE: With PAT enabled, the security device maintains a pool of free port numbers to
assign along with addresses from the DIP pool. The figure of ~64,500 is derived
by subtracting 1023, the numbers reserved for the well-known ports, from the
maximum number of ports, which is 65,535. Thus, when the security device
performs NAT-src with a DIP pool containing a single IP address and PAT is
enabled, the security device can translate the original IP addresses of up to
~64,500 hosts to a single IP address and translate each original port number to a
unique port number.
For custom applications that require a specific source port number to operate
properly, performing PAT causes such applications to fail. To provide for such cases,
you can disable PAT.
NOTE: For more information about NAT-src, see “Source Network Address Translation” on
page 13.
All three options translate the original destination IP address in an IP packet header
to a different address. WIth policy-based NAT-dst and VIPs, you can optionally
enable port mapping.
NOTE: For information about port mapping, see the “Policy-Based NAT-Dst” on page 4
and “Destination Network Address Translation” on page 27.
ScreenOS does not support the use of policy-based NAT-dst in combination with
MIPs and VIPs. If you have configured a MIP or VIP, the security device applies the
MIP or VIP to any traffic to which a policy-based NAT-dst configuration also
applies. In other words, MIPs and VIPs disable policy-based NAT-dst if the security
device is accidentally configured to apply both to the same traffic.
Policy-Based NAT-Dst
You can configure a policy to translate one destination IP address to another
address, one IP address range to a single IP address, or one IP address range to
another IP address range. When a single destination IP address translates to
another IP address or an IP address range translates to a single IP address,
ScreenOS can support NAT-dst with or without port mapping. Port mapping is the
deterministic translation of one original destination port number to another specific
number, unlike PAT, which translates any original source port number randomly
assigned by the initiating host to another number randomly assigned by the
security device.
TCP Segment
or
UDP Datagram 44235 6055 Payload 44235 53 Payload
IP Packets
Destination IP Address Translation from an IP Address Range to a Single IP Address with Destination Port Mapping
Original Destination and IP and Port Addresses Translated Destination IP and Port Addresses
TCP Segment 2
28560 8000 Payload 28560 80 Payload
When you configure a policy to perform NAT-dst for an address range, the security
device uses address shifting to translate a destination IP address from within a
range of original destination addresses to a known address in another range of
addresses.
When performing NAT-dst for a range of IP addresses, the security device maintains a mapping of each IP address in
one address range to a corresponding IP address in another address range.
NOTE: You can combine NAT-src and NAT-dst within the same policy. Each translation
mechanism operates independently and unidirectionally. That is, if you enable
NAT-dst on traffic from zone1 to zone2, the security device does not perform
NAT-src on traffic originating from zone2 and destined to zone1 unless you
specifically configure it to do so. For more information, see “Directional Nature of
NAT-Src and NAT-Dst” on page 10. For more information about NAT-dst, see
“Destination Network Address Translation” on page 27.
NOTE: You can define a VIP to be the same as an interface IP address. This ability is
convenient when the security device only has one assigned IP address and when
the IP address is assigned dynamically.
Whereas the address translation mechanisms for MIPs and VIPs are bidirectional,
the capabilities provided by policy-based NAT-src and NAT-dst separate address
translation for inbound and outbound traffic, providing better control and security.
For example, if you use a MIP to a webserver, whenever that server initiates
outbound traffic to get an update or patch, its activity is exposed, which might
provide information for a vigilant attacker to exploit. The policy-based address
translation methods allow you to define a different address mapping when the
webserver receives traffic (using NAT-dst) than when it initiates traffic (using
NAT-src). By thus keeping its activities hidden, you can better protect the server
from anyone attempting to gather information in preparation for an attack.
Policy-based NAT-src and NAT-dst offer a single approach that can duplicate and
surpass the functionality of interface-based MIPs and VIPs.
1.1.1.20
Trust Zone ethernet1 ethernet3 Untrust Zone
10.1.1.1/24 1.1.1.1/24
10.1.1.5:25611 1.1.1.20:41834 2.2.2.2:80
(Virtual Device)
Translated Source Destination
Original Source
DIP Pool ID 5
1.1.1.10 – 1.1.1.40
1.1.1.20
Trust Zone ethernet1 ethernet3 Untrust Zone
10.1.1.1/24 1.1.1.1/24
10.1.1.5:25611 1.1.1.20:25611 2.2.2.2:80
(Virtual Device)
1.1.1.20
Trust Zone ethernet3 1.1.1.21
ethernet1 1.1.1.1/24 Untrust Zone
10.1.1.20:25611 10.1.1.1/24 1.1.1.20:25611
2.2.2.2:80
10.1.1.21:35030
1.1.1.21:35030
Source Original
Destination Translated
Destination
SRC DST
3.3.3.3 1.1.1.1 Payload
SRC DST
2.2.2.2 1.1.1.1 Payload
NOTE: You must set a route to 2.2.2.2/32 (virtual host B) so the security device can do a
route lookup to determine the destination zone. For more about NAT-dst routing
issues, see “Routing for NAT-Dst” on page 32.
However, if you only create the above policy specifying NAT-dst from host A to
host B, the security device does not translate the original source IP address of
host B if host B initiates traffic to host A, rather than responding to traffic from
host A. For the security device to do translate the source IP address of host B when
it initiates traffic to host A, you must configure a second policy from host B to
host A specifying NAT-src. (This behavior differs from that of MIPs. See “Mapped IP
Addresses” on page 63.)
NOTE: To retain focus on the IP address translation mechanisms, Port Address Translation
(PAT) is not shown. If you specify fixed port numbers for a DIP pool consisting of a
single IP address, then only one host can use that pool at a time. The policy above
specifies only “host B” as the source address. If “host B” is the only host that uses
DIP pool 7, then it is unnecessary to enable PAT.
Host A
1.1.1.1 DIP Pool 7 Host B
1.1.1.3 - 1.1.1.3 ethernet3 ethernet1 3.3.3.3
1.1.1.10/24 3.3.3.10/24
Zone A Zone B
SRC DST
3.3.3.3 1.1.1.1 Payload
SRC DST
1.1.1.1 1.1.1.3 Payload
Introduction to NAT-Src
It is sometimes necessary for the security device to translate the original source IP
address in an IP packet header to another address. For example, when hosts with
private IP addresses initiate traffic to a public address space, the security device
must translate the private source IP address to a public one. Also, when sending
traffic from one private address space through a VPN to a site using the same
addresses, the security devices at both ends of the tunnel must translate the source
and destination IP addresses to mutually neutral addresses.
NOTE: For information about public and private IP addresses, see “Public IP Addresses”
on page 2-47 and “Private IP Addresses” on page 2-48.
A dynamic IP (DIP) address pool provides the security device with a supply of
addresses from which to draw when performing Source Network Address
Translation (NAT-src). When a policy requires NAT-src and references a specific DIP
pool, the security device draws addresses from that pool when performing the
translation.
Introduction to NAT-Src 13
Concepts & Examples ScreenOS Reference Guide
NOTE: The DIP pool must use addresses within the same subnet as the default interface
in the destination zone referenced in the policy. If you want to use a DIP pool with
addresses outside the subnet of the destination zone interface, you must define a
DIP pool on an extended interface. For more information, see “Using DIP in a
Different Subnet” on page 2-145.
The DIP pool can be as small as a single IP address, which, if you enable Port
Address Translation (PAT), can support up to ~64,500 hosts concurrently. Although
all packets receiving a new source IP address from that pool get the same address,
they each get a different port number. By maintaining a session table entry that
matches the original address and port number with the translated address and port
number, the security device can track which packets belong to which session and
which sessions belong to which hosts.
NOTE: When PAT is enabled, the security device also maintains a pool of free port
numbers to assign along with addresses from the DIP pool. The figure of ~64,500
is derived by subtracting 1023, the numbers reserved for the well-known ports,
from the maximum number of ports, which is 65,535.
If you use NAT-src but do not specify a DIP pool in the policy, the security device
translates the source address to that of the egress interface in the destination zone.
In such cases, PAT is required and automatically enabled.
For applications requiring that a particular source port number remain fixed, you
must disable PAT and define a DIP pool with a range of IP addresses large enough
for each concurrently active host to receive a different translated address. For
fixed-port DIP, the security device assigns one translated source address to the
same host for all its concurrent sessions. In contrast, when the DIP pool has PAT
enabled, the security device might assign a single host different addresses for
different concurrent sessions—unless you define the DIP as sticky (see “Sticky DIP
Addresses” on page 2-144).
NOTE: You can add a maximum of three IP address ranges for a fixed-port DIP pool. The
IP address ranges should not overlap. When the first address range is exhausted,
the security device attempts to process the NAT request using the second address
range. When the second address range is exhausted, the security device attempts
to process the NAT request using the third address range. Note that the total range
of all IP addresses defined in the fixed-port DIP pool must not exceed the
permitted address scope of the subnet.
14 Introduction to NAT-Src
Chapter 2: Source Network Address Translation
NOTE: When you define a DIP pool, the security device enables PAT by default. To disable
PAT, you must add the key word fix-port to the end of the CLI command, or clear
the Port Translation option on the DIP configuration page in the WebUI. For
example, set interface ethernet3 dip 5 1.1.1.30 1.1.1.30 fix-port, or Network >
Interfaces > Edit (for ethernet3) > DIP: ID: 5; Start: 1.1.1.30; End: 1.1.1.30; Port
Translation: (clear).
You then set a policy that instructs the security device to perform the following
tasks:
Permit HTTP traffic from any address in the Trust zone to any address in the
Untrust zone
Translate the source IP address in the IP packet header to 1.1.1.30, which is the
sole entry in DIP pool 5
Translate the original source port number in the TCP segment header or UDP
datagram header to a new, unique number
Send HTTP traffic with the translated source IP address and port number out
ethernet3 to the Untrust zone
(Virtual Device)
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
2. DIP
Network > Interfaces > Edit (for ethernet3) > DIP > New: Enter the
following, then click OK:
ID: 5
IP Address Range: (select), 1.1.1.30 ~ 1.1.1.30
Port Translation: (select)
In the same subnet as the interface IP or its secondary IPs: (select)
3. Policy
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: HTTP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): 5 (1.1.1.30 - 1.1.1.30)/X-late
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. DIP
set interface ethernet3 dip 5 1.1.1.30 1.1.1.30
3. Policy
set policy from trust to untrust any any http nat src dip-id 5 permit
save
Permit traffic for a user-defined service named “e-stock” from any address in
the Trust zone to any address in the Untrust zone
NOTE: It is assumed that you have previously defined the user-defined service “e-stock.”
This fictional service requires that all e-stock transactions originate from specific
source port numbers. For this reason, you must disable PAT for DIP pool 6.
Translate the source IP address in the IP packet header to any available address
in DIP pool 6
Retain the original source port number in the TCP segment header or UDP
datagram header
Send e-stock traffic with the translated source IP address and original port
number out ethernet3 to the Untrust zone
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
2. DIP
Network > Interfaces > Edit (for ethernet3) > DIP > New: Enter the
following, then click OK:
ID: 6
IP Address Range: (select), 1.1.1.50 ~ 1.1.1.150
Port Translation: (clear)
In the same subnet as the interface IP or its secondary IPs: (select)
3. Policy
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: e-stock
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
DIP on: (select), 6 (1.1.1.50 - 1.1.1.150)
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. DIP
set interface ethernet3 dip 6 1.1.1.50 1.1.1.150 fix-port
3. Policy
set policy from trust to untrust any any e-stock nat src dip-id 6 permit
save
One possible use for performing NAT-src with address shifting is to provide greater
policy granularity on another security device that receives traffic from the first one.
For example, the admin for Device-A at site A defines a policy that translates the
source addresses of its hosts when communicating with Device-B at site B through a
site-to-site VPN tunnel. If Device-A applies NAT-src using addresses from a DIP pool
without address shifting, the Device-B admin can only configure generic policies
regarding the traffic it can allow from site A. Unless the Device-B admin knows the
specific translated IP addresses, he can only set inbound policies for the range of
source addresses drawn from the Device-A DIP pool. On the other hand, if the
Device-B admin knows what the translated source addresses are (because of
address shifting), the Device-B admin can now be more selective and restrictive
with the policies he sets for inbound traffic from site A.
Note that it is possible to use a DIP pool with address shifting enabled in a policy
that applies to source addresses beyond the range specified in the pool. In such
cases, the security device passes traffic from all source addresses permitted in the
policy, applying NAT-src with address shifting to those addresses that fall within the
DIP pool range but leaving those addresses that fall outside the DIP pool range
unchanged. If you want the security device to apply NAT-src to all source addresses,
make sure that the range of source addresses is smaller or the same size as the
range of the DIP pool.
NOTE: The security device does not support source Port Address Translation (PAT) with
address shifting.
You define addresses for five hosts in the Trust zone and added them to an address
group named “group1”. The addresses for these hosts are 10.1.1.11, 10.1.1.12,
10.1.1.13, 10.1.1.14, and 10.1.1.15. You configure a policy from the Trust zone to
the Untrust zone that references that address group in a policy to which you apply
NAT-src with DIP pool 10. The policy instructs the security device to perform NAT-src
whenever a member of group1 initiates HTTP traffic to an address in the Untrust
zone. Furthermore, the security device always performs NAT-src from a particular IP
address—such as 10.1.1.13—to the same translated IP address—1.1.1.103.
You then set a policy that instructs the security device to perform the following
tasks:
Permit HTTP traffic from group1 in the Trust zone to any address in the Untrust
zone
Send HTTP traffic with the translated source IP address and port number out
ethernet3 to the Untrust zone
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
ID: 10
IP Shift: (select)
From: 10.1.1.11
To: 1.1.1.101 ~ 1.1.1.105
In the same subnet as the interface IP or its secondary IPs: (select)
3. Addresses
Policy > Policy Elements> Addresses > List > New: Enter the following
information, then click OK:
Policy > Policy Elements> Addresses > List > New: Enter the following
information, then click OK:
Policy > Policy Elements> Addresses > List > New: Enter the following
information, then click OK:
Policy > Policy Elements> Addresses > List > New: Enter the following
information, then click OK:
Policy > Policy Elements> Addresses > List > New: Enter the following
information, then click OK:
Policy > Policy Elements > Addresses > Group > (for Zone: Trust) New: Enter
the following group name, move the following addresses, then click OK:
Select host1 and use the << button to move the address from the
Available Members column to the Group Members column.
Select host2 and use the << button to move the address from the
Available Members column to the Group Members column.
Select host3 and use the << button to move the address from the
Available Members column to the Group Members column.
Select host4 and use the << button to move the address from the
Available Members column to the Group Members column.
Select host5 and use the << button to move the address from the
Available Members column to the Group Members column.
4. Policy
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), group1
Destination Address:
Address Book Entry: (select), Any
Service: HTTP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): 10 (1.1.1.101 - 1.1.1.105)
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. DIP
set interface ethernet3 dip 10 shift-from 10.1.1.11 to 1.1.1.101 1.1.1.105
3. Addresses
set address trust host1 10.1.1.11/32
set address trust host2 10.1.1.12/32
set address trust host3 10.1.1.13/32
set address trust host4 10.1.1.14/32
set address trust host5 10.1.1.15/32
set group address trust group1 add host1
set group address trust group1 add host2
set group address trust group1 add host3
set group address trust group1 add host4
set group address trust group1 add host5
4. Policy
set policy from trust to untrust group1 any http nat src dip-id 10 permit
save
Permit HTTP traffic from any address in the Trust zone to any address in the
Untrust zone
Translate the source IP address in the IP packet header to 1.1.1.1, which is the
IP address of ethernet3, the interface bound to the Untrust zone, and thus the
egress interface for traffic sent to any address in the Untrust zone
Translate the original source port number in the TCP segment header or UDP
datagram header to a new, unique number
Send traffic with the translated source IP address and port number out
ethernet3 to the Untrust zone
(Virtual
1.1.1.1 Device)
Original Source Translated Source Destination
SRC IP DST IP SRC PT DST PT PROTO SRC IP DST IP SRC PT DST PT PROTO
10.1.1.5 2.2.2.2 25611 80 HTTP 1.1.1.1 2.2.2.2 41834 80 HTTP
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet3): Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), Any
Service: HTTP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Source Translation: (select)
(DIP on): None (Use Egress Interface IP)
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Policy
set policy from trust to untrust any any http nat src permit
save
NOTE: For information about destination address translation using a mapped IP (MIP) or
virtual IP (VIP) address, see “Mapped and Virtual Addresses” on page 63.
27
Concepts & Examples ScreenOS Reference Guide
Introduction to NAT-Dst
You can define policies to translate the destination address from one IP address to
another. Perhaps you need the security device to translate one or more public IP
addresses to one or more private addresses. The relationship of the original
destination address to the translated destination address can be a one-to-one
relationship, a many-to-one relationship, or a many-to-many relationship. Figure 20
depicts the concepts of one-to-one and many-to-one NAT-dst relationships.
(Virtual Devices)
(Virtual Devices)
Original Translated
Destination Destination
Note: The original and the translated destination IP addresses must be in the same security zone.
28 Introduction to NAT-Dst
Chapter 3: Destination Network Address Translation
(Virtual Devices)
Original Translated
Destinations Destinations
There must be entries in the route table for both the original destination IP address
and the translated destination IP address. The security device performs a route
lookup using the original destination IP address to determine the destination zone
for a subsequent policy lookup. It then performs a second route lookup using the
translated address to determine where to send the packet. To ensure that the
routing decision is in accord with the policy, both the original destination IP address
and the translated IP address must be in the same security zone. (For more
information about the relationship of the destination IP address, route lookup, and
policy lookup, see “Packet Flow for NAT-Dst” on page 29.)
Untrust Zone
Trust Zone
ethernet1 ethernet3
1.1.1.1/24 3.3.3.3/24
1.1.1.5
Source Custom 1 Zone
ethernet4
4.4.4.4/24
5.5.5.5 4.4.4.5
The three question marks indicate that the security device has not yet performed the Original Translated
steps required to learn which interface it must use to forward the packet. Destination Destination
Introduction to NAT-Dst 29
Concepts & Examples ScreenOS Reference Guide
2. If you have enabled SCREEN options for the Untrust zone, the security device
activates the SCREEN module at this point. SCREEN checking can produce one
of the following three results:
If you have not enabled any SCREEN options for the Untrust zone, the security
device immediately proceeds to the next step.
3. The session module performs a session lookup, attempting to match the packet
with an existing session.
If the packet does not match an existing session, the security device performs
First Packet Processing, a procedure involving the remaining steps.
If the packet matches an existing session, the security device performs Fast
Processing, using the information available from the existing session entry to
process the packet. Fast Processing bypasses all but the last step because the
information generated by the bypassed steps has already been obtained during
the processing of the first packet in the session.
NOTE: The security device checks if the destination IP address is used in a VIP
configuration only if the packet arrives at an interface bound to the Untrust zone.
If there is such a configuration, the security device resolves the MIP or VIP to
the translated destination IP address and bases its route lookup on that. It then
does a policy lookup between the Untrust and Global zones. If it finds a policy
match that permits the traffic, the security device forwards the packet out the
egress interface determined in the route lookup.
If 5.5.5.5 is not used in a MIP or VIP configuration, the security device proceeds
to the next step.
5. To determine the destination zone, the route module does a route lookup of the
original destination IP address; that is, it uses the destination IP address that
appears in the header of the packet that arrives at ethernet1. (The route module
uses the ingress interface to determine which virtual router to use for the route
lookup.) It discovers that 5.5.5.5/32 is accessed through ethernet4, which is
bound to the Custom1 zone.
30 Introduction to NAT-Dst
Chapter 3: Destination Network Address Translation
6. The policy engine does a policy lookup between the Untrust and Custom1
zones (as determined by the corresponding ingress and egress interfaces). The
source and destination IP addresses and the service match a policy redirecting
HTTP traffic from 5.5.5.5 to 4.4.4.5.
set policy from untrust to custom1 any v-server1 http nat dst ip 4.4.4.5 permit
7. The security device does a second route lookup using the translated IP address
and discovers that 4.4.4.5/32 is accessed through ethernet4.
Introduction to NAT-Dst 31
Concepts & Examples ScreenOS Reference Guide
4.4.4.5
Destination
Virtual system to which Policy ID that applies
this session belongs to this session
Session Session State Flags Session Timeout 30 Units
ID (internal use only) (30 x 10 = 300 seconds)
32 Introduction to NAT-Dst
Chapter 3: Destination Network Address Translation
In the following three scenarios, the need to enter static routes differs according to
the network topology surrounding the destination addresses referenced in this
policy:
set policy from untrust to trust any oda1 http nat dst ip 10.1.1.5 permit
in which “oda1” is the original destination address 10.2.1.5, and the translated
destination address is 10.1.1.5.
Figure 24: Original and Translated Addresses Using the Same Egress Interface
(Virtual
Device) 10.1.1.0/24
* Although 10.2.1.5 is not in the 10.1.1.0/24 subnet, because its route does not specify a gateway,
it is illustrated as if it is in the same connected subnet as the 10.1.1.0/24 address space.
WebUI
Network > Routing > Destination > (trust-vr) New: Enter the following, then
click OK:
CLI
set vrouter trust-vr route 10.2.1.5/32 interface ethernet3
save
Introduction to NAT-Dst 33
Concepts & Examples ScreenOS Reference Guide
NOTE: Because this route is required to reach any address in the 10.2.1.0/24 subnet, you
have probably already configured it. If so, no extra route needs to be added just
for the policy to apply NAT-dst to 10.2.1.5.
WebUI
Network > Routing > Destination > (trust-vr) New: Enter the following, then
click OK:
CLI
set vrouter trust-vr route 10.2.1.0/24 interface ethernet3 gateway 10.1.1.250
save
34 Introduction to NAT-Dst
Chapter 3: Destination Network Address Translation
Figure 26: Original and Translated Addresses Using Different Egress Interfaces
Translated
Destination
ethernet3 10.1.1.5
10.1.1.1/24
10.1.1.0/24
Trust Zone
10.2.1.0/24
NAT-Dst—One-to-One Mapping
When applying Destination Network Address Translation (NAT-dst) without PAT, the
security device translates the destination IP address and performs stateful
inspection as illustrated in Figure 27 (note that only the elements in the IP packet
and TCP segment headers relevant to NAT-dst are shown).
NAT-Dst—One-to-One Mapping 35
Concepts & Examples ScreenOS Reference Guide
Permit both FTP and HTTP traffic (defined as the service group “http-ftp”) from
any address in the Untrust zone to a the original destination address named
“oda2” with address 1.2.1.8 in the DMZ zone
Leave the original destination port number in the TCP segment header as is (80
for HTTP and 21 for FTP)
You bind ethernet3 to the Untrust zone and assign it IP address 1.1.1.1/24. You
bind ethernet2 to the DMZ and assign it IP address 10.2.1.1/24. You also define a
route to the original destination address 1.2.1.8 through ethernet2. Both the Untrust
and DMZ zones are in the trust-vr routing domain.
Source Translated
2.2.2.5 Destination
DMZ Zone 10.2.1.8
SRC IP DST IP SRC PT DST PT PROTO SRC IP DST IP SRC PT DST PT PROTO
2.2.2.5 1.2.1.8 25611 80 HTTP 2..2.1.5 10.2.1.8 25611 80 HTTP
SRC IP DST IP SRC PT DST PT PROTO SRC IP DST IP SRC PT DST PT PROTO
2.2.2.5 1.2.1.8 40365 21 FTP 2.2.2.5 10.2.1.8 40365 21 FTP
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
OK:
36 NAT-Dst—One-to-One Mapping
Chapter 3: Destination Network Address Translation
2. Address
Policy > Policy Elements> Addresses > List > New: Enter the following
information, then click OK:
Select HTTP and use the << button to move the service from the Available
Members column to the Group Members column.
Select FTP and use the << button to move the service from the Available
Members column to the Group Members column.
4. Route
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), oda2
Service: HTTP-FTP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Destination Translation: (select)
Translate to IP: (select), 10.2.1.8
Map to Port: (clear)
CLI
1. Interfaces
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface ethernet2 zone dmz
set interface ethernet2 ip 10.2.1.1/24
NAT-Dst—One-to-One Mapping 37
Concepts & Examples ScreenOS Reference Guide
2. Address
set address dmz oda2 1.2.1.8/32
3. Service Group
set group service http-ftp
set group service http-ftp add http
set group service http-ftp add ftp
4. Route
set vrouter trust-vr route 1.2.1.8/32 interface ethernet2
5. Policy
set policy from untrust to dmz any oda2 http-ftp nat dst ip 10.2.1.8 permit
save
Permit both FTP and HTTP traffic from any address in the Untrust zone to a
user-defined address named “oda3” in the DMZ zone
For HTTP traffic, translate the destination IP address in the IP packet header
from 1.2.1.8 to 10.2.1.8
For FTP traffic, translate the destination IP address from 1.2.1.8 to 10.2.1.9
Leave the original destination port number in the TCP segment header as is (80
for HTTP, 21 for FTP)
Forward HTTP traffic to 10.2.1.8 and FTP traffic to 10.2.1.9 in the DMZ zone
38 NAT-Dst—One-to-One Mapping
Chapter 3: Destination Network Address Translation
SRC IP DST IP SRC PT DST PT PROTO SRC IP DST IP SRC PT DST PT PROTO
2.2.2.5 1.2.1.8 25611 80 HTTP 2.2.2.5 10.2.1.8 25611 80 HTTP
SRC IP DST IP SRC PT DST PT PROTO SRC IP DST IP SRC PT DST PT PROTO
2.2.2.5 1.2.1.8 40365 21 FTP 2.2.2.5 10.2.1.9 40365 21 FTP
You bind ethernet3 to the Untrust zone and assign it IP address 1.1.1.1/24. You
bind ethernet2 to the DMZ, and assign it IP address 10.2.1.1/24. You also define a
route to the original destination address 1.2.1.8 through ethernet2. Both the Untrust
zone and the DMZ zone are in the trust-vr routing domain.
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
OK:
NAT-Dst—One-to-One Mapping 39
Concepts & Examples ScreenOS Reference Guide
4. Policies
Policies > (From: Untrust, To: DMZ) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), oda3
Service: HTTP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Destination Translation: (select)
Translate to IP: (select), 10.2.1.8
Map to Port: (clear)
Policies > (From: Untrust, To: DMZ) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), oda3
Service: FTP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Destination Translation: (select)
Translate to IP: (select), 10.2.1.9
Map to Port: (clear)
CLI
1. Interfaces
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface ethernet2 zone dmz
set interface ethernet2 ip 10.2.1.1/24
2. Address
set address dmz oda3 1.2.1.8/32
3. Route
set vrouter trust-vr route 1.2.1.8/32 interface ethernet2
4. Policies
set policy from untrust to dmz any oda3 http nat dst ip 10.2.1.8 permit
set policy from untrust to dmz any oda3 ftp nat dst ip 10.2.1.9 permit
save
40 NAT-Dst—One-to-One Mapping
Chapter 3: Destination Network Address Translation
NAT-Dst—Many-to-One Mapping
The relationship of the original destination address to the translated destination
address can also be a many-to-one relationship. In this case, the security device
forwards traffic sent to several original destination addresses to a single translated
destination address. Optionally, you can also specify destination port mapping.
Permit HTTP traffic from any address in the Untrust zone to a user-defined
address group named “oda45” with addresses “oda4” (1.2.1.10) and “oda5”
(1.2.1.20) in the DMZ zone
Leave the original destination port number in the TCP segment header as is (80
for HTTP)
SRC IP DST IP SRC PT DST PT PROTO SRC IP DST IP SRC PT DST PT PROTO
1.1.1.6 1.2.1.20 40365 80 HTTP 1.1.1.6 10.2.1.15 40365 80 HTTP
You bind ethernet3 to the Untrust zone and assign it IP address 1.1.1.1/24. You
bind ethernet2 to the DMZ and assign it IP address 10.2.1.1/24. You also define a
route to the original destination addresses 1.2.1.10 and 1.2.1.20 through ethernet2.
Both the Untrust zone and the DMZ zone are in the trust-vr routing domain.
NAT-Dst—Many-to-One Mapping 41
Concepts & Examples ScreenOS Reference Guide
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
OK:
Policy > Policy Elements> Addresses > List > New: Enter the following
information, then click OK:
Policy > Policy Elements > Addresses > Groups > (for Zone: DMZ) New:
Enter the following group name, move the following addresses, then click OK:
Select oda4 and use the << button to move the address from the
Available Members column to the Group Members column.
Select oda5 and use the << button to move the address from the
Available Members column to the Group Members column.
3. Routes
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
42 NAT-Dst—Many-to-One Mapping
Chapter 3: Destination Network Address Translation
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), oda45
Service: HTTP
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Destination Translation: (select)
Translate to IP: (select), 10.2.1.15
Map to Port: (clear)
CLI
1. Interfaces
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface ethernet2 zone dmz
set interface ethernet2 ip 10.2.1.1/24
2. Addresses
set address dmz oda4 1.2.1.10/32
set address dmz oda5 1.2.1.20/32
set group address dmz oda45 add oda4
set group address dmz oda45 add oda5
3. Routes
set vrouter trust-vr route 1.2.1.10/32 interface ethernet2
set vrouter trust-vr route 1.2.1.20/32 interface ethernet2
4. Policy
set policy from untrust to dmz any oda45 http nat dst ip 10.2.1.15 permit
save
NAT-Dst—Many-to-One Mapping 43
Concepts & Examples ScreenOS Reference Guide
NAT-Dst—Many-to-Many Mapping
You can use Destination Network Address Translation (NAT-dst) to translate one
range of IP addresses to another range. The range of addresses can be a subnet or a
smaller set of addresses within a subnet. ScreenOS employs an address shifting
mechanism to maintain the relationships among the original range of destination
addresses after translating them to the new range of addresses. For example, if the
range of original addresses is 10.1.1.1 – 10.1.1.50 and the starting address for the
translated address range is 10.100.3.101, then the security device translates the
addresses as follows:
10.1.1.1 – 10.100.3.101
10.1.1.2 – 10.100.3.102
10.1.1.3 – 10.100.3.103
10.1.1.48 – 10.100.3.148
10.1.1.49 – 10.100.3.149
10.1.1.50 – 10.100.3.150
If, for example, you want to create a policy that applies the above translations to
HTTP traffic from any address in zone A to an address object named “addr1-50”,
which contains all the addresses from 10.1.1.1 to 10.1.1.50, in zone B, you can
enter the following CLI command:
set policy id 1 from zoneA to zoneB any addr1-50 http nat dst ip 10.100.3.101
10.100.3.150 permit
If any host in zone A initiates HTTP traffic to an address within the defined range in
zone B, such as 10.1.1.37, then the security device applies this policy and translates
the destination address to 10.100.3.137.
The security device only performs NAT-dst if the source and destination zones, the
source and destination addresses, and the service specified in the policy all match
these components in the packet. For example, you might create another policy that
permits traffic from any host in zone A to any host in zone B and position it after
policy 1 in the policy list:
set policy id 1 from zoneA to zoneB any addr1-50 http nat dst ip 10.100.3.101
10.100.3.150 permit
set policy id 2 from zoneA to zoneB any any any permit
44 NAT-Dst—Many-to-Many Mapping
Chapter 3: Destination Network Address Translation
If you have these two policies configured, the following kinds of traffic sent from a
host in zone A to a host in zone B bypass the NAT-dst mechanism:
A zone A host initiates HTTP traffic to 10.1.1.51 in zone B. The security device
also applies policy 2 because the destination address is not in the addr1-50
address group, and passes the traffic without translating the destination
address.
Permit all traffic types from any address in the Untrust zone to any address in
the DMZ zone
Translate the original destination address named “oda6” from the 1.2.1.0/24
subnet to a corresponding address in the 10.2.1.0/24 subnet
Leave the original destination port number in the TCP segment header as is
You bind ethernet3 to the Untrust zone and assign it IP address 1.1.1.1/24. You
bind ethernet2 to the DMZ and assign it IP address 10.2.1.1/24. You also define a
route to the original destination address subnet (1.2.1.0/24) through ethernet2.
Both the Untrust zone and the DMZ zone are in the trust-vr routing domain.
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
NAT-Dst—Many-to-Many Mapping 45
Concepts & Examples ScreenOS Reference Guide
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), oda6
Service: Any
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Destination Translation: (select)
Translate to IP Range: (select), 10.2.1.0 – 10.2.1.254
CLI
1. Interfaces
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
set interface ethernet2 zone dmz
set interface ethernet2 ip 10.2.1.1/24
2. Address
set address dmz oda6 1.2.1.0/24
3. Route
set vrouter trust-vr route 1.2.1.0/24 interface ethernet2
4. Policy
set policy from untrust to dmz any oda6 any nat dst ip 10.2.1.0 10.2.1.254 permit
save
46 NAT-Dst—Many-to-Many Mapping
Chapter 3: Destination Network Address Translation
For HTTP service 2, the security device performs NAT-dst to the same destination IP
address with port mapping (dst port 80 -> 8081). The host can sort HTTP traffic to
the two webservers by the two distinct destination port numbers.
NOTE: ScreenOS does not support port mapping for NAT-dst with address shifting. See
“NAT-Dst—Many-to-Many Mapping” on page 44.
Permit Telnet from any address in the Untrust and Trust zones to 1.2.1.15 in
the DMZ zone
Translate the original destination port number in the TCP segment header from
23 to 2200
You define an address entry “oda7” with IP address 1.2.1.15/32 in the DMZ zone.
You also define a route to the original destination address 1.2.1.15 through
ethernet2. The Trust, Untrust, and DMZ zones are all in the trust-vr routing domain.
WebUI
1. Interfaces
Network > Interfaces > Edit (for ethernet1): Enter the following, then click
Apply:
Network > Interfaces > Edit (for ethernet2): Enter the following, then click
OK:
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), oda7
Service: Telnet
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Destination Translation: (select)
Translate to IP: (select), 10.2.1.15
Map to Port: (select), 2200
Policies > (From: Untrust, To: DMZ) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), oda7
Service: Telnet
Action: Permit
> Advanced: Enter the following, then click Return to set the advanced
options and return to the basic configuration page:
NAT:
Destination Translation: (select)
Translate to IP: (select), 10.2.1.15
Map to Port: (select), 2200
CLI
1. Interfaces
set interface ethernet1 zone trust
set interface ethernet1 ip 10.1.1.1/24
set interface ethernet1 nat
set interface ethernet2 zone dmz
set interface ethernet2 ip 10.2.1.1/24
set interface ethernet3 zone untrust
set interface ethernet3 ip 1.1.1.1/24
2. Address
set address dmz oda7 1.2.1.15/32
3. Route
set vrouter trust-vr route 1.2.1.15/32 interface ethernet2
4. Policies
set policy from trust to dmz any oda7 telnet nat dst ip 10.2.1.15 port 2200 permit
set policy from untrust to dmz any oda7 telnet nat dst ip 10.2.1.15 port 2200
permit
save
NOTE: Policy-based VPNs do not support NAT-dst. You must use a route-based VPN
configuration with NAT-dst.
Because the customers might have the same addresses as those of the servers to
which they want to connect, Device-1 must perform both Source and Destination
Network Address Translation (NAT-Src and NAT-dst). To retain addressing
independence and flexibility, the security devices protecting the server
farms—Device-A and Device-B—perform NAT-dst. The service provider instructs the
customers and the server farm admins to reserve addresses
10.173.10.1–10.173.10.7, 10.173.20.0/24, 10.173.30.0/24, 10.173.40.0/24, and
10.173.50.0/24 for this purpose. These addresses are used as follows:
tunnel.1, 10.173.10.1/30
tunnel.2, 10.173.10.5/30
Each tunnel interface supports the following DIP pools with PAT enabled:
10.173.20.0/24 to 10.173.30.0/24
10.173.40.0/24 to 10.173.50.0/24
NOTE: For information about address shifting when performing NAT-dst, see
“NAT-Dst—Many-to-Many Mapping” on page 44.
NOTE: The configuration for Device-1 is provided first. The VPN configurations for
Device-A and Device-B follow and are included for completeness.
Internal Router
Security Device-1
The security device performs NAT-src and tunnel.2, 10.173.10.5/30
NAT-dst because you—as the Device-1 NAT-src Security Device-B
admin—have no control over the source and • DIP Pool 10.173.10.6 – 10.173.10.6 Untrust 3.3.3.3/24, Trust 10.100.2.1/24
destination addresses. As long as there is a NAT-dst tunnel.1, 10.3.3.1/24
mutually neutral address space to translate • Original Destination 10.173.40.0/24 NAT-dst
addresses to and from, security Device-1 can • Translated Destination 10.173.50.0/24 • Original Destination 10.173.20.0/24
process customers’ service requests. • Translated Destination 10.173.30.0/24
The two security devices protecting the server
farms also perform NAT-dst so that they retain
addressing independence and flexibility.
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
ID: 5
IP Address Range: (select), 10.173.10.2 ~ 10.173.10.2
Port Translation: (select)
In the same subnet as the interface IP or its secondary IPs: (select)
Network > Interfaces > Edit (for tunnel.2) > DIP > New: Enter the following,
then click OK:
ID: 6
IP Address Range: (select), 10.173.10.6 ~ 10.173.10.6
Port Translation: (select)
In the same subnet as the interface IP or its secondary IPs: (select)
3. Addresses
Policy > Policy Elements> Addresses > List > New: Enter the following, then
click OK:
Policy > Policy Elements> Addresses > List > New: Enter the following, then
click OK:
4. VPNs
VPNs > AutoKey IKE > New: Enter the following, then click OK:
NOTE: The outgoing interface does not have to be in the same zone to which the tunnel
interface is bound, although in this case they are in the same zone.
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page:
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
Network > Routing > Destination > trust-vr New: Enter the following, then
click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), serverfarm-A
Service: ANY
Action: Permit
Position at Top: (select)
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Policy configuration page:
NAT:
Source Translation: (select)
(DIP on): 5 (10.173.10.2–10.173.10.2)/X-late
Destination Translation: (select)
Translate to IP Range: (select), 10.173.30.0 – 10.173.30.255
Policies > (From: Trust, To: Untrust) New: Enter the following, then click OK:
Source Address:
Address Book Entry: (select), Any
Destination Address:
Address Book Entry: (select), serverfarm-B
Service: ANY
Action: Permit
Position at Top: (select)
> Advanced: Enter the following advanced settings, then click Return to
return to the basic Policy configuration page:
NAT:
Source Translation: (select)
(DIP on): 6 (10.173.10.6–10.173.10.6)/X-late
Destination Translation: (select)
Translate to IP Range: (select), 10.173.50.0 – 10.173.50.255
6. Policies
set policy top from trust to untrust any serverfarm-A any nat src dip-id 5 dst ip
10.173.30.0 10.173.30.255 permit
set policy top from trust to untrust any serverfarm-B any nat src dip-id 6 dst ip
10.173.50.0 10.173.50.255 permit
save
Network > Interfaces > Edit (for ethernet3): Enter the following, then click
OK:
Network > Interfaces > New Tunnel IF: Enter the following, then click OK:
Policy > Policy Elements> Addresses > List > New: Enter the following, then
click OK:
3. VPN
VPNs > AutoKey IKE > New: Enter the following, then click OK:
> Advanced: Enter the following advanced settings, then click Return to
return to the basic AutoKey IKE configuration page: