Advanced Junos Security
Advanced Junos Security
12.b
Student Guide-Volume 1
Juniper Networks reserves the right to change, modify, transfer, or otherwise revise this publication without notice.
YEAR 2000 NOTICE
Juniper Networks hardware and software products do not suffer from Year 2000 problems and hence are Year 2000 compliant. The Junes operating system has
no known time-related limitations through the year 2038. However, the NTP application is known to have some difficulty in the year 2036.
SOFTWARE LICENSE
The terms and conditions for using Juniper Networks software are described in the software license provided with the software. or to the extent applicable. in an
agreement executed between you and Juniper Networks, or Juniper Networks agent. By using Juniper Networks software, you indicate that you understand and
agree to be bound by its license terms and conditions. Generally speaking, the software license restricts the manner in which you are permitted to use the Juniper
Networks software, may contain prohibitions against certain uses, and may state conditions under which the license is automatically terminated. You should
consult the software license for further details.
Contents
This three-day course, which is designed to build off of the currentJunos Security (JSEC) offering,
delves deeper into Junes security. Through demonstrations and hands-on labs, you will gain
experience in configuring and monitoring the advanced Junos OS security features with advanced
coverage of IPsec deployments, virtualization, AppSecure, advanced Network Address Translation
(NAT) deployments, and Layer 2 security. This course uses Juniper Networks SRX Series Services
Gateways for the hands-on component. This course is based on Junos OS Release 12.1X44-D10.4.
Objectives
After successfully completing this course, you should be able to:
Demonstrate understanding of concepts covered in the prerequisite Junes Security
course.
Describe the various forms of security supported by the Junes OS.
Implement features of the AppSecure suite, including App ID, AppFW, and App Track.
Configure custom application signatures.
Describe Junos security handling at Layer 2 versus Layer 3.
Implement Layer 2 transparent mode security features.
Demonstrate understanding of Logical Systems (LSYS).
Implement address books with dynamic addressing.
Compose security policies utilizing ALGs, custom applications, and dynamic
addressing for various scenarios.
Use Junos debugging tools to analyze traffic flows and identify traffic processing
patterns and problems.
Describe Junes routing instance types used for virtualization.
Implement virtual routing instances.
Describe and configure route sharing between routing instances using logical tunnel
interfaces.
Describe and implement static, source, destination, and dual NAT in complex LAN
environments.
Describe and implement variations of persistent NAT.
Describe and implement Carrier Grade NAT (CGN) solutions for 1Pv6 NAT, such as
NAT64, NAT46, and DS-Lite.
Describe the interaction between NAT and security policy.
Demonstrate understanding of DNS doctoring.
Differentiate and configure standard point-to-point IP Security (IPsec) virtual private
network (VPN) tunnels, hub-and-spoke VPNs, dynamic VPNs, and group VPNs.
Implement IPsec tunnels using virtual routers.
Implement OSPF over IPsec tunnels and utilize generic routing encapsulation (GRE) to
interconnect to legacy firewalls.
Monitor the operations of the various IPsec VPN implementations.
Describe public key cryptography for certificates.
Utilize Junes tools for troubleshooting Junos security implementations.
Perform successful troubleshooting of some common Junos security issues.
Course Level
Advanced Junos Security is an advanced-level course.
Prerequisites
Students should have a strong level of TCP/IP networking and security knowledge. Students should
also attend the Introduction to the Junos Operating System (IJOS), Junos Routing Essentials (JRE),
and Junos Security (JSEC) courses prior to attending this class.
Day1
Chapter 1: Course Introduction
Chapter 2: AppSecure
Implementing AppSecure Lab
Chapter 3: Junos Layer 2 Packet Handling and Security Features
Implementing Layer 2 Security Lab
Chapter 4: Virtualization
Implementing Junos Virtual Routing Lab
Day2
Chapter 5: Advanced NAT Concepts
Advanced NAT Implementations Lab
Chapter 6: IPsec Implementations
Hub-and-Spoke IPsec VPNs Lab
Day3
Chapter 7: Enterprise IPsec Technologies: Group and Dynamic VPNs
Configuring Group VPNs Lab
Chapter 8: IPsec VPN Case Studies and Solutions
Implementing Advanced IPsec VPN Solutions Lab
Chapter 9: Troubleshooting Junos Security
Performing Security Troubleshooting Techniques Lab
Appendix A: SRX Series Hardware and Interfaces
Franklin Gothic Normal text. Most of what you read in the Lab Guide
and Student Guide.
CLI Input Text that you must enter. lab@San_Jose> show route
GUI Input Select File > Save, and type
config. ini in the Filename field.
CLI Undefined Text where the variable's value is Type set policy policy-name.
the user's discretion or text where
ping 10.0.�
the variable's value as shown in
GUI Undefined the lab guide might differ from the Select File > Save, and type
value the user must input filename in the Filename field.
according to the lab topology.
Technical Publications
You can print technical manuals and release notes directly from the Internet in a variety of formats:
Go to http:j/www.juniper.net;techpubs/.
Locate the specific software or hardware release and title you need, and choose the
format in which you want to view or print the document.
Documentation sets and CDs are available through your local Juniper Networks sales office or
account representative.
Objectives
We Will Discuss:
Objectives and course content information;
Additional Juniper Networks, Inc. courses; and
The Juniper Networks Certification Program.
Introductions
Introductions
The slide asks several questions for you to answer during class introductions.
Course Contents
• Contents:
• Chapter 1: Course Introduction
• Chapter 2: AppSecure
• Chapter 3: Junos Layer 2 Packet Handling and Security
Features
• Chapter 4: Virtualization
• Chapter 5: Advanced NAT Concepts
• Chapter 6: IPsec Implementations
• Chapter 7: Enterprise IPsec Technologies: Group and
Dynamic VPNs
• Chapter 8: IPsec VPN Case Studies and Solutions
• Chapter 9: Troubleshooting Junos Security
• Appendix A: SRX Series Hardware and Interfaces
Course Contents
The slide lists the topics we discuss in this course.
Prerequisites
• The prerequisites for this course are the following:
• Basic networking knowledge
• Understanding of the Open Systems Interconnection (OSI)
reference model and the TCP/IP protocol suite
• Experience with the Junos operating system, including
device management, routing, security, and policy through:
• Attending the Juniper Security (JSEC). Introduction to the Junos
Operating System ( IJ OS). and Junos Routing EssentiaIs (JR E)
courses. or
• Working with devices running tl1e J unos OS in a networking and
security environment
Prerequisites
The slide lists the prerequisites for this course.
Course Administration
• The basics:
• Sign-in sheet
• Schedule
• Class times
• Breaks
• Lunch
• Break and restroom facilities
• Fire and safety procedures
• Communications
• Telephones and wireless devices
• Internet access
Education Materials
Additional Resources
• For those who want more:
• Juniper Networks Technical Assistance Center (JTAC)
• http:j /www.juniper.net/supportjrequesting-support.html
• Juniper Networks books
• http:j/www.juniper.net;training/jnbooks/
• Hardware and software technical
documentation
• Online: http:j /www.juniper.net/techpubs/
• Image files for offline viewing:
http:j/www.juniper.net;techpubs/resources/cdrom.html
• Certification resources
• http:j/www.juniper.net;training/certification/resources.htrnl
Additional Resources
The slide provides links to additional resources available to assist you in the installation,
configuration, and operation of Juniper Networks products.
Satisfaction Feedback
Class
Feed b a·:::1-
==
Satisfaction Feedback
Juniper Networks uses an electronic survey system to collect and analyze your comments and
feedback. Depending on the class you are taking, please complete the survey at the end of the class,
or be sure to look for an e-mail about two weeks from class completion that directs you to complete
an online survey form. (Be sure to provide us with your current e-mail address.)
Submitting your feedback entitles you to a certificate of class completion. We thank you in advance
for taking the time to help us improve our educational offerings.
• Formats:
• Classroom-based instructor-led technical courses
• Online instructor-led technical courses
• Hardware installation elearning courses as well as technical
elearning courses
• Courses:
• http:j /www.juniper.neVtraining/technical_education/
Courses
You can access the latest Education Services offerings covering a wide range of platforms at
http://www.juniper.net;training/technical_education/.
- \h/o��ideEducalionServices "'""'Jun,pe,net 1 11
'
' " . ti 1,: ""
, �"' ft.i ,; �·' ,• r,if"';,. �"
Expert E'.evel1(:.ll'fCIEl.
'!..o
,· Cfffflf'IED
,• .� :-: =
.
,S ,, >s- 'i�:f
k • f Y�- ··,;.1. » <
Cert.fication Preparation
Find Us Online
JnetJ http:j/www.juniper.net/jnet
http:j/www.juniper.net/facebook
m;iJ http:j/www.juniper.net/youtube
http:j/www.juniper.net/twitter
Find Us Online
The slide lists some online resources to learn and share information about Juniper Networks.
Questions
Any Questions?
If you have any questions or concerns about the class you are attending, we suggest that you voice
them now so that your instructor can best address your needs during class.
Chapter 2: AppSecure
Advanced Junos Security
Objectives
• After successfully completing this content, you will be
able to:
• Describe the functionality of the AppSecure suite
• Understand how the different AppSecure modules function
• Monitor the operation of the different AppSecure modules
-��W�rl�deEducationServices www1un,pernet 1 2
We Will Discuss:
The functionality of the AppSecure suite;
How the different AppSecure modules function; and
How to monitor the operation of the different AppSecure modules.
Agenda:AppSecure
� AppSecure Overview
• ApplD
• AppTrack
• AppFW
• AppDoS
• APPQoS
AppSecure Overview
The slides lists the topics we will discuss. We discuss the highlighted topic first.
What Is AppSecure?
--
signatures
'' .
Ingress
packet
l l
�-tt'irui:ier?.WorldwideEducallonServices
=� . v
www,,n.pe,net I 7
Licensing
• Licensing is required for the AppSecure suite
• ApplD is included in the standalone IDP license
• IDP usesApplD to identify applications in traffic flows
• OtherAppSecure modules require additional licensing
• AppSecure licensing includes IDP license
• 1-year or 3-year licensing available
• One license is required for each node in a chassis cluster
AppSecure Licensing
To use the features in the AppSecure suite, you must install a valid AppSecure license on the
SRX device. AppSecure licenses for branch and high-end SRX devices are available in 1-year and
3-year increments.
When two SRX devices are combined in a chassis cluster, and AppSecure is needed, you must install
a separate license for each member of the cluster. This method ensures that if the chassis cluster is
split, through intentional or unintentional means, the primary node of the cluster is able to continue
to use the AppSecure features.
To the benefit of intrusion prevention system (IPS) administrators, the AppSecure license comes
bundled with the IDP license. This bundling of features is necessary because the AppDoS module
requires the IDP engine to function correctly. However, it is important to keep in mind that the
standalone IDP license does not come with the AppSecure license.
Agenda:AppSecure
• AppSecure Overview
�App ID
• AppTrack
•AppFW
• AppDoS
• AppQoS
ApplD
The slide highlights the topic we discuss next.
ApplD Defined
• How does ApplD work?
• Provides application visibility regardless of Transport Layer
protocol and associated ports
• Applies protocol decoding to identify nested applications
• Does not inspect entire session
• Is used by other AppSecure modules and IDP to help identify
applications
• Not explicitly applied in tl1e configuration
• Uses application signatures to identify applications
• Identifies applications within the first few packets of the session
• Uses heuristics to improve the accuracy for detection of
encrypted P2P applications
Layer 2: Ethernet
Layer 3: 1Pv4. 1Pv6
Layer 4: TCP, UDP
Layer 7: HTTP
Layer 7 nested application
(e.g., Facebook, Pandora)
ApplD Results
Flow Processing
Ingress
Preprocessing (1 of 4)
• What is preprocessing?
• The serialization, reordering, and reassembly of application
data
• Why is preprocessing necessary?
• Preprocessing must occur before App ID pattern matching
can happen
• Necessary for other AppSecure modules
• Without preprocessing, certain attacks might go
unrecognized
What Is Preprocessing?
Preprocessing is the method of receiving all the fragments of a packet and putting those packet
fragments in the correct order.
Preprocessing (2 of 4)
Reassembled Packet
[ \
GET /index.html HTIP/1.0
Preprocessing (3 of 4)
GJ§ I
1
I
/index.html
\
�P;1.0
1
I
Reassembled Packet
' '
GET /index.html HTTP/1.0
Preprocessing (4 of 4)
.....-------.��
/index.html
Application Signatures
• Two available sources based on contexts, pattern
matching, and direction:
• Predefined database
• Custom user-defined signatures:
• Configured under the [edit services application
identi fie ation] hierarchy level
• Can be defined for applications and nested applications
Application Signatures
Currently the ApplD database contains over 900 applications that you can use to help thwart
attempts to compromise your network. These applications contain application signatures that are
based on contexts, pattern matching, and direction.
You can use application signatures for applications and nested applications. Application signatures
for applications are used to match Layer 7 protocols, such as FTP or HTTP, whereas application
signatures for nested applications match nested applications that reside inside of the Layer 7
protocols. These application signatures are based on pattern matching, such as deterministic finite
automation (DFA) and regular expression (regex) matching. Also, the direction of the matching,
client-to-server, server-to-client, or both, as well as other criteria, is important in the application
signature.
Application signatures come from two sources. You can acquire a database of predefined application
signatures from Juniper Networks, which you download and install through the Junos OS CU.
Alternatively, you can create your own custom application signatures for applications and nested
applications. This flexibility allows you to fine-tune application signatures to fit your business needs
no matter what they might be.
When creating custom application signatures, we recommend that you examine the predefined
application signatures. Viewing the predefined application signatures can give you a baseline on how
to configure your custom application signatures.
To examine further information on application signatures, visit the Juniper Networks Security
Intelligence website at http:j/www.juniper.net/us/en/security/.
Agenda:AppSecure
•AppSecure Overview
•ApplD
�AppTrack
•AppFW
•AppDoS
•AppQoS
AppTrack
The slide highlights the topic we discuss next.
AppTrack Defined
• What is AppTrack?
• An application tracking tool to analyze application usages
• Uses the ApplD module to gain insight into applications
• Provides statistics for traffic flows
• Byte. packet. and duration statistics are collected
• Statistics are reported at session close
• Incomplete or half-open connections are not reported
• Statistics can be collected by a syslog server like STRM
• Uses standard syslog messages-syslog or structured syslog
• Support for user names and roles with UAC enforcement
• Support for App Track in LSYS
• Can be used to create better security policies
Understanding AppTrack
AppTrack is an application tracking tool that provides statistics for analyzing bandwidth usage of your
network. When enabled, AppTrack collects byte, packet, and duration statistics for application flows
in the specified zone. By default, when each session closes, App Track generates a message that
provides the byte and packet counts and duration of the session, and sends it to the host device.
AppTrack is essentially a feature that monitors bandwidth and does not report incomplete, or
half-open, connections.
Although the AppTrack logs can be stored locally on the SRX device (locally logging is only supported
on branch devices), the true power of AppTrack is having a syslog server like the Security Threat
Response Manager (STRM) retrieve the information. Using the STRM to retrieve the data provides
flow-based application visibility that can be helpful in understanding the application traffic in your
network.
AppTrack messages are similar to session logs and use syslog or structured syslog formats. The
message also includes an application field for the session. If AppTrack identifies a custom-defined
application and returns an appropriate name, the custom application name is included in the log
message. If the application identification process fails or has not yet completed when an update
message is triggered, the message specifies none in the application field.
You can configure AppTrack inside of any logical system (LSYS), and the values in the AppTrack
configuration of any LSYS will only apply to that LSYS. When sending syslog information to an
external device, such as the STRM, the LSYS-ID is used to identify one LSYS from another.
Continued on the next page.
Configuring AppTrack
• Enable AppTrack for the security zone
[edit security zones]
user@SRX# set security-zone trust application-tracking
-QIPef.
. "'""""��
........... Worldwide
-�- � Education
Services """)Un;pernet I 26
f:!\. :i·'·,:.r:
,P20i3 Juniper Netwon:,, Inc.All rights ........d"il
� ·* �
,,{1JtJn1Per
"":,!�')"" � � .�
.�-4,;./vLff..i�-
Worldwide EducaUon Services
=
"""' Jun,pe, n ,, I 27
AppTrack Logs (1 of 2)
�
Username
AppTrack Logs (2 of 2)
Agenda:AppSecure
• AppSecure Overview
• ApplD
• AppTrack
7AppFW
• AppDoS
• AppQoS
AppFW
The slide highlights the topic we discuss next.
cD
\:.)-�
Q0
P ass fo r n o w Server replies
<IIE-- _ _ _ _ ,,
0 �--+ttffl�r-0
1 -+
AppFW has a rule to deny this app
2nd p acket
0 During First Path processing. if a security policy permits the packet. send the
packet to the ApplD and AppFW modules
0 If no match is found in ASC. ApplD inspects further packets to discover the
application (or nested application)
During Fast Path processing. ApplD detects the application based on the
application signature. Once the application is identified. AppFW decides what
action to take
Configuring AppFW
• Configuration requirements
• Block the ability to use applications at www.facebook.com
• Allow unhindered access to the rest of the Internet
I
�D �D
I
�D
I
�o I
'.
then {
deny;
I
des tination-address any; Only one AppFW rule set
can be defined per security policy
app lication any;
then {
permit {
application-services {
application-firewall {
rule-set block-FB;
Action:deny
Numbec of sessions matched: 20
ktion of the default rule and the
Default cule:pecmit number of matching sessions
Numbec of sessions matched: 190
Numbec of sessions with appid pending: 5 ,,______, Number of half-completed sessions
ing the ApplD processing
file app-fw {
any any;
match RT_FLOW;
Agenda:AppSecure
II
AppSecure Overview
•ApplD
•AppTrack
•AppFW
�AppDoS
• AppQoS
AppDoS
The slide highlights the topic we discuss next.
Firewall
Policy
Marked
for IDP AppDoS
Packet
Stateful Flow Module Attack
Fragmentation Serialization Protocol IDPActions
Firewall SSL Signature
Processing and TCP Decoding IP Actions
Processing Decryption Matching
Reassembly
AppDoS Defined
���·F.,�.Jli.c,.' JUn1Per
._�......-----��"''
W�rldwideEducationSel'\lices WWWJun;pernet I 46
What Is AppDoS?
The AppDoS module, which is a subset of the IDP module, uses a technology that detects the
presence of malicious traffic that might not be doing anything improper, such as requesting a file to
download or filling up a shopping cart. This seemingly innocent, but malicious, traffic must be
separated from legitimate user traffic. Once AppDoS detects the malicious traffic, it can rate limit the
attacks to the point that they do not become a threat to the target. These detection and rate-limiting
processes are accomplished through a three-phase approach that we discuss in detail later in this
section.
To detect these malicious bot clients, AppDoS monitors the frequency and pattern of application
protocol contexts. AppDoS can also match these contexts in the initial packets, byte streams, and
other unclassified transactions. The following example includes contexts in a HTIP header. The IDP
contexts are marked in bold.
GET /index.html Httpl.l : http-get-url
Host: www.company.com : http-header-host
Accept: image/git, image/x-xbitmap, image/jpeg, image/pjpeg : http-header-accept
Accept-Language: en : http-header-accept-language
Accept-Encoding: gzip, deflate : http-header-content-encoding
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
http-header-user-agent
Additionally, future connections from malicious hosts can be acted upon by IP actions to block or rate
limit those connections.
Configuring AppDoS (1 of 3)
Configuring AppDoS (2 of 3)
• Configure DDoS rulebase and activate the IDP policy
[ edit security]
use r@SRX# sho,., idp
idp-policy AppDoS-Webserver
rulebase-ddos
rule 1 {
match
destination-address User-defined
application-ddos application DDoS profile
Webserver;
active-policy AppDoS-Webserver;
, ,:
ti)2013luniperNetfl!l)rl!$,:lnc .tJ,n��l'eSfJrv;d§;� � �,��u�[l�,[
0 &&'''"'"
�-
,.._�,. »�
Worldwide Education Services
=�
WW\1\1 Jlln1pernet I 49
Configuring AppDoS (3 of 3)
application-ddos Webserver {
!....---- �
service http; �
!
connection-rate-threshold 1000;
context http-get-url {
hit-rate-threshold 60000; Stage 2 criteria
value-hit-rate-threshold 30000;
time-binding-count 10;
time-binding-period 25;
�- .. -:-w,· .
©20i3JunlperN•t-,,orle, Inc Ali rict,O .....,,,..:
" ""
,q; ,,
f. ", Ul:.l.[i)IPer:
• ""�*��.-
. Worldwide Education Services """" Jun;per net I 52
MonitoringAppDoS Operation (2 of 2)
IDP counters:
AppDoS Logs (1 of 3)
• State transition logs
(IDP_APPDDOS_APP_STATE_EVENT)
• Generated when a state change occurs
• Enabled implicitly
Reason for
state change
AppDoS Logs (2 of 3)
• IDP Attack Event Logs (IDP_ATTACK_LOG_EVENT)
• Generated when a specified IDP session action is performed
• ip-actions must be configured
Action performed
AppDoS Logs (3 of 3)
• Attack Event Logs
(IDP_APPDDOS_APP _ATIACK_EVENT)
• Generated when notification log-attacks is enabled
Agenda: AppSecure
•AppSecure Overview
•ApplD
•AppTrack
•AppFW
•AppDoS
�AppQoS
.;.;;t;�:,:,c.;
,-.-,..-,'>
AppQoS
The slide highlights the topic we discuss next
AppQoS Defined
• What is AppQoS?
• Allows for application-based classification
• Rate limiting
• DSCP remarking
• Forwarding class assignment
• Loss priorities
• No bandwidth guarantee
• Works with other Cos functionality
• Can be used to guarantee bandwidth
• Other CoS functionality might take remarking precedence
Configuring AppQoS (1 of 3)
'value in Kbps
application-traffic-control {
rate-limitern ftp-C2S (
!bandwidth-limit 100;
!burst-size-limit 13000;
I� .---,
rate-limiters ftp-S2C(
�
bandwidth-limit 200;
burst-size-l imit 26000;
When defining the burst -size-limit value you must specify a value that is large enough, but
not too large. If you specify a value that is too small there will not be enough of a
burst-size-1 imit for the token bucket algorithm, and traffic might be Jost. If you specify a value
that is too large, the entire transfer might fit into the burst. We recommend that you set a
burst-size-limit that is at least eight times the bandwidth-limit value, but no larger than
6400 times the bandwidth-limit value.
Also, a custom forwarding class is depicted on the slide. This step is optional because you can use
one of the built-in forwarding classes if necessary.
Configuring AppQoS (2 of 3)
then
forwarding-class ftp-AppQoS; All options
a re optiona I
dscp-code-point 000000;
loss-priority high;
rate-limit {
client-to-server- ftp-C2S;
server-t o-client ftp-S2C;
log;
Configuring AppQoS (3 of 3)
• Configure the firewall security policy
[edit security]
user@SRX# show policies
from-zone untrust to-zone trust {
policy All-Permit {
match {
source-address any;
destination-address any;
application any;
Enables the AppQoS rule set for
traffic that matches security policy
then {
permit
application-traffic-control
rule-set ftp-App-QoS;
;Jun1P
-�-- ef
. "'""""'
-
WorldwideEducationServices
-
....... ,un,pe'"ol i 64
pie: 2/0
Ruleset Rule Hits
ftp-App-QoS ftp-rule 100
http-App-QoS http-rule 100
other-App-QoS telnet-rule 300
other-App-QoS smtp-rule 300
Summary
• In this content, we:
• Described the functionality of the AppSecure suite
• Explained how the different AppSecure modules function
• Monitored the operation of the differentAppSecure modules
We Discussed:
The functionality of the AppSecure suite;
How the different AppSecure modules function; and
How to monitor the operation of the different AppSecure modules.
Review Questions
Review Questions
1.
2.
3.
4.
5.
2.
Nested applications are found within applications. Some examples of nested applications are Gmail,
T
Facebook, and YouTube, which are nested inside of HT P.
3.
The application system cache allows tl1e ApplD module to store entries of applications, and nested
applications, that have passed through the SRX device. This process frees up system resources and allows for
quicker application identification times.
4.
To stop users from commenting on YouTube videos, you could configure an AppFW rule that denies access
to the YouTube comments section with the dynamic application junos :YOUTUBE-COMMENT.
5.
You cannot guarantee bandwidth with AppQoS. However, you can use the other built-in CoS functionality in
the Junos OS to guarantee the necessary bandwidth.
Objectives
• After successfully completing this content, you will be
able to:
• Explain transparent mode security operations
• Configure Layer 2 Ethernet switching
• Implement Junos Layer 2 security features
We Will Discuss:
Transparent mode security operations;
Layer 2 Ethernet Switching; and
Junos Layer 2 security features.
Chapter 3-2 • Junos Layer 2 Packet Handling and Security Features www.juniper.net
Advanced Junos Security
www.juniper.net Junos Layer 2 Packet Handling and Security Features • Chapter 3-3
Advanced Junos Security
I· .. .
Transparent mode provides the ability to join internal Layer 2 networks, and to provide security for
these networks. Transparent mode is simple to configure and allows for a quick implementation in
any network, because it does not interrupt any Layer 3 routing. The SRX device will bridge traffic
between interfaces and zones, rather than routing the traffic. This type of deployment is ideal for a
data center environment, where additional security is needed without having to reconfigure the
network.
Chapter 3-4 • Junos Layer 2 Packet Handling and Security Features www.juniper.net
Advanced Junos Security
www.juniper.net Junos Layer 2 Packet Handling and Security Features • Chapter 3-5
Advanced Junos Security
)
ge-0/0/1
unit O {
family (bridgei {
interface-mode access;
vlan-id 20;
Layer 2 Zone: L2
�
10.1.1.4/24 10115/24
VLAN 20 VLAN 20
���J.I!:���llrillhlff•••
�
k' <> '" •
f·, _ �
'"
, '.��n�
•
WorldwideEducationServices ww•
• iunipernet Is
Chapter 3-6 • Junos Layer 2 Packet Handling and Security Features www.juniper.net
Advanced Junos Security
l
[edit]
usec@scx# show security policies from-zone L2 to-zone L2
policy allow {
match {
soucce-addcess any;
destination-addcess any;
£r�<-FT_P >�
application junos-ftp;
l
then { Layer 2 Zone: L2
pecmit;
10114/24 10115/24
VLAN 20 VLAN 20
""',,.,,0�, :''r
"1" � "'r� Ii\4li ,:'.,:* ,,. ,:, r>;,*::·"'"".
S'Ju•lR•r1'let<-;,•oo, lno,J\11 ��1,,.�e.,,ell.• · 11:v'.;tJl,'.�� Worldwide Education Services www ;, ..,., net 1 7
..
""'��.,.>�= -� «� "'
www.juniper.net Junos Layer 2 Packet Handling and Security Features • Chapter 3-7
Advanced Junos Security
10114/24 10115/24
VLAN 20 VLAN 20
Chapter 3-8 • Junos Layer 2 Packet Handling and Security Features www.juniper.net
Advanced Junos Security
www.juniper.net Junos Layer 2 Packet Handling and Security Features • Chapter 3-9
Advanced Junos Security
Chapter 3-10 • Junos Layer 2 Packet Handling and Security Features www.juniper.net
Advanced Junos Security
Layer 2 Ethernet Switching (contd.)
When family ethernet- switching is configured on an interface, the interface will operate in
Layer 2 switching mode. A Layer 2 interface can operate in either of two modes-access mode or
trunk mode.
An interface in access mode connects directly to an end device, such as a user's workstation, a
server, a printer, or an IP phone. The interface itself belongs to a single VLAN. Any frames sent over
the access interface are normal, untagged Ethernet frames.
Trunk mode, on the other hand, combines traffic for multiple VLANs over the same physical
connection. Trunk interfaces are often used to interconnect switches to each other.
A major benefit that Ethernet switching provides to the branch office environment is that it
eliminates any unneeded or extra hardware, such as additional Layer 2 switches on the network, as
long as the SRX Series device has enough available ports to support all users.
Branch SRX devices also support routed VLAN interfaces by specifying an IP address for a VLAN
interface and designating the interface as a Layer 3 interface.
www.juniper.net Junos Layer 2 Packet Handling and Security Features • Chapter 3-11
Advanced Junos Security
[edit]
user@srx# show vlans
Groupl {
vlan-id 20;
Associate the 13-interface-----• !13-interface vlan.O; I
Next, the optional Layer 3 VLAN interface is defined. This interface will be referenced in the VLAN
configuration. The IP address is specified under the VLAN interface, which will provide routing for
Layer 3 traffic. This interface also belongs to a zone, which will allow for zone and security policy
configuration to secure traffic. The SRX device can be managed through the VLAN interface, if the
host-inbound-traffic command is configured.
Continued on the next page.
Chapter 3-12 • Junos Layer 2 Packet Handling and Security Features www.juniper.net
Advanced Junos Security
Ethernet Switching Configuration (contd.)
Lastly, specify the VLAN ID under the [edit vlans] configuration hierarchy. When configuring a
Layer 3 interface, you must also associate the VLAN interface as an 13- interface.
www.juniper.net Junos Layer 2 Packet Handling and Security Features • Chapter 3-13
Advanced Junos Security
[edit]
user@srx# show security policies
from-zone Switch to-zone Switch
policy switch {
match {
source-address any;
destination-address any;
application any;
then {
permit;
Chapter 3-14 • Junos Layer 2 Packet Handling and Security Features www.juniper.net
Advanced Junos Security
www.juniper.net Junos Layer 2 Packet Handling and Security Features • Chapter 3-15
Advanced Junos Security
Summary
• In this content, we:
• Explained transparent mode security operations
• Configured Layer 2 Ethernet switching
• Implemented Ju nos Layer 2 security features
We Discussed:
Transparent mode security operations;
Layer 2 Ethernet switching; and
Junos Layer 2 security features.
Chapter 3-16 • Junos Layer 2 Packet Handling and Security Features www.juniper.net
Advanced Junos Security
Review Questions
Review Questions
1.
2.
3.
www.juniper.net Junos Layer 2 Packet Handling and Security Features • Chapter 3-17
Advanced Junos Security
���?!l7�P�1filltt'�'
�;:,{ �l.:JD!P�
... Worldwide Education Services .,w., 1un,pe,net 1 18
Chapter 3-18 • Ju nos Layer 2 Packet Handling and Security Features www.juniper.net
Advanced Junos Security
www.juniper.net Junos Layer 2 Packet Handling and Security Features • Chapter 3-19
Advanced Junos Security
Chapter 3-20 • Junos Layer 2 Packet Handling and Security Features www.juniper.net
JUntf2v�[
Advanced Junos Security
Chapter 4: Virtualization
Advanced Junos Security
Objectives
We Will Discuss:
The benefits of virtualization with Junos security devices;
Configuring and sharing routes between routing instances; and
Filter-based forwarding (FBF).
Agenda: VlrtuaUzation
�Virtualization Overview
• Routing Instances
• Logical Systems
• Filter-Based Forwarding
Virtualization Overview
The slides lists the topics we will discuss. We discuss the highlighted topic first.
• Benefits of virtualization
• Lowers cost
• Lowers the requirement of physica I devices
• Groups applications for lower administrative overhead
• Common management interface
• Offers a more green solution
• Faster deployment
• Security can be virtualized too
• Consolidate firewalls using virtual routers
Why Virtualize?
In the early days of network computing, networks were mostly centralized. Those administrators
were ahead of their time. After an era of distributed computing, network administrators and
designers are once again centralizing resources, often in a data center type of environment. Along
with this trend has come the realization of virtualization. Beginning with server virtualization,
network devices are now becoming virtualized as well. Virtualization has many benefits, most of
which are associated with lower costs. Virtualization allows for a lower number of physical devices.
Fewer devices result in lower operational and administrative overhead. These multiple devices can
also often be administered with a single common management interface. Fewer devices require
deployment, making overall deployment faster and lowering the energy requirements.
Multi-Tenant Design
------0
Custl.
£ia
a:a
.-
,,a,1 � ,,,U_N_T_R_U_S_T....
'.ij
ZONE
Cust211············ it·�C........
:
inet.0
/
vlan3
Cust3 ·
�
·
Multi-Tenant Design
The slide shows an example of connecting multiple customers or remote office locations to a single
SRX Series chassis cluster through an aggregation switch. This design is often known as a
multi-tenant design, meaning multiple tenants (or customers) reside on the SRX device.
Note that the different customers are separated using virtual LANs (VLANs) in this example and that
each spoke site connects to its own virtual router (VR) by using routing instances. Also, note that for
scalability, we recommend that the multiple customers share the same zone and default routing
instance to connect to the Internet.
In this chapter, we discuss how to implement components that contribute to this multi-tenant design.
Agenda: Virtualization
• Virtualization Overview
7 Routing Instances
• Logical Systems
• Filter-Based Forwarding
Routing Instances
The slide highlights the topic we discuss next.
I nterface
�5 :t®J{& ��,;
1)2013Junlp&rNe1wori�, ln°'Allrlghbm•111•d �ur.iim�wo�dwide Education Services WWW jun,p" net I 9
'> "=�"""'- -
[edit]
user@srx# conunit check
[edit security zones security-zone untrust]
'interfaces ge-0/0/2.0'
Interface ge-0/0/2.0 must be in the same routing instance as other interfaces in
the zone
error: configuration check-out failed
_juniper_private2_ forwarding
_juniper_private2_.inet.O 0/0/1
- master.anon- forwarding
master forwarding
inet.O 7/0/0
Configuration Example
• Routing instance configuration example:
[edit r:outing-instances lnew-instancelJ
user:@sr:x# show
---i
Routing instance name is user-defined
pr:otocols {
ospf {
ar:ea 0.0.0.0 {
inter:face ge-0/0/0.0;
inter:face ge-0/0/1.0;
inter:face loO.1;
RIB Groups
G•Routes•B
Some deployment scenarios require networking devices, such as a router, to know multiple routing
topologies. Example scenarios include VPNs, multicast networks, and FBF. In a VPN network,
multiple customer network topologies use a common infrastructure. These separate topologies
require the networking devices to maintain multiple different routing tables. In a multicast
environment, you might want unicast and multicast traffic to use different network links. These
separate forwarding topologies require separate routing tables. Finally, the Junos OS feature of FBF
allows for the forwarding of packets based on criteria other than the destination IP address within
the packet. The forwarding address might be different than the current active route in the routing
table. Again, a separate routing table is necessary.
Other options for sharing routes between routing instances exist. You can use the
instance- import, instance- export and auto-export configuration options to share
routes between multiple routing instances and eliminate the configuration of separate routing table
(or RIB) groups for each instance.
We can verify that the OSPF routes were shared (from inet.O to test.inet.O) using the show route
table commands as shown in the following sample output:
user@srx> show route table inet.O protocol ospf
Physical Connection
>� � K ��sC 7f'"'11,1�
'! . ; (JU@I� �orldwideEducationServices ww.. 1un;p,rnel I 18
1' "' .,;.Jt;,S;;L,
One more method exists to route between routing instances, using the next-table option of a
static route.This option has specific unidirectional applications and is not a generally preferred
method due to the possibility of looping traffic between routing instances on Junos stateless devices.
However, this method becomes more useful with Junos security devices because bidirectional flow is
enabled once the session is established.Recall that routing (and its reverse path) is set up in the
first packet path flow.
www.juniper.
net Virtualization • Chapter 4-19
Advanced Junos Security
Agenda: Virtualization
• Virtualization Overview
• Routing Instances
7 Logical Systems
• Filter-Based Forwarding
Logical Systems
The slide highlights the topic we discuss next.
T.iniPer
-�-�·""-'
""'"""" WorlclwideEduca1ionServ
-
ices WWWJun•pe<net I 21
Administrative Roles (1 of 2)
G · Ul!JfJ�
-r""!c'1"�{'''.. "'<
!/OtldwideEducationServicu ..,,._., 1uniper n,t 1 �4
""= ==�"'
user master-admin
uid 2000;
class super-user;
authentication {
encrypted-password "$1$aWkXLed2$1PaJnA3iUlUKdXsnacQlLO"; ## SECRET-DATA
Administrative Roles (2 of 2)
login: LSYSl
Password:
Security Profiles (1 of 2)
flow-session
maximum 30000;
reserved 2000;
cpu
reserved 5;
}
flow-gate {
maximum 1000;
reserved 50;
Security Profiles (2 of 2)
• lntra-LSYS communication
• Communication is contained within local user LSYS
• External device. or looped cable. can be used to route traffic
between LSYSs
Root-LSYS
User-LSYS-2
• lnter-LSYS communication
• Requires the use of an interconnect LSYS
• VPLS is used to switch inter-LSYS traffic
• Interconnect LSYS uses one LSYS license
• Uses lt-0/0/0 interface to connect the root and user LSYSs
to the interconnect LSYS
• Use encapsulation ethernet on the lt-0/0/0 units for the
master and user LSYSs configuration
• Use encapsulation ethernet-vpls on the lt-0/0/0 units
used in the interconnect LSYS
• Only one lt-0/0/0 unit can be used per master or user LSYS
• Multiple lt-0/0/0 units can be used in the interconnectLSYS
-'--·JLJt1iPer
... -
,crd"�:ai,, "
WorldwldeEducationServices "'""Jun,pernet I 32
I nterco nnect-L.SYS
lt-0/0/02 lt-0/0/0.4
User-L.SYS-1 User-L.SYS-2
� �ur:1 ·-1:--
er:'j Worldwide Education Services ..,.,.., Jun,p" aet 1 33
'- ·, -� ,h��
logical-systems {
User-LSYS-1 {
interfaces
ge-0/0/0
unit O
family inet
address 192.168.0.1/24;
lt-0/0/0 {
unit 3
encapsulation ethernet;
peer-unit 2;
family inet {
Continued on the next page.
}
ge-0/0/1
unit O
family inet
address 192.168.1.1/24;
routing-instances
VR-1 {
instance-type virtual-router;
interface ge-0/0/0.0;
routing-options {
static {
route 0.0.0.0/0 next-table inet.O;
}
VR-2 {
instance-type virtual-router;
interface ge-0/0/1.0;
routing-options {
static {
route 0.0.0.0/0 next-table inet.O;
routing-options
static {
route 0.0.0.0/0 next-hop 10.0.1.1;
route 192.168.5.0/24 next-hop 10.0.1.3;
rib-groups {
VR-1-routes
import-rib [ VR-1.inet.0 inet.O];
VR-2-routes {
import-rib [ VR-2.inet.0 inet.0];
security
policies
default-policy
permit-all;
zones
security-zone User-LSYS-1 {
ge-0/0/2
unit O
family inet
address 192.168.5.1/24;
routing-options
static {
route 0.0.0.0/0 next-hop 10.0.1.1;
route 192.168.0.0/24 next-hop 10.0.1.2;
route 192.168.1.0/24 next-hop 10.0.1.2;
security
policies
zones
interconnect-LSYS
interfaces {
lt-0/0/0 {
unit O
encapsulation ethernet-vpls;
peer-unit l;
}
unit 2 {
encapsulation ethernet-vpls;
peer-unit 3;
}
unit 4 {
encapsulation ethernet-vpls;
peer-unit 5;
routing-instances
vr-ic {
instance-type vpls;
interface lt-0/0/0.0;
Continued on the next page.
interfaces
lt-0/0/0
unit 1
encapsulation ethernet;
peer-unit O;
family inet {
address 10.0.1.1/24;
}
ge-0/0/6
description "To the Internet";
unit O {
family inet
address 10.252.4.1/30;
security
policies
zones
routing-instances
VR-root {
instance-type virtual-router;
interface ge-0/0/6.0;
interface lt-0/0/0.1;
routing-options {
static (
route 0.0.0.0/0 next-hop 10.252.4.254;
route 192.168.0.0/24 next-hop 10.0.1.2;
route 192.168.1.0/24 next-hop 10.0.1.2;
route 192.168.5.0/24 next-hop 10.0.1.3;
Agenda: Virtualization
II
Virtualization Overview
• Routing Instances
• Logical Systems
7 Filter-Based Forwarding
��1i1riipe0
�=�-- - WorldwideEducationServices <,WWJUn>pe,net I 39
Filter-Based Forwarding
The slide highlights the topic we discuss next.
172.25.0.0/24
172.25.1.0/24
Traditional Routing
In a typical routing scenario, a routing device looks only at the incoming packet's destination address
when determining the forwarding next hop. Although this approach works, it does not provide much
flexibility. We discuss FBF on the next slide, which provides you with flexibility for determining distinct
forwarding paths for traffic based on a wide variety of options.
,------
L 1!._2:..25..:_ 03/'!;:
· � ....., .__...
L�!�:��:�..���.i • · · • · ·111>
172.19.25.1/32
\ ISPB )
Must be in
same zonel
Filter-Based Forwarding
FBF allows a routing device to make forwarding decisions based on criteria other than the
destination prefix. A match filter is created and applied to the interface on which traffic is received.
The Junos OS uses the filter to classify packets and determine their forwarding path within the router.
FBF is supported for 1Pv4 and 1Pv6.
As shown on the slide, you can use FBF for service-provider selection when you have Internet
connectivity provided by different Internet service providers (ISPs).
Note that unless you have enabled selective packe t b - ased filtering, the rules of first path session
creation apply. In the example on the slide, no guarantee exists that return traffic will use the same
interface as the initiating traffic. If the return traffic were to arrive at an interface assigned to a
separate security zone, the Junos OS would drop the traffic due to a zone mismatch. To avoid this
scenario, we recommend that both egress interfaces reside in the same security zone.
We illustrate the configuration and verification steps for FBF over the next several slides.
[edit]
user@srx# show firewall
family inet {
filter fiiter-name
term term-name The filter matches on desired criteria
I -----!
from { with an action of routing-instance
ti......-
"'@""a"'t'"'c'"'b,..--c'""o""n'""d"".1....,,. o--,
ns instance-name.
then {
routing-instance gnstance-namel
I
[edit]
user@srx# show routing-instances
instance-name { The instance type used for filter-based
-----1
instance-type ,orwardingj forwardingis always forwarding.
routing-options {
static {
route 0.0.0.0/0 next-hop ip-address;
As illustrated on the slide, you create routing instances that specify the routing tables and the
destination to which a packet is forwarded at the [edit routing-instances] hierarchy level.
The instance type used for FBF is forwarding. The number of routing instances you define
depends on the number of next-hop forwarding paths you will use.
rib-groups {
group-name
import-rib [ inet.O instance-name.inet.O ];
ge·0/0/1
The configuration example on the slide installs interface routes into the default routing instance
inet. o. as well as the instance-name. inet. o routing tables. You must specify inet. o as
one of the routing instances into which the interface routes are imported. If inet. o is not specified,
interface routes are not imported into the default routing instance.
Network A
1------
L 1_?:2_:._ �:°�l_:4�
2
"""' ........ R1 g,e-01012 __,__,..-:-;:;�
.1 2 0. 17 .2 0.0/30
----;� .1
NetworkB ge-0/0/1 0 ·
t -�! �--��:�;���-)
-,....172.20 1 0V3o
ge-o. · �-...,..,..;,..;.,
V0/3 -�
•• ••••...
then {
r:outing-instance ISP-A; ## 'ISP-A' is not defined
ter:m match-subnet-B
fr:om {
sour:ce-addr:ess Routing instances will be defined
172.25.1.0/24; in a subsequent step.
then {
r:outing-instance ISP-B; ## 'ISP-B' is not defined
.
'1)2013JuniperNe1P.orl��,ne.Allrtghtsreserved
-�s<·
.i,�4[�
' 1
11LJn1Per
""
WorfdwideEduca1ionServices
=; ,, ��=..i�c...<-�
l'
...Wl"']Un1pernet I 47
rib-groups {
my-rib-group
import-rib inet.O ISP-A.inet.O ISP-B.inet.O ];
ISP-A.inet.O
inet. 0 ge·0/0/1
ISP-B.inet.O
B:JEJ � ��2��0�
host-A
0.100
host-B
,,l.i"lEJ r1+i2s:1.ai�·i
-- ............ "........... t
1100
zrn-�:s:s'"Y"" � =
�#-JJUf;llPer:L Woiiclwide Education Services ""'"' Jun,pe, net I SJ
�'"'"-"""" = - ··-"-
'i:)20i3JunlporNel"orl", lncc.M�pt;1-&,eived, ')
t_112.25:1o;24 �
Rl drops all traffic en1eringthe ge-0/0/1.0 interface not sourced from the 172.25 .0 .0/24 and
17 2.25.1.0/24 subnets. You can include an additional term to accept all other traffic.
term else-accept {
then {
accept i
}
then {
routing-instance ISP-A;
term match-subnet-B
from {
source-address
172.25.1.0/24;
}
then {
routing-instance ISP-B;
term else-accept
then {
accept;
The else-accept term accepts all traffic that does not match the preceding terms. The system
forwards the traffic that matches the else-accept term out the appropriate egress interface
using the normal route lookup process based on the destination prefix. We recommend you use a
similar approach when implementing FBF so traffic is not dropped unintentionally.
Summary
• In th is content, we:
• Described virtualization provided by Junos security devices
• Configured routing instances and shared routes between
instances
• Configured logical systems and discussed how to route
between logical systems
• Implemented FBF
We Discussed:
The benefits of virtualization with Junos security devices;
Configuring and sharing routes between routing instances;
Configuring and routing between logical systems; and
FBF.
Review Questions
.::r-·,�,,· "·- ..
©20i3JuniperNel"1orl:,, lncc.,,ll.nJlllls,.sel\led. ' r,;.�:JLJlllPe(i. Worldwide Educa1ionServices """' Jun,pe, net 1 ,7
• �... .._ ·""���= �
Review Questions
1.
2.
3.
4.
Objectives
• After successfully completing this content, you will be
able to:
• Describe the separation and interaction between NAT rules
and security policies
• Implement persistent NAT
• Demonstrate DNS doctoring
• Explain 1Pv6 NAT operations
• Describe how to use and configure NAT in situations beyond
simple edge-device implementations
E
'"""'
Networle} lnc"A �
· ltrlztrt,: �·Md �1 '� �rldwide Education Ser.ices w\<\•w Juniper net 1 2
MEL •
We Will Discuss:
The separation and interaction between Network Address Translation (NAT) and security
policy;
Persistent NAT;
Domain Name System (DNS) doctoring;
IP version 6 (1Pv6) NAT operations; and
Advanced NAT implementations.
�Operational Review
• NAT: Beyond Layer 3 and Layer 4 Headers
• DNS Doctoring
• 1Pv6 NAT
• Advanced NAT Scenarios
Operational Review
The slide lists the topics we will discuss. We discuss the highlighted topic first.
Fi rst-pacl«lt path
Static
NAT
Dest
NAT
Security R::�: Source Services
Policy
NAT
NAT ALGs
=��
Table
NAT
Header
Services
ALGs
1-----------.
Rewrites
• NAT rules:
•Are configured under [edit security nat] hierarchy
• Use prefix references for source and destination matching
•Allow you the option of using application (port) information
• Security policies:
•Are configured under [edit security policies J
hierarchy
• Use predefined security objects for source and destination
matching
• Require a complete set of match criteria
• Source object. destination object. and application object
NAT Rules
All NAT configuration occurs in the [edit security natl hierarchy. Three types of NAT
configuration are available-source, destination, and static.
Within each NAT type hierarchy, a rule-set is used to identify the direction of a potential initiating flow
and the NAT rules that will be evaluated.
For static and destination NAT, which are evaluated before the route lookup (and therefore
before the egress interface is known), the direction is established using only a from statement.
One notable difference between the configuration of match criteria for NAT rules and match criteria
for security policies, is that NAT rules use IP prefixes to identify matching traffic and allow you to pick
and choose which match criteria to use.
Security Policies
All security policy configuration occurs in the [edit security policies] hierarchy.
Security contexts are used to identify the direction of a potential initiating flow and the security
policies that will be evaluated. All security contexts require a from- zone and a to- zone.
Security policies use predefined security objects for all match conditions and always require all three
match criteria-a source object, a destination object, and an application object. A predefined any
option exists that can be used for any of the required matches.
Types of NAT
Remember that the terms destination NAT and source NAT identify which IP address (and optionally,
port information) will be changed in Layer 3 (and Layer 4) headers of session-initiating flows as they
transit the security device.
Destination NAT changes the contents of the destination IP address field, while source NAT changes
the contents of the source IP address field. Put another way, if the Layer 3 header of a particular
packet, as it arrived at the network device performing NAT, is compared to the Layer 3 header of the
same packet as it leaves the device, destination NAT will result in a new IP address in the destination
IP address field of the Layer 3 header whereas source NAT will result in a new IP address in the
source IP address field.
The most common implementations use destination NAT for access to internal resources from the
public side of an edge device, and source NAT when internal hosts communicate with resources
beyond the edge device. However, this usage is not always the case. For example, source NAT could
be utilized to initiate a session from the public side of an edge device to an internal resource, to
eliminate the need to equip the internal resource with a default gateway or other routing information.
By changing the source IP address field as the packet traverses the edge device to an IP address on
the same network as the internal resource, the ability to establish two-way communications between
end-hosts will be accomplished without creating additional security exposures.
It is possible to perform both destination NAT and source NAT on the same session.
Continued on the next page.
�
!Post-NAT header ! �
1.1.1.1 1617061 DH 10.0.0.3 n 80
Does the Graphic Indicate Which Zones Are Involved in the Initiating Flow?
No!
Common implementations have created an assumed correlation between the type of NAT and the
direction of the initiating flow. The output shown does not indicate which zones are involved, nor
whether the interfaces involved are internal or external facing.
Can This Type of NAT Only be Performed from a Public Network Towards a Private
Network?
No!
One of the most common misconceptions about NAT, is that the type of NAT used is dependent on
whether the traffic is initiated from an inside-facing interface toward an outside-facing interface, or
from an outside-facing interface toward an inside-facing interface. While equipment from some
vendors might be limited in its implementations, the Junos implementation of NAT allows for
complete flexibility.
• Operational Review
�NAT: Beyond Layer 3 and Layer 4 Headers
• DNS Doctoring
• 1Pv6 NAT
• Advanced NAT Scenarios
Address Persistency
1.1.1.1 I --
. -:::: . 2�2.2.2
rl
cEJ -1
"
Se..:....-
rve-r
!;]EJ··········· -·�--�-
·-·· """" ····················)\
�
�-�.__,______,
Initiating Host I
NAT Pool
15.0.0.1 �15.0.0.10
Flowl
Flow2
Address Persistency
Some applications expect related sessions to originate from the same source IP address. You can
enable the persistent address feature on a device to ensure that the device assigns the same IP
address from a source pool to a host for multiple concurrent sessions. The slide shows an example
of an initiating host that receives the same egress IP address from the NAT pool for each flow toward
an external server. At the [edit security nat source] hierarchy level, you can configure the
set source address-persistent command.
Persistent NAT
Persistent NAT
Persistent NAT, formerly identified as cone NAT by the Internet Engineering Task Force (IETF), is a
mechanism that further facilitates an end-host's ability to function from behind a security device (or
even several security devices) that perform NAT.
Persistent NAT should not be confused with address persistency, which allows session establishment
only in the direction of the source NAT initiating flow. Address persistency ensures that any
concurrent sessions from the same pre-NAT IP use the same post-NAT IP address supplied from the
source NAT pools configured on the device.
Whereas persistent NAT also ensures concurrent sessions use the same post-NAT IP address for a
source behind a NAT device, the primary difference is that persistent NAT also allows outside devices
to initiate traffic flows toward the device behind the network translator, using its reflexive transport
address.
Persistent NAT applies to address mappings on an external NAT device, and is configured for a
specific source NAT pool or egress interface. Also, persistent NAT supports Session Traversal Utilities
for NAT (STUN) client;server applications. In some cases, even new devices that have not
communicated with a translated host, might be able to initiate a session with the translated host.
The behavior depends on the persistent NAT configuration. The flexibility of persistent NAT is useful
for voice-over-IP (VoIP) applications, peer-to-peer applications, and others. The window opened by
persistent NAT to the outside world can be limited with a configurable timer.
Continued on the next page.
• any-remote-host
• Either side can initiate a session
• The source address of Host A is translated to the reflexive
address when Host A initiates a session to Server B
• Server B or any external host can initiate a session to the
reflexive address of Host A
4r,1��1-· · · · · · · · · }
1
Reflexive Address
15.0.0.1 Hoste
Any-Remote-Host NAT
You can configure three persistent NAT types on the SRX device. With all three types, all requests
from a specific internal IP address and port are mapped to the same external address. Differences
exist between the three types.
With the type any-remote-host, any user external to the SRX device can reach the internal host
by sending the packet to the external address used for translation.
• target-host
• An external host can initiate a session to an internal host by
sending the packet to the reflexive address if the internal
host has previously sent a packet to the external host's IP
address
ealfJ···········•j j · Tc,·j···· ·········-��2222 j
'-"�.:�,:�
! 1.1.1.1 I
�� 15.0.0.1 CJ -
Hoste
1. HostAsends a packet to Server B.
2. After Server B has received a packet from Host A. then it can initiate a session to
HostA"s reflexive address .
Target-Host NAT
With the type target-host, any user external to the SRX device can reach the internal host by
sending the packet to the external address used for translation, but only if the internal host has
previously sent a packet to the external user's IP address.
t/
��::�:: E
�� E
Q - !
�bmj .
,;==� � @ Serve�· B
HostA
ReflexiveAddress: Port
15.0.0.1:3604
�El .,
Hoste
1. HostA sends a packet to Server B.
2. After Server B has received a packet from Host A. then it can initiate a session to
HostA"s reflexive address. but must also include the reflexive address source port number.
Target-Host-Port
With the type target-host-port, any user external to the SRX device can reach the internal host
by sending the packet to the external address used for translation, but only if the internal host has
previously sent a packet to the external user's IP address and port.
• STUN protocol
• Allows the originating host to learn its own reflexive
transport address
• Common requirement with VoIP and peer-to-peer applications
• Client/server protocol
• Provided by application
• Juniper Networks does not provide STUN client or server
• Server usually resides in the public domain
• Client role
• Discover whether it is behind a NAT security device
• Determine the type of persistent NAT binding used
• Learn its reflexive transport address ( closest to the STUN server)
rule-set Support-Internal-VoIP
from zone Trust;
to zone Un'i:.rust;
rule Al.low-VoIP-NAT
match {
source-address 172.20.96.0/20;
destination-address 172.20.192.0/19;
then {
source-nat
pool {
From-Internal -VoIP-Cl.ients;
persistent-nat {
perm.it target-host;
inactivity-timeout 180;
rule-set Support-Interndi-varP
from zone Trust;
to zone Untrust;
rule Al.iow-VoIP-NAT
match {
source-address 172.20.96.0/20;
destination -address 172.20.192.0/19;
then {
source-nat
interface
persistent-nat
perm.it any-remote-host;
World�deEducationServices w"w)onipernet 1 23
-·��� �·
NATandlPsec
• NAT can interfere with IPsec tunnels
• IPsec traffic is impacted when ESP or AH traffic transits a
NAT device
• IPsec traffic is subject to transiting intermediate NAT devices
outside the control of the local administrator
NAT and AH
IPsec setup begins with a new
flow that uses UDP port 500 for
Ori!1inal IP packet IKE negotiations
0
NAT and AH
The slide shows how NAT interferes with the AH pa cket header during Internet Key Excha nge (IKE) Phase
1 negotia tions. AH will not work with NAT and ca nnot be used when a n intermedia te NAT device is
present. AH adds two new headers in the fina l sta ges of IKE Pha se 1 negotia tions. AH does not encrypt
the header, but relies on it for authentica tion of the packet. Intermedia te NAT will cha nge the header,
and changes to the new IP header will cause the AH pa ckets to fail integrity checks.
ESP encapsulated pacl43t(Tunnel Mode) ESP adds two n ew head ers and a
in the final stages of IKE
,---------------.....---------i footer
Phase 1 n e gotiacions.
N ew ESP Original packet ESP ESP
ESP he ad er do es not use po rts
IP h ead er h ead er L3 L4 Payload auth
and canno t not provid e a
m echanism for differentiating
between multiple flows involving
the same source IP and
ESP header and payload: ____. destination IP
Authenticated
NAT Traversal
NAT Traversal
When NAT-Traversal (NAT-T) is enabled, UDP-encapsulated IPsec packets arriving and leaving the
SRX device look like standard UDP packets, and can transit NAT devices. NAT-T encapsulates the ESP
header and payload inside of UDP port 4500. NAT-T for IPsec is enabled by default on Junos security
devices. It can be disabled with the command set security ike gateway gateway-name
no-na t traversal.
NAf.,,J Encapsulation
Standard packet encapsulation is
Original IP packet used during the first steps of IKE
Phase 1 negotiations. I KE
payloads a re used to determine if
Original packet
NAT-T is available and re uired.
L3 L4 Payload
NAT-T Encapsulation
The slide shows how NAT-T encapsulates ESP traffic into UDP. The new UDP header (using UDP port
4500) provides a mechanism for differentiating between multiple flows involving the same source IP
address and destination IP address. The header includes a non-ESP marker, which indicates traffic
that follows is ESP encapsulated traffic and not the standard IKE payload_
O
Operational Review
• NAT: Beyond Layer 3 and Layer 4 Headers
� DNS Doctoring
• 1Pv6 NAT
• Advanced NAT Scenarios
DNS Doctoring
The slide highlights the topic we discuss next.
DNS Doctoring
/� abJ !9.9.9.9!
\
Internet
-------t HostA sends a DNS query
HostA
for www target. host.com.
®
DNS doctoring correctly
translates the DNS
A-Record payload from
172.30.30.10 to
90.90.90.10, allowing
Host A to reach the
Web server.
rule DNS-Server-Rule {
match {
destination-address 172.30.30.15/32;
}
then {
5tatic-nat prefix 90.90. 90.15/32;
• Operational Review
• NAT: Beyond Layer 3 and Layer 4 Headers
• DNS Doctoring
�1Pv6 NAT
• Advanced NAT Scenarios
1Pv6 NAT
The slide highlights the topic we discuss next.
: �:�:: �:{
lowm��"::)
Q \ J-S'--
JE! � -- da:Eo�
0,>.
1Pv4 Network 1Pv6 Network 1Pv4and 1Pv6
Network
NAT64
-� @\__, ,• V
I
Src 2001db8 8/64
<2) ,;,,,,;, · Src 8888/32
I "" "I
1Pv6Host Dst 2001db8.. 1/64 SRX Dst 777.5/29
- 1Pv4Server
. .
1. The 1Pv6 host 2001:dbS::1 sends a packet toward the server with the destination
address 2001:db8::8.
2. The SRX NAT64 configuration translates both the source and destination from the 1Pv6
-
addresses to the 1Pv4 addresses.
3. The 1Pv4 server replies to the 1Pv6 host's reflexive NAT address.
4. The SRX device performs reverse translation back to the originating host.
NAT46
1. The 1Pv4 Host 7. 7. 7.5 sends a packet toward the server with the destination address
7.7.7.6.
2. The SRX NAT64 configllration translates both the source and destination from the 1Pv4
addresses to the I Pv6 addresses.
3. The 1Pv6 server replies to the 1Pv4 host's reflexive NAT address.
4. The SRX device performs reverse translation back to the originating host.
}
rule-set ipv6-dest { rule-set ipv6-source
from zone Trust; from zone Trust;
to zone Untrust; to zone Untrust;
rule ipv6-host-dest rule ipv6-host-source
match { match {
source-address 2001:dbS::10/128; source-address 2001:dbS::10/128;
destination-address 2001:dbB::8/64; destination-addressl 8. 8. 8. 8/32;1
then { then {
destination-nat { source-nat {
pool { pool {
ipv6-dest-pool; ipv6-source-pool;
} \
Because destination NAT is
performed first, the source NAT
match on destination
address uses the same
ipv6-dest·-pool address
Verifying N.AT64
DS·Lite
• OS-Lite overview
• Allows providers to tunnel 1Pv4 traffic over an 1Pv6 network
• Providers can migrate to 1Pv6 without changing end-user software
1Pv4-in-1Pv6 Tunnel
DS-Lite Overview
DS-Lite is a technology that enables Internet service providers to move to an 1Pv6 network while
simultaneously handling 1Pv4 address customers. Service providers can migrate to an 1Pv6 access
network without changing end-user software. The device that accesses the Internet allows 1Pv4
users to continue accessing 1Pv4 Internet content, and enables 1Pv6 users to access 1Pv6 content.
The DS-Lite architecture uses 1Pv6-only links between the provider and the user while maintaining
the 1Pv4 (or dual-stack) hosts in the end-user network.
The slide shows an example of DS-Lite operation. DS-Lite requires a 84 device, also known as a
softwire initiator, and an Address Family Transition Router (AFTR), also known as a softwire
concentrator. When an end-user sends an 1Pv4 packet to an external destination, OS-Lite
encapsulates the 1Pv4 packet in an 1Pv6 packet for transport into the provider network. These
1Pv4-in-1Pv6 tunnels are called softwires. Tunneling 1Pv4 over 1Pv6 is a simple alternative to
translation and can eliminate performance and redundancy concerns. In this example, the customer
premises equipment (CPE) DS-Lite home router functions as the softwire initiator to encapsulate the
1Pv4 packet and transmit it across the 1Pv6 tunnel to the softwire concentrator address 2001:10::5.
The SRX device functions as the softwire concentrator on the local interface used to terminate the
softwire connection. The SRX device then de-encapsulates the 1Pv4-in-1Pv6 packet and also
performs any configured 1Pv4-1Pv4 NAT translations. 1Pv6 packets originated by hosts in the
subscriber's home network are transported natively over the access network.
When the SRX device receives a responding 1Pv4 packet from outside the subscriber network, it
encapsulates the 1Pv4 packet in an 1Pv6 packet and forwards the packet to the end user's CPE
device.
[edit security]
user@srx# show softwires
softwire-name <softwire-na m_e_>.....,.<��
� ..,
softwire-con centrator!2001: 10:: 5!;
softwire-type IPv4-in-IPv6;
• Verify OS-Lite
• The status indicates if a softwire connection is established
user@srx> shOW" security softwires
Softwire Name SC Address Status Number of SI connected
my-'iAo'it:-e 2001:10::5 Active 0
Verify OS-Lite
From operational mode, enter the show security softwires command to verify whether a
softwire connection is established. If a connection is established, the output displays a status of
connected, and the number of system integrator (SI) connected fields will increment.
• Operational Review
• NAT: Beyond Layer 3 and Layer 4 Headers
• DNS Doctoring
• 1Pv6 NAT
�Advanced NAT Scenarios
[edit]
user@srx# rtu1 show security flow session
Session ID: 787, Poli cy- name: self-traffic-policy/1, Timeout: 2,
Valid .-�������-,
In: !172.2 0 .13.49/53060!--> 3.3.3.3/23;tcp, If: vlan.105, Pkts: 6,
Bytes: 336
Out: 3.3.3.3/23 -->!172.20.13.49/53060�tcp, If: .local..0, Pkts:
O, Bytes: 0
Total sessions: 1
• The problem:
• NAT is not occurring for the local host
• How to fix the problem:
•Add a NAT rule set so that local traffic
is evaluated for NAT
[edit security nat de3tination]
user@srx# show
pool Telnet-Server {
addre�s 172.20.17 .101/32;
rule-set To-Server {
from zone Trust;
rule To-Telnet-Server
match {
sour ce-address 172.20.13.0/24;
destination-address 3.3.3.3/32;
destination-port 23;
then {
destination-nat pool Telnet-Server;
The Problem
The slide answers the question from the previous slide, indicating which NAT problem is occurring. In
this case, the local host 172.30.13.49 is not being evaluated for NAT. The local zone was not
included in the rule-set context. Compound matching is allowed within the context, allowing the local
zone to be easily added to the context evaluation. Appropriate security policies allowing local traffic
also are required for a session to be established.
[edit)
user@srx# run show security flow session
Session ID: 2148, Policy name: intrazone-ACME-SV/5, Timeout: 16,
r�)
\"'-
Valid ,------------,
In: !172.20.13.49/59302 -->!3.3. 3.3/23;tcp, If: vlan.205, Pkts: 2, .//
Bytes: )
2!
Out:f172.20.13.101/23 --> 172.20.13.49/59302�tcp, If: vlan.205, . . - :-.t_ .. ,
Advertising
/ L ?}E/.2? _:
:
Pkts: �, ytes: Li
Total sessions: 1
• The problem:
• The target host is responding directly to the
originating host on the same network
• How to fix the problem:
•Add a source NAT rule for the local host to
create a reverse NAT from the destination
host
[edit security nat source r ule-set Switched-Network]
user@srx# show
rule NAT-Return-Flow {
match {
source-address 172.20.13.0/24;
destination-address 0.0.0.0/0;
Zone:
then {
source-nat {
inte rface;
172.20.13.101
�Al/',:)' f":'(�_. � "-'- � _..,, 'V o/Yj;" ,>
©20iSluntper NetworJe, Inc.All rlghbreieMd�,,-.j> :;;� {,< � ·JUFllPer�� Worldwide Education Services WWW :uniper net I 48
� > t�L--.......-...""""Ji.S:t.t," • •=
The Problem
The slide answers the question from the previous slide, indicating which NAT problem is occurring.
The problem occurs when the destination host responds directly to the originating host's IP address.
The destination host uses ARP information rather than a route lookup to reach the originating host.
The originating host is not expecting a response from the post-NAT IP address and will drop the
packet.
• Implementation requirements:
• Requires two nonshared equal-size address blocks
• Can be virtual
• Double NAT
• Can be accomplished using static NAT
• Route information for remote side
• Required security policies
• Single device implementation requires routing instances
Double NAT
1- � s ]£1Jo§1§( JD I 10.2.100.100 I- - - - - - - 1
�---------------------------------- �
···········...
172.31100.100 172.31.100.100
then...-'����������������
tatic-nat prefix 172. 31. 0. 0/16;
then.....1:........ ����
., .....,.. -,,.,..........,.,,,.,......,,..,.......,.......,....,,.,...,,..,,/'
s tatic-nat prefix 172. 31. 0.0/16;
• SoHo implementations:
• A combination of source and
destination NAT is
recommended to allow
oversubscription of public
addresses in both directions
• Static NAT is allowed but
reduces the number of
addresses available for
oversubscription
• Static NAT is not a viable option
when only a single public IP
address is available
SoHo Implementation
A SoHo environment, by definition, has a very limited number of public IP addresses available
sometimes a single public IP address. This limit makes NAT a common element in SoHo
implementations.
A combination of source and destination NAT is recommended to allow oversubscription of public
addresses in both directions. Static NAT can be used in Soho implementations, but it reduces the
number of addresses available for oversubscription because static NAT is a one-to-one mapping and
port translation is not available. Static NAT is not a viable option when only a single public IP address
is available-unless, of course, only a single host exists behind the security device.
Remember to configure proxy ARP for IP addresses that are part of the same subnet as the
public-facing interface, but are not physically assigned to the interface.
ge-0/0/1
unit O
family inet
address 192.168.17.1/24;
fe-0/0/6
unit O
family inet {
filter {
input ISP_A-in;
address 1.1.1.2/24;
}
fe-0/0/7
unit O
family inet {
filter {
input ISP_B-in;
address 2.2.2.9/24;
routing-options
interface-routes
rib-group inet inside;
}
static {
route 0.0.0.0/0 {
next-hop 1.1.1.1;
qualified-next-hop 2.2.2.1 {
preference 10;
rib-groups
inside
import-rib [ inet.0 TRUST-VRF.inet.0 INSIDE.inet.0 ISP B.inet.0];
destination
pool WebServer
address 192.168.17.101/32;
rule-set ISP_A-to-DMZ {
from interface fe-0/0/6.0;
rule ISP_A-http-in {
match {
source-address 0.0.0.0/0;
destination-address 1.1.1.6/32;
destination-port 80;
}
then {
destination-nat pool WebServer;
rule-set ISP_B-to-DMZ {
from interface fe-0/0/7.0;
rule ISP_B-http-in {
match {
source-address 0.0.0.0/0;
destination-address 2.2.2.13/32;
destination-port 80;
}
then {
destination-nat pool WebServer;
proxy-arp
interface fe-0/0/6.0
address {
1.1.1.6/32;
firewall
filter ISP A-in
term 1-(
from {
destination-address
1.1.1.0/24;
}
then {
routing-instance TRUST-VRF;
term 2
then
accept;
}
then {
routing-instance TRUST-VRF;
term 2
then
accept;
routing-instances
TRUST-VRF {
instance-type forwarding;
routing-options {
static {
route 192.168.13.0/24 next-hop 192.168.13.1;
route 192.168.17.0/24 next-hop 192.168.17.1;
ISP_B
instance-type virtual-router;
interface fe-0/0/7.0;
routing-options {
interface-routes {
rib-group inet inside;
}
static {
route 0.0.0.0/0 {
next-hop 2.2.2.1;
qualified-next-hop 1.1.1.1 {
preference 10;
Summary
• In this content, we:
• Described the separation and interaction between NAT rules
and security policies
• Implemented persistent NAT
• Demonstrated DNS doctoring
• Explained 1Pv6 NAT operations
• Described how to use and configure NAT in situations
beyond simple edge-device implementations
We Discussed:
NAT rules and security policies operation and interaction;
Persistent NAT;
DNS doctoring;
1Pv6 NAT operations; and
Advanced NAT implementations.
Review Questions
Review Questions
1.
2.
3.
4.
Objectives
We Will Discuss:
Differentiating and configuring standard point-to-point virtual private network (VPN)
tunnels and hub-an d -spoke VPNs;
Monitoring the operations of the various IP Security (IPsec) VPN implementations; and
Public key cryptography for certificates.
IPsec: Review
• IPsec VPNs consist of two major steps:
1. Tunnel establishment: Establishes a secure tunnel and
parameters that define secure traffic
• Manual: Set all I KE parameters manually
• Dynamic: Uses IKE pre-defined options to define parameters
2. IPsec traffic processing: Protects traffic between the two
tunnel endpoints by using security parameters defined in
the tunnel establishment step
IKE Phases
• IKE tunnel establishment:
• Phase 1:
• Two peers establish a secure. authenticated channel with which to
communicate
• Diffie-Hellman key exchange algorithm is used to generate a
symmetric key common to the communicating gateways
• Main mode: Used when botl1 tunnel peers have static IP addresses
• Aggressive mode: Used when one tunnel peer has a
dynamically assigned IP address
• Phase 2:
• IPsec SAs are negotiated using a Pl1ase 1 secure cl1annel
• Proxy ID is used to identify which SA is referenced for a VPN
• Diffie-Hellman key exchange algorithm can be used (again) to
create PFS
• Phase 2 mode is called quick mode
IKE Phases
IKE tunnel establishment happens in two phases:
Phase 1 establishes a secured channel between gateways for Phase 2 negotiations to
occur. The Diffie-Hellman key exchange algorithm establishes a shared key for
encryption.
Phase 2 establishes the specific VPN connections. Security associations (SAs) are
negotiated on behalf of IPsec to determine the encryption and authentication
algorithms to use when sending user data. The SA is identified by a unique security
parameter index (SPI) that is also negotiated during Phase 2.
A single Phase 1 channel can establish multiple Phase 2 SAs or VPNs. If wanted, a second
Diffie-Hellman exchange can be performed during Phase 2 to negotiate a new tunnel key. Because of
the encryption on this exchange, it is named Perfect Forward Secrecy (PFS).
Traffic Processing (1 of 2)
-li�IiJ
Remote Corporate
fj·:--liil-
Host A , - HostB
0 10.110_5 110.1.210.5 I
0 Prefix
10 1.2105
Interface
ge-0,0,,0
Gateway
11.0.254
0 From zone Private to zone Publ:ic ifSA=10.1.10.5 & DA= 10.1.210.5& Application =any, then use tunnel
0
© XO MO.!X �1.1:)fil()(, HASH
"ffi-• A--·liil---
ge-0/0/1: j ge-0/0/0: ge-0/0/0: I ge-0/0/1:
10.1.10.5 10.1.10.1 1.1.8.1 2.2.8.1 I 10.1.210.1
10_1.210.5
I
01 HASH I = HASH
'10
'(:.}
Prefix
10.1.210 .5
Interface
ge -0,.0/1
Gateway
0 .0.0.0
'--������������-'
@ From zone Public to zone Private if SA =10.1.10.5& DA =10.1210.5&Application = a ll then use tunnel
<!)2013 Juniper Netl'10rl(S, lne.AII 1......,,.4 -�.ruur;i[pff{Worfdwide Educa1ionServlces WWW j,n,pe, net I 9
�:,,_,.;.��"''"'""-
IPsec Processing
�---11:.:·��t�j...----'ll;�i----D
Remote Corporate
Phase 1
Header, SA, DH
...................................� Header, SA, DH
Phase 2
SA, Proxy ID SA, Proxy ID
IPsec Tunnel
....,...,.,.f,WorldwideEducationServices
-IPf
--��-=>< " www)uoope,net J 11
• DPD
• IKE method used to verify the current existence and
availability of IPsec peer devices
• Based on RFC 3706
• Operates over Phase 1 SA
• vpn-moni tor (Juniper proprietary)
• Sends ICMP request through IPsec tunnel to remote
gateway address
• Specify optimized option to consider traffic traversing the
tunnel as a verification that the tunnel is operational
• Operates over Phase 2 SA
DPD
Junos security devices utilize dead-peer-detection (DPD) to verify the current existence and
availability of IPsec peer devices. A device performs this verification by sending encrypted IKE Phase
1 notification payloads (R-U-THERE) to peers and waiting for DPD acknowledgments
(R-U-THERE-ACK). DPD operates on top of the Phase 1 SA and is a standard defined under
RFC 3706. DPD should inter-operate with other vendors. The dead-peer-detection option is
configured under the [edit security ike gateway qa teway-name] hierarchy. There are a
few parameters that can be configured for this command:
always-send: This option tells the device to always send liveliness requests to the
peer, regardless of traffic patterns. The command is disabled by default. If always-send
is absent, then DPD will operate in optimized mode. DPD will be initiated only if there is
an actual attempt to pass traffic through the tunnel and the device has not seen traffic
from the peer for the configured interval.
in terval: The interval at which the liveliness of the peer is questionable. At this point,
the device will start sending DPD requests. The range is 10-60 seconds, and the
default is 10 seconds.
threshold: The maximum number of unsuccessful DPD requests before declaring
the peer dead. The range is 1-5, and the default is 5.
Continued on the next page.
JP- =• •, •Wft&tt·"'"'t?
., tnc.AltriCl>tt ,.,.,..... .1.• �l:Jfi1!!:!�fi;,vvorldwide Education Services """" 1uniper net 1 14
��xt;ad:�
-� WorlclwideEducationServices "''""Jun,pe,net t 15
Local certificate: The local certificate contains the public key and identity
information for the Juniper Networks device. The device owns the associated
private key. This certificate is generated on the Juniper Networks device.
Pending certificate: A pending certificate contains a key pair and identity
information that is generated into a PKCS10 certificate request and manually
sent to a CA. While the device waits for the certificate from the CA, the existing
object (key pair and the certificate request) is tagged as a certificate request or
pending certificate. This process can be automated using Simple Certificate
Enrollment Protocol (SCEP).
CA certificate: When the certificate is issued by the CA and loaded into the Junos
device, the pending certificate is replaced by the newly generated local
certificate. All other certificates loaded into the device are considered CA
certificates.
Certificate revocation lists (CRLs), which are basically lists of certificates that the CA
has revoked and are no longer valid.
Continued on the next page.
IP address
FQDN
User fully qualified domain name (U-FQDN) (e-mail address)
DN
Most VPN administrators use an IP address or FQDN for a VPN gateway identity type
and use an e-mail address (U-FQDN) for a NetScreen-Remote (NSR) Client VPN laptop/
user's identity type. The IKE IDs are added into the SubjectAlternativeName (a V3
extension) field of the certificate. Note that if the IP address of the VPN peer changes,
then a new certificate must be issued with the new IP address, and the old certificate
should be revoked. If the CA does not support the signing of certificates with a
SubjectAlternativeName field, then you must use the DN as the IKE ID on the Junos
device or NSR configurations. You must specify one of the following as the IKE ID in the
certificate request:
IP address
Domain name
E-mail address
Certificate Validation and Revocation Checking:
The Junos OS supports revocation checking by using the CRL lookup method. The CRL
can either be manually loaded in the Junos device, automatically retrieved online from
the CDP, or it can be loaded on demand through Lightweight Directory Access Protocol
(LDAP) or Hypertext Transfer Protocol (HTTP). The Junos OS supports both Distinguished
Encoding Rules (DER) and Privacy-Enhanced Mail (PEM) formats for the CRL.
Certificate Renewal:
The certificate renewal process is similar to the initial certificate enrollment process.
The renewal process includes replacing an old certificate (about to expire) on the VPN
device with a new certificate. Currently the Junos OS supports the manual renewal
process as well as using SCEP to re-enroll the local certificates automatically before
they expire.
Enrollment with CA (1 of 4)
domain-name - FQDN. The FQDN provides the identity of the certificate owner for IKE
negotiations and provides an alternative to the subject name.
ip-address - (Optional) IP address of the device.
email - (Optional) e-mail address of CA administrator.
filename (path I terminal) - (Optional) Location where the certificate request should
be placed, or the login terminal.
You must use one of these: domain-name, ip-address. or e-mail address. This option
defines the IKE ID type and will need to be configured for the IKE gateway profile
described later in this document.
The generated certificate request is stored in a specified file location. A local copy of the certificate
request is saved in the local certificate storage. If the administrator reissues this command, the
certificate request is generated once again. The PKCS10 certificate request is stored in a specified
file and location, from which you can download it and send it to the CA for enrollment. If you have not
specified the file name or location, you can get PKCS10 certificate request details by using the show
security pki certificate-request certificate-id <id-name>command in the
CLI. You can copy the command output and paste it into a Web front-end for the CA server or into an
e-mail.
Enrollment with CA (2 of 4)
Enrollment with CA (3 of 4)
Enrollment with CA (4 of 4)
• Load the new local certificate, CA certificate, and CRL
• Load the certificate into local storage
user@srx> request security pki local-certificate load certificate-id my-cert
filename certnew.cer
Local certificate loaded successfully
SCEP
SCEP is the protocol used to allow a device to generate a certificate request and automatically
submit the request to a CA. You can use this protocol only if both the device and the CA support it.
This protocol makes certificate enrollment and re-enrollment easier than manually collecting a
PKCS10 from the device and then submitting it to a CA, which is a painful process when managing a
large number of devices. By using SCEP, an administrator can also manage the expiration of local
certificates by automatically re-enrolling and retrieving new certificates. Currently only the Microsoft
implementation of SCEP is supported with the Junos OS.
l;1 l
Dige1�----l
® (MD5 orSHA-1) -
�
a
I
£ig;,;:tA + - oige£B'
1. The CA creates digest A by running the certificate through a MD5 or SHA-1 hashing algorithm.
2. The CA encrypts digest A using its private key, which results in digest B (the digital signature).
3. The CA sends the digitally signed certificate to the SRX device that requested it
4. The SRX device creates its own copy of digest A, by applying a MD5 or SHA-1 hashing algorithm to the certificate.
5. The SRX then, decrypts digest Busing the CA'.s public key, which recreates the CA'.s copy of digest A
6. The SRX will then compare the two copies of digest A to verify they are the same. If they match, the SRX knows that the
certificate has not been tampered with.
• IKE configuration
• Similar to using preshared key
• Different authentication method
• No changes to IKE Phase 2
• Defining authentication method
• Configure the IKE (Phase 1) proposals to use RSA encryption
• Configure an IKE policy specifying the RSA proposal, local
certificate, CA certificate, and x.509 type peer certificate
• Configure the IKE gateway settings specifying the IKE policy
and a dynamic peer identified by the IKE ID type
• IP address = CU option inet x. x. x. x
• FQDN/U-FQDN = CU option hostname
• ASN1-DN (PKI certificates) = CU option distinguished-name
• Email address = CU option user-at-hostname
Authentication Method
Defining the authentication method consists of the following steps:
Configure the IKE (Phase 1) proposals to use RSA encryption.
Configure an IKE policy specifying the RSA proposal, local certificate, CA certificate, and
x.509 type peer certificate.
Configure the IKE gateway settings specifying the IKE policy, and a dynamic peer which
is identified by the hostname, IP address, distinguished name or e-mail address. The
peer ID configuration depends on how the certificate request was generated earlier. In
this example, assume the remote SRX device used email user@juniper-net
during the certificate request, which means that the IKE ID type for the peer is
user-at-hostname.
::: ::::;;;::;;;���:�;_;e,ao,lr,,-,,,a,r
,res;I
dh-group group2;
authentication-algorith m shal;
}
IKE proposal
encryption-algori thm 3des-cbc;
policy ike-policyl {
mode main;
proposals rsa-propl;
certificate {
!local-certificate my-cert; I I KE po I"ICY
trusted-ca use-all;
peer-certificate-type x509-signature;
gateway ike-gate {
1.ke-policy ike-policyl;
!dynamic user-at-hostname "[email protected]";l
external-interface ge-0/0/3.0;
IKE gateway
�
Configure an IKE gateway. A remote !KE peer can be identified by IP address, domain
name or e-mail address. In this example, we are identifying the peer by e-mail address.
Therefore the gateway IKE ID should be the remote peer's e-mail address that was used
to request the certificate. You must specify the correct external interface to properly
identify the !KE gateway during Phase 1 setup.
0- "' "*-sru,..s>Wliv�-u"'1@'
�201'$i!unip•(N• !Orl",lll�Alt!'l,lht.11'••ri"1fi ;' gt.Jli'lffl'li!!arldwideEilucationServices -•,jun,pernet I 33
,e �- -· �� �
Hub-and-Spoke VPNs
This slide highlights the topic we discuss next.
4 ':jt:Jn'' er WorldwideEducationServices
�����-?'j
�-��-= - h
www1un;pernet 1 34
Hub-and-Spoke VPNs
There are many ways to implement a hub-and-spoke VPN topology using the concepts of route-based
VPNs. One way is to configure a separate secure tunnel (stO) logical unit for every spoke site.
However, if a device has too many peers, the number of required interfaces becomes a concern from
a scaling and management perspective. To allow for easier management and scalability, the Junos
OS supports multipoint secure tunnel interfaces with the next-hop tunnel binding {NHTB) feature.
This ability allows a device to bind multiple IPsec SAs to a single secure tunnel interface.
����li.��:!l!;J';':nufi11Per: 'WorldwideEduca1ionServlces
.... ;£.::;�-
"""Jun,p .. net I 35
ci{ �1 .:.;.:.
stO.O I I
<Q}
.El.;;,,,.·.
� sto.o
· 10.11.1 ! Corporate ..f?� 10.1.1.3 I .·
c(j . ..
6 .. .-.;. ···· ·
a VPN-2 . Branch B
:.1�nternev............... 1 -+ 1030100;24
"" 10.10.10.1.0 - � v,o I
ci • �_;> st0.0 10.3'.H0.10 •
.,... 10.1.1.4 " . . .. 11····
Trust l Untrust
-- "-E]··.
- ' - BranchC .. · . L:.:-J
. ·
.
ll!lffl::2EJ <"'
· ...
}10.40.10.0;24
·-·
untrust ' Trust
Route-to-Tunnel Mapping
To sort traffic among multiple IPsec VPN tunnels bound to the same sto interface, the Junos OS
maps the next-hop gateway IP address specified in the route to a particular IPsec tunnel name. The
mapping of entries in the route table to entries in the NHTB table is displayed on the slide. On the
slide, the local device routes traffic sent from 10.10.10.10 to 10.30.10.10 through the sto. o
interface and through VPN-2.
In the table entries displayed on the slide, the IP address for the next-hop in the route table (which is
also the same next-hop IP in the NHTB table) is the sto interface IP of the remote peer site. This
next-hop links the route, and consequently the stO interface specified in the route, to a particular
IPsec VPN tunnel.
The hub device uses the IP address of the remote peer's sto interface as the next hop. The route
can be entered manually (static). or a dynamic routing protocol such as OSPF can be allowed to
automatically enter the route, referencing the peer's sto interface IP address as the next hop in the
route table. The same IP address must also be entered as the next hop in the NHTB table, along with
the appropriate IPsec VPN name. By doing this, the route and NHTB tables are linked. Regarding the
NHTB table, there are again two options: the next hop can be entered manually, or if both devices ar e
running the Junos OS the NHTB route can automatically be obtained from the remote peer during
Phase 2 negotiations using the NOTIFY_NS_NHTB_INFORM message.
1721830/3)
. r ·"
N
• Configuration Example
• All branch devices peer to the loO interface on the hub device
• All routes are statically configured
• Configurations and verification commands will be from the
perspective of srx-1 (hub) and srx-2 (spoke)
• Security zones and policies are required but not covered
Configuration Example
The diagram on this slide serves as the basis for the various configuration mode and operational
mode examples that follow. There is no dynamic IGP configured and all routing is being handled
statically. As the slide illustrates, the stO interfaces all participate in the same network. This design
is not required, but strongly recommended.
The goal of this network is to provide IPsec VPNs connectivity between all branch sites and the hub
device. These VPNs will encrypt and transport traffic from branch-to-branch, as well as
branch-to-hub.
Spoke Configuration (1 of 3)
[edit interfaces]
user@srx-2# show stO
unit O {
family inet (
address 10.10.10.2/24;
[edit routing-options]
user@srx-2# show
static (
route 0.0.0.0/0 next-hop 172 .18 .1.1;
route 1.1.1. 0/24 next-hop stO. O;
t'OUte 3.3 .3.0/24 next-hop stO.0;
route 4.4 .4. 0/24 next-hop stO.O;
Spoke Configuration (2 of 3)
[edit s ecui:ity]
user@srx-2# show ike
policy ike-poll {
mode main;
pro posal-set standard;
pre-shared-key ascii-text "$9$EeJSlM7-waZj BXZjHqQzhSr"; ## SECRET-DATA
gateway my-gate {
ike-policy ike-poll;
address 192.168.1.1; Hubloopback
external-interface g e-0/0/1; Interface used to reach Hub
• Configuring IKE
• Define the proposal or use a predefined proposal-set
• Define the policy and authentication method
• Configure the gateway
• lncludethe IKE policy
• Definethe remote gateway address
.s
Spoke Configuration (3 of 3)
[edit security]
user@srx-2# show ipsec
policy ipsec-poll {
perfect-forward-secrecy
keys group2;
proposal-set standard;
vpn srx2-to-srx1
bind-interface stO.O;
ike
gateway my-gate;
ipsec-policy ipsec-poll;
establish-tunnels immediately;
• Configuring IPsec
• Configure the IPsec policy options
• Define the VPN parameters
• Include the IKE gateway
• Specify the IPsec policy to be used
• Bind the tunnel interface
Hub Configuration (1 of 4)
[edit interfaces]
user@srx-1# show stO
unit O {
! multipoint;!
family inet {
address 10.10.10.1/24;
Hub Configuration (2 of 4)
[edit routing-options]
user@srx-1# show
static {
route 2.2.2.0/24 next-hop 10.10.10.2;
route 3.3.3.0/24 next-hop 10.10.10.3;
route 4.4.4.0/24 next-hop 10.10.10.4;
Hub Configuration (3 of 4)
[edit security]
user@srx-1# show ike
policy ike-poll {
mode main;
proposal-set standard;
pre-shared-key ascii-text "$9$ca-rK8-VYZUHX7UHqmF3Sre"; ## SECRET-DATA
gateway gate-srx2 {
ike-policy ike-poll;
address 172.18.1.2;
external-interface lo0.0;
gateway gate-srx3 {
• Configuring IKE
ike-policy ike-poll;
address 172.18. 2.2;
• Define the proposal
external-interface lo0.0;
• Define the policy
gateway gate-srx4 {
ike-policy ike-poll;
• Configure the gateways
address 172.18.3.2; • Include the IKE policy
external-interface loO;
• Define the remote gateway address
• Specify the external interface
Hub Configuration (4 of 4)
[edit security]
user@srx-1# show ipsec
policy ipsec-poll (
• Configuring IPsec
perfect-f orward-secrecy • Configure the IPsec policy options
keys groupZ;
• Define the VPN parameters
proposal-set standard;
• Include the IKE gateway
vpn srxl-to-srx2 (
I
bind-interface stD. D; I • Specify the IPsec policy to be used
ike { • Bind the tunnel interface
gateway gate-srx2;
ipsec-policy ipsec-poll; • The same stO interface is bound
to all VPNs
vpn srxl-to-srx3 { ....----,
bind-interface!stO.O;!
ike {
gateway gate-srx3;
ipsec-policy ipsec-poll;
vpn srxl-to-srx4 (
!
......,.....,,.....,
bind-interface!st0.0;
ike {
gateway gate-srx4;
ipsec-policy ipsec-poll;
Spoke Verification (1 of 2)
Spoke Verification (2 of 2)
Hub Verification (1 of 3)
• Verify tunnel establishment
•, Verify IKE negotiation
user@srx-1> show security ike security-associations
Index Remote Address State Initiator cookie Responder cookie Mode
47 172.18.3.2 UP lflef39bbal23e3d 5a7a69b5667da235 Main
45 172.18.1.2 UP lf916bf9e3ef3625 416fbfl7e960e35d Main
46 172.18.2.2 UP 806b292896f5b0d c lef23dacc3bllafe Main
Hub Verification (2 of 3)
H111b Verification (3 of 3)
• Verify that the static routes are installed
user@srx-1> show route
h��
Worldwide Education Services ,,,..,,, 1un,p" net J s1
Auto VPN
ike-user-type group-ike-id;
local-identity distinguished-name;
external-interface interface;
The slide shows an example of the IKE and IPsec configuration on the stub.
Summary
• In this content, we:
41 Differentiated and configured standard point-to-point VPN
tunnels and hub-and-spoke VPNs
41 Monitored the operations of the various IPsec VPN
implementations
•
1
Described public key cryptography for certificates
We Discussed:
Differentiating and configuring standard point-to-point VPN tunnels and hub-and-spoke
VPNs;
Monitoring the operations of various IPsec VPN implementations; and
Public key cryptography for certificates.
Review Questions
Review Questions
1.
2.
« �c'"a"�%�"
Net..,orl", 1n .. All riJ!l)ts,.,•rv•d �• �(JQjpef'i1:Worldwide Educatlo n Services '"'" Jun,pe, net I ss
A-�-..-c�lwu-
2.
It is only required for you to manually configure the entries for the NHTB table when the remote device is
not running the Junos OS.
3G.................................................................................... third-generation
AGL...........................................................•..................... access control list
ADSL................................................................... asymmetric digital subscriber line
AFTR.................................................................... Address Family Transition Router
AH............................................................................... authentication header
ALG.......................................................................... Application Layer Gateway
ARP......................................................................... Address Resolution Protocol
ASC........................................................................... application system cache
BFD............................................................ Bidirectional Forwarding Detection protocol
BGP ........................................................................... Border Gateway Protocol
CA................................................................................. certificate authority
CCC............................................................................... circuit cross-connect
CDMA..................................................................... Code Division Multiple Access
CE..................................................................................... customer edge
CFM ........................................................................common form-factor module
CGN ................................................................................. carrier-grade NAT
CHAP ........................................................ Challenge Handshake Authentication Protocol
CLI .............................................................................command-line interface
CMTS .................•................................................ cable modem termination system
Cos.................................................................................... class of service
CP....................................................................................... Central Point
CPE....................................................................... customer premises equipment
CPP............................................................................ Control Plane Processor
cps ............................................................................ connections per second
CRL............................................................................ certificate revocation list
dcd.............................................................................. device control process
DCE........•••.••..................................................... data circuit-terminating equipment
DDoS ....................................................................... distributed denial of service
DER ....•••.••.•.•.........................................................Distinguished Encoding Rules
DFA...................................................................... :deterministic finite automation
DHCP .......•••..•................................................... Dynamic Host Configuration Protocol
DLCI ...................................................................... data-link connection identifier
ON ................................................................................ distinguished name
DNS ............................................................................. Domain Name System
DOCSIS..................................................... Data over Cable System Interface Specifications
DoS................................................................................... denial of service
DPD ...............................................................................dead peer detection
DSCP .....•............ ..••..•••.•••...••.•....•..•....••.•.• ...................... DiffServ code point
DSLAM........................................................... digital subscriber line access multiplexer
OS-Lite .................................................................................. dual-stack lite
DTE......................•.•......•.•.......................................... data terminal equipment
DVMRP.......................................................... Distance Vector Multicast Routing Protocol
ESD..........................••....•..•.••.•......•.......•..................... electrostatic discharge
ESP...................................................................... Encapsulating Security Payload
EV-DO......................................................................... Evolution-Data Optimized
FBF..............................................................................filter-based forwarding
FQDN ....................................................................... fully qualified domain name
GB.......................................•.••••....••••..................................... gigabyte
GDOI..................................................................... Group Domain of Interpretation
GPIM.......................................................... Gigabit-Backplane Physical Interface Module
GRE .................................•....•.•••••..•••••..•................generic routing encapsulation
GSM............................................................ Global System for Mobile Communications
GUI..........................................••.•..•..••........................graphical user interface
HA.....................................................................................high availability
HSPA ...................................................................••... High-Speed Packet Access
Student Guide-Volume 2
Jun1Pec NETWORKS
Worldwide Education Services
Juniper Networks reserves the right to change, modify, transfer, or otherwise revise this publication without notice.
YEAR 2000 NOTICE
Juniper Networks hardware and software prOducts do not suffer from Year 2000 problems and hence are Year 2000 compliant. The Junos operating system has
no known time-related limitations through the year 2038. However, the NTP application is known to have some difficulty in the year 2036.
SOFTWARE LICENSE
The terms and conditions for using Juniper Networks software are described in the software license provided with the software, or to the extent applicable, in an
agreement executed between you and Juniper Networks, or Juniper Networks agent. By using Juniper Networks software, you indicate that you understand and
agree to be bound by its license terms and conditions. Generally speaking, the software license restricts the manner in which you are permitted to use the Juniper
Networks software, may contain prohibitions against certain uses, and may state conditions under which the license is automatically terminated. You should
consult the software license for further details.
Contents
This three-day course, which is designed to build off of the currentJunos Security (JSEC) offering,
delves deeper into Junos security. Through demonstrations and hands-on labs, you will gain
experience in configuring and monitoring the advanced Junos OS security features with advanced
coverage of IPsec deployments, virtualization, AppSecure, advanced Network Address Translation
(NAT) deployments, and Layer 2 security. This course uses Juniper Networks SRX Series Services
Gateways for the hands-on component. This course is based on Junos OS Release 12.1X44-D10.4.
Objectives
After successfully completing this course, you should be able to:
Demonstrate understanding of concepts covered in the prerequisite Junos Security
course.
Describe the various forms of security supported by the Junos OS.
Implement features of the AppSecure suite, including AppID, AppFW, and AppTrack.
Configure custom application signatures.
Describe Junos security handling at Layer 2 versus Layer 3.
Implement Layer 2 transparent mode security features.
Demonstrate understanding of Logical Systems (LSYS).
Implement address books with dynamic addressing.
Compose security policies utilizing ALGs, custom applications, and dynamic
addressing for various scenarios.
Use Junos debugging tools to analyze traffic flows and identify traffic processing
patterns and problems.
Describe Junos routing instance types used for virtualization.
Implement virtual routing instances.
Describe and configure route sharing between routing instances using logical tunnel
interfaces.
Describe and implement static, source, destination, and dual NAT in complex LAN
environments.
Describe and implement variations of persistent NAT.
Describe and implement Carrier Grade NAT (CGN) solutions for 1Pv6 NAT, such as
NAT64, NAT46, and DS-Lite.
Describe the interaction between NAT and security policy.
Demonstrate understanding of DNS doctoring.
Differentiate and configure standard point-to-point IP Security (IPsec) virtual private
network (VPN) tunnels, hub-and-spoke VPNs, dynamic VPNs, and group VPNs.
Implement IPsec tunnels using virtual routers.
Implement OSPF over IPsec tunnels and utilize generic routing encapsulation (GRE) to
interconnect to legacy firewalls.
Monitor the operations of the various IPsec VPN implementations.
Describe public key cryptography for certificates.
Utilize Junos tools for troubleshooting Junos security implementations.
Perform successful troubleshooting of some common Junos security issues.
Course Level
Advanced Junos Security is an advanced-level course.
Prerequisites
Students should have a strong level of TCP/IP networking and security knowledge. Students should
also attend the Introduction to the Junos Operating System (IJOS), Junos Routing Essentials (JRE),
and Junos Security (JSEC) courses prior to attending this class.
Day1
Chapter 1: Course Introduction
Chapter 2: AppSecure
Implementing AppSecure Lab
Chapter 3: Junos Layer 2 Packet Handling and Security Features
Implementing Layer 2 Security Lab
Chapter 4: Virtualization
Implementing Junos Virtual Routing Lab
Day2
Chapter 5: Advanced NAT Concepts
Advanced NAT Implementations Lab
Chapter 6: IPsec Implementations
Hub-and-Spoke IPsec VPNs Lab
Day3
Chapter 7: Enterprise IPsec Technologies: Group and Dynamic VPNs
Configuring Group VPNs Lab
Chapter 8: IPsec VPN Case Studies and Solutions
Implementing Advanced IPsec VPN Solutions Lab
Chapter 9: Troubleshooting Junos Security
Performing Security Troubleshooting Techniques Lab
Appendix A: SRX Series Hardware and Interfaces
Franklin Gothic Normal text. Most of what you read in the Lab Guide
and Student Guide.
CLI Input Text that you must enter. lab@San_Jose> show route
GUI Input Select File > Save, and type
config _ ini in the Filename field.
CLI Undefined Text where the variable's value is Type set policy policy-name.
the user's discretion or text where
ping 10.0.�
the variable's value as shown in
GUI Undefined the lab guide might differ from the Select File > Save, and type
value the user must input filename in the Filename field.
according to the lab topology.
Technical Publications
You can print technical manuals and release notes directly from the Internet in a variety of formats:
Go to http://www.juniper.net;techpubs/.
Locate the specific software or hardware release and title you need, and choose the
format in which you want to view or print the document.
Documentation sets and CDs are available through your local Juniper Networks sales office or
account representative.
Objectives
• After successfully completing this content, you will be
able to:
• Describe, implement, and monitor group VPNs in an
enterprise environment
• Describe, implement, and monitor dynamic VPNs in an
enterprise environment
We Will Discuss:
The description, implementation, and monitoring of group virtual private networks
(VPNs) in an enterprise environment; and
The description, implementation, and monitoring of dynamic VPNs in an enterprise
environment.
Chapter 7-2 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
Chapter 7-6 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
GDOI Protocol
This slide highlights the topic we discuss next.
• GDOI standard
• Defined in RFC 354 7
• Introduces two new encryption keys
• KEK - used to secure the control plane
• TEK - used to secure the data plane
GDOI Standard
The GDOI protocol is described in RFC 3547 and is used to distribute a set of cryptographic keys and
policies to a group of devices. The communication in the GDOI protocol is protected by a IKE Phase 1
key between each member and the server. GDOI introduces two different encryption keys:
Key encr yption key (KEK), used to secure the control plane; and
Traffic integrity key (TEK), used to secure the data plane.
As with standard IPsec, all keys have a lifetime and have to be re-keyed. The keys distributed through
GDOI are group keys and are used by the entire group.
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7-9
Advanced Junos Security
Chapter 7-10 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
IP Header Preservation
--- ------
The IP Header
In traditional IPsec, tunnel endpoint addresses are used as the new packet source and destination
addresses. The packet is then routed over the IP infrastructure, using the encrypting gateway source
IP address and the decrypting gateway destination IP address. In the case of a group VPN, IPsec
protected data packets encapsulate the original source and destination packet addresses of the
host in the outer IP header to preserve the IP address. The biggest advantage of tunnel header
preservation is the ability to route encrypted packets using the underlying network routing
infrastructure. As explained earlier, because tunnel header preservation is combined with group SAs,
multicast replication can be offloaded to the provider network. Because every group member shares
the same SA, the IPsec router closest to the multicast source does not need to replicate packets to
all its peers, and is no longer subject to multicast replication issues seen in traditional IPsec
solutions.
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7-11
Advanced Junes Security
GroupSAs
Unlike traditional IPsec encryption solutions, a group VPN uses the concept of a group SA. All
members in the group VPN group can communicate with each other using a common encryption
policy and a shared SA. With a common encryption policy and a shared SA, there is no need to
negotiate IPsec between group members; this reduces the resource load on the IPsec routers.
Traditional group member scalability (number of tunnels and associated SAs) concerns are limited
and usually do not apply to group VPN group members.
Server-to-Member Communication
The server-to-member communication configuration is not mandatory and if not defined it implies
that for rekey the members will pull the SA information from the key server. This pull message is
protected over the IKE SA. The key server is not only responsible for generating keys, but also for
refreshing and distributing keys to the group members. A group VPN supports two kinds of rekey
messages unicast and multicast. Whenever the server-to-member communication is defined for a
group, a KEK is established for each group. All other (push) rekey messages are protected over KEK
SAs.
Continued on the next page.
Chapter 7-12 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
Server-to-Member Communication (contd.)
There are three rekey methods associated with group VPNs:
1. Pull Method: In the pull method the group member requests the group SA and policy
from the key server. This request is protected over the IKE SA. For the PULL method no
KEK is required.
2. Unicast Push Method: In the unicast re key process, a key server generates a rekey
message and sends multiple copies of the message, one copy to each group member.
The message that the key server sends is protected over KEK. Upon receiving the re key
message, a group member sends an ACK message to the key server. This ACK
mechanism not only ensures that the list of active group members on the key server is
current, but also ensures that the rekey message is sent only to active group members.
A key server can be configured to retransmit a rekey packet to overcome transient
defects in the network. If a group member does not acknowledge three consecutive
rekeys (retransmissions are considered part of the rekey), the key server removes the
group member from its active group member database and stops sending rekey
messages to that group member.
3. Multicast Push Method: In the multicast rekey process, a key server generates a rekey
message and sends one copy of the message to a multicast group address that is
predefined in the configuration. The message that key server sends is protected over
KEK. Each group member joins the multicast group at registration time, so each group
member receives a copy of the rekey message. Unlike unicast rekey, multicast rekey
does not have an ACK mechanism. The key server does not maintain a list of active
group members. Multicast rekey uses the same low CPU overhead whether there is one
group member in the group or a few thousand. Just like the unicast rekey method, the
key server can be configured to retransmit a multicast rekey packet to overcome
transient network defects.
Note that if the group member does not receive the new key before the one currently in use expires,
it will initiate another pull (for example if the rekey message to the member is lost in transit).
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7-13
Advanced Junos Security
• Unicast
[edit security group-vpn server]
user@srx# show group -l server-member-communication
communica ion- e unicas ;
retransmission-period 30;
number-of-retransmission 3;
encryption-algorithm aes-256-cbc;
sig-hash-algorithm shal;
• Multicast
[edit security group-vpn server]
user@srx# show rou rou -2 server-member-communication
ommunication-t e mu ticast;
multicast-group 226.l.l.l;
multicast-outgoing-interface lo0.0;
encryption-algorithm aes-256-cbc;
sig-hash-algorithm shal;
[edit]
user@srx# show protocols pim
rp {
local {
address 100.0.0.100;
}
interface all {
mode sparse;
Chapter 7-14 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
Redundancy Options
• Redundancy
•VRRP
• Two key servers with identical group VPN configuration
• Members must peer to the VIP address
• HA (chassis cluster) and co-operative key servers might be
supported in future versions
Redundancy Options
As mentioned earlier, the Junos OS group VPN solution does not support chassis clusters or
co-operative key servers. The current solution to redundancy, both at the key server as well as the
group member is to use Virtual Router Redundancy Protocol (VRRP). For key server redundancy, the
design needs to include two key servers each having the same configuration for the group VPN. For
the server-address definitions under the group VPN server configurations, we must provide the VRRP
virtual IP (VIP) address and not the IP address of the individual interfaces.
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7-15
Advanced Junos Security
Chapter 7-16 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
• Branch 1
(2220/24
ember1
�
loO - 192.168.1.2
�2 1
� 1721840/30
• Configuration example
• All VPNs establish using loopback addresses
• All devices are in a single OSPF area
• Configurations and verification commands \Nill be from the
perspective of srx-1 (server) and srx-2 (member)
• Zone configuration is not covered
Configuration Example
The diagram on this slide serves as the basis for the various configuration mode and operational
mode examples that follow. There is a single OSPF area which is handling all routing.
The goal of this network is to provide IPsec group VPN connectivity between all branch sites and the
key server. These VPNs will encrypt and transport traffic between branches.
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7 -17
Advanced Junos Security
v
Key Serer Requirements
Chapter 7-18 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
policy secv-p ol {
mode main;
pcoposals secv-pcop;
pce-shaced-key ascii-text "$9$ 9cYLt0 IylMNdsEcds2 4DjCtu"; ## SECRET-DATA
gateway scxl-to-scx 2 {
ike-policy secv-pol;
addcess 192.168.1.2; • Configuring IKE
gateway scxl-to-scx 3 { • Define the proposal
ike-policy secv-pol;
addcess 192.168.1.3; • Define the policy
• Configure the gateways
• Include the IKE policy
• Define the remote gateway address
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7-19
Advanced Junos Security
• Configuring IPsec
• The proposal must be user defined
• Specify authentication
• Define encryption
• lndicateSA lifetime
-�- Jun1Pe(
�"�= ·--
-� m-"
WorldwideEducationServlces wwo•jun,pe,net I 20
Chapter 7-20 • Enterprise !Psec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
• Group configuration
• Specify group name and assign an ID number
• Assign IKE gateways and server address
• Define policies for interesting traffic
• Add server to member communication properties (optional)
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7-21
Advanced Junos Security
policy poll {
mode main;
proposals pcopl;
pee-shared-key ascii- text "$9$QQUM3/tlRSM87u087-V4oz36"; ## SECRET-DATA
gateway scx2-to-scxl {
ike-policy poll; • Configuring IKE
address 192.168.l.1;
local-address 192.168.1.2; • Define the proposal
• Define the policy
• Configure the gateway to the server
• Include the IKE policy
• Define the remote gateway address
• Specifythe local address
Chapter 7-22 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
• IPsec configuration
• Define IKE gateway
• Specify external interface
• Specify the group number to which this member belongs
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7 -23
Advanced Junos Security
• Policy configuration
from-zone trust to-zone untrust
• Define match criteria
policy scopel {
match {
(must be super-set of
source-address any;
destination-addres s any; server dynamic policy)
application any;
I
then {
• Specify group VPN
permit {
tunnel
tunnel
ipsec-group-vpn vpnl;
I
l-
Chapter 7-24 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
• Server SA verification
• IKE
user@srx-1> show security group-vpn server ike security-associations
Index Remote Address State Initiator cookie Responder cookie Mode
52 192.168.1.2 UP 68ca616e944920f8 9aad23f7bb080be9 Main
53 192.168.1.3 UP c580d2b738e5a4f6 c8d8e7f52cla8c64 Main
• IPsec
user@srx-1> show security group-vpn server ipsec security-associations
Group: groupl, Group Id: 1
Total IPsec SAs: 1
IPsec SA Jl.lgor ithm SPI Lifetime
group-sa ESP: 3 des/sha1 de9a0f46 3534
• KEK
user@srx-1> show security group-vpn server kek security-associations
Index Remote Address State Initiator cookie Responder cookie Groupid
51 0.0.0.0 UP f8bf0e2e04d345ef e7b9d0a99e4f93c0 1
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7-25
Advanced Junes Security
• IPsec
usec@scx-2> show security group-vpn member ipsec sec u rity-associations
Total active tunnels: 1
ID secvec Poet Algocith m SPI Life: sec/kb Gid vsys
>133955594 192.168.1.1 848 ESP:3 des/shal 4cf2c37f 3583/ unlim 1 coot
<133955594 192.168.1.1 848 ESP:3 des/shal 4cf2c37f 3583/ unlim 1 coot
• KEK
usec@scx-2> show security group-vpn member kek security-associations
Index Remote Addcess State Initiatoc cookie Respondec cookie Gcoupid
54 192.168.1.1 UP d06917c3e183c755 86337e2549ed47b6 1
Chapter 7-26 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7 -27
Advanced Junos Security
Chapter 7-28 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junes Security
Group Member Encryption and Decryption Data Path (contd.)
6. Session ID 1197 is the plain text session created for the Telnet traffic.
7. Session ID 1186 is called the tunnel session. It is used for decrypting any traffic
received from 3.3.3.2 through the tunnel. This session is tied to the IPsec SA and SPI.
8. Session id 1199 is called a shadow tunnel session. It is used to drop any IPsec traffic
which does not belong to the corresponding SPI.
9. The packet is then encrypted and the inner source and destination IP is copied to the
outer header and then sent to the next hop router using the interface fe-0/0/2.
10. The reverse packet is matched using session 1186.
Decrypting Side Data Path:
1. For the Telnet session from 3.3.3.2 to 2.2.2.2, the encrypted packet will arrive on the
untrust interface (ge-0/0/1.0) on "sr x -3".
2. This packet will match the 0.0.0.0/xxxxx -> 0.0.0.0/xxxxx session created for the IPsec
SA and SPI after the key server pushed down the policy (ID 1565).
3. Three new sessions similar to the encrypting side are created.
4. Session 15 71 is for the plain-text traffic. Session 157 8 is the tunnel session and
session 1548 is the shadow tunnel session
5. The traffic will get decrypted and sent to the host 2.2.2.2. The reverse traffic will match
session 1578 and get encrypted.
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7-29
Advanced Junos Security
• Advanced options
• Co-location
• Allows device to act as server and member
• Defined under the [edit security group-vpn
co-location] hierarchy
• Anti-replay options
• Based on pseudo time
• Can be turned off by s pecifying no-anti-replay
• Activation time delay
• Configure a delay timer for activating a group VPN
Chapter 7-30 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7-31
Advanced Junos Security
-�,,�< ,-, �,
����;".',i!J!fJ:;;...,�Md. -· - '::,.,-
Remote access VPNs, sometimes called dialup VPNs, have been supported in ScreenOS and by the
Junos OS for some time. Traditional remote access VPNs require client software to establish a VPN.
Installing and distributing the client software to all remote devices becomes a challenge. End-to-site
VPN tunnels are particularly helpful to remote users such as telecommuters because a single tunnel
enables access to all of the resources on a network-the users do not need to configure individual
access settings to each application and server.
The dynamic VPN feature available on SRX devices allows administrators to provide IPsec access to
an SRX gateway while providing a simple way to distribute the client software through the use of a
web portal. The remote client connects to the SRX device through Hypertext Transfer Protocol (HTIP)
or Hypertext Transfer Protocol over Secure Sockets Layer (HTIPS). This enables the transfer of the
Junos Pulse client software.
Continued on the next page.
Chapter 7 -32 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
Hardware and Software Requirements
There have been many enhancements and changes in behavior regarding the Junos OS
implementations of dynamic VPNs. The features and requirements outlined during this chapter are
specific to the 12.1R1.9 Junos OS release. You will want to refer to the specific documentation for
other Junos OS versions, regarding feature support and requirements.
Dynamic IPsec VPNs are supported on the following devices, which have the Dynamic VPN Client
License installed:
SRX100 (Junos 10.0 and above)
SRX210 (Junos 9.5 and above)
SRX220 (Junos 10.3 and above)
SRX240 (Junos 9.5 and above)
SRX650 (Junos 10.2 and above)
The remote access client software is supported on the following operating systems:
WindowsXP
Windows Vista
Windows 7
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7-33
Advanced Junes Security
Chapter 7-34 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7-35
Advanced Junos Security
Chapter 7-36 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
•• ¥0:-
, !no All� t•seoved. �l!Jfil!Wi:�}1:[ii�dwide Education Services ww� 1un,per net J 37
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7 -37
Advanced Junos Security
Chapter 7-38 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
10 10 10.0/24
''
·, 172.20.20.0/30
Remote
... ....
Client
2
.... .10
• Configuration example
, _______ _
• The Internet is using OSPF for routing
• Remote clients have a statically assigned IP address
• Configurations and verification commands will be from the
perspective of srx-1 (remote access server) and client 2
• Remote access server will be assigning the IP range for the
tunnel connections to the corporate office
Configuration Example
The diagram on the slide serves as the basis for the various configuration mode and operational
mode examples that follow. There is a single OSPF area which is configured through the core to
simulate the Internet.
The goal of this network is to provide IPsec dynamic VPN connectivity to both client 1 and client 2.
The configuration and verification commands and outputs will be from the perspective of the remote
access server and client 2. These VPNs will encrypt and transport traffic between the client devices
and the internal servers and network devices connected to the remote access server (srx-1). The
authentication and IP addressing will be configured locally on the remote access server.
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7 -39
Advanced Junos Security
Chapter 7-40 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
security-zone untrust
interfaces {
ge-0/0/1.0 {
host-inbound-traffic {
system-services {
ike;
https;
} ...
HTTPS Configuration
The dynamic VPN portal requires the services of the HTTPS (or HTTP) daemon, which can be enabled
under the [edit system services web-management] hierarchy. This configuration step is
only required if this service is not already enabled. If this service is already enabled for J-Web access,
no further configuration is required. In order to enable this service only for dynamic vpn access,
without allowing for J-web access on any interface, simply configure the service without specifying an
interface for J-web, as illustrated on the slide.
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7-41
Advanced Junos Security
Chapter 7 -42 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
• Configure IKE
• Configure a policy: must use aggressive mode
• Must use pre-shared keys as gateway authentication
• Apply the access-profile that was previously defined
• Configure the properties for dynamic IKE negotiation
Configuring IKE
Next, configure the IPsec VPN settings, which begins with specifying the IKE Phase 1 parameters. In
order to simplify the configuration the example takes advantage of the pre-defined proposals for
Phase 1 negotiations. Also notice that the mode is set to aggressive and the authentication
method is configured to use pre-shared keys. Only pre-shared keys are supported for Phase 1
authentication. However, because these VPNs use XAUTH, in most deployments it is possible to use
the same pre-shared key for all the remote clients. Of course, each client or user will have different
username and passwords assigned to use during the XAUTH phase.
Under the IKE gateway configuration, specify the connection limit and the IKE user type. The
connection limit should not be larger than the total number of licenses installed. In the example
provided the group- ike ID is used. Each client will have its own IKE ID, which is derived from the
username and group ID (srx-1).
Specify the interface to listen for connections. This interface is important both for IKE and also for
the authentication portal. The XAUTH profile determines how to authenticate the user, assign
addresses and access parameters.
Chapter 7-44 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
• Configure IPsec
• Define the IPsec policy
• Create a VPN and specify the IKE gateway and IPsec policy
�r.iioe:irJ\v�rtdWideEducationServices WWWJun;pernet I 45
!'%@« -
Configuring IPsec
The IPsec policy and configuration is standard. In the example, the policy takes advantage of the
standard pre-defined proposal- set. Specify the !KE gateway to be used and indicate what
IPsec policy to use.
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7 -45
Advanced Junos Security
Chapter 7-46 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.ju1niper.net
Advanced Junos Security
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7-4 7
Advanced Junos Security
• RADIUS authentication
• Used as an alternative to local authentication
• The only XAUTH and IP address assignment method
supported prior to 10.4R1.9
[edit access]
user@srx-1# show
profile radius-dynamic-profile
authentication-order radius;
radius-server {
10 .10 .10 .3 secret "$9$pgpaOicKMXbs4yls4aZkqu01"; ## SECRET-DATA
firewall-authentication
web-authentication {
default-profile radius-dynamic-profile;
Chapter 7 -48 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7 -49
Advanced Junos Security
- - - - - - - - - -'--�������������--'- - - - - - - - - - - -
• Download the Junos Pulse client
• Must install software if this is the first use
Chapter 7 -50 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.j,uniper.net
Advanced Junos Security
Connections � � � Acceleration
1 ]
-> INAN OpUmi2a1iM
ADd connection x
Name:
dynamic-VPN
SemrURL:
171.20.201
,.: -
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7-51
Advanced Junos Security
Save settlngs
Chapter 7 -52 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
User Name;
user-1
······�
Password:
[ Connect J( cancel J
• Authentication
11 Initial authentication occurs
• Client downloads latest configuration settings from server
Authentication
The next step is authenticating with the access server:
6. Enter the username and password credentials and click Connect. At this time, the
user configuration is downloaded and the IKE SA will attempt to establish.
The Ju nos Pulse window shows the status as Connecting.
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7 -53
Advanced Junos Security
User Name:
user·I
Password:
•••••••I
cancel
• Tunnel authentication
• Second authentication will occur if connecting for the first
time
Establishes IPsec SA
Tunnel Authentication
After the initial authentication, the system must authenticate the user for IPsec tunnel access:
7. If the dynamic VPN is being accessed for the first time, the user will be prompted for
their credentials again. Enter the XAUTH username and password credentials.
Note that the first user authentication (at Step 8) is used to download the configuration and to
establish an IKE SA. The second user authentication (at this step) is used to establish the IPsec SA
and make the connection. Both user credentials used can be either the same or different based on
the configuration on the SRX device.
Chapter 7-54 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
J+'/IXI
-.- dynamic-VPN � [ m.conncct J
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7 -55
Advanced Junos Security
Chapter 7-56 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
"' =·�- �=
-=- -- - .
JL}Q� Worldwide Education Services
0 � f
@• er Neiwcrks� lnt:.AJl rlgttf,: reseMd. './ ":.� ;,,;,� WWW Jun IP er not I 57
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7-57
Advanced Junos Security
• Verify SAs
• Verify IKE SA establishment
user@srx-1> show security ike security-associations
Index Remot e A ddress State Initiator cookie Responder cookie Mode
2 172.20.20.10 UP 6d83fdedd6f8dl12 c9cd00c371966139 Aggressive
• Verify IPsec SA
user@srx-1> show security ipsec security-associations
Total active tunnels: 1
ID Gateway Port Algorithm SPI Life:sec/k b M on vsys
<133955593 172.20.20.10 500 ESP:aes-128/shal 6a115bf6 3553/ 449993 - root
>133955593 172.20.20.10 500 ESP:aes-128/shal c52ac98 8 3553/ 449993 - ro ot
Chapter 7-58 • Enterprise JPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7-59
Advanced Junos Security
Chapter 7-60 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
The management-url configuration option can used to specify the URL used to access the
management interface (J-Web) when a particular interface is used both for dynamic VPNs and Web
management. When the management-url is configured, a request to
http(s)://<interface-address>/<management-url> will, instead, present the management interface.
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7 -61
Advanced Junos Security
Summary
• In this content, we:
• Described, implemented, and monitored group VPNs in an
enterprise environment
• Described, implemented, and monitored dynamic VPNs in
an enterprise environment
We Discussed:
The description, implementation, and monitoring of group VPNs in an enterpri,,e
environment; and
The description, implementation, and monitoring of dynamic VPNs in an enterprise
environment.
Chapter 7-62 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Junos Security
Re,view Questions
oriii oi'Altr�
•
4.
Review Questions
�IJr;)I "'9 "'
··�
��
:WorldwideEducationServices
- -
.,.,.,,unipernet 1 63
1.
2.
3.
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7 -63
Advanced Junos Security
-41\l '"r"
f1
��rldwid�EducatlonServlces wwwJ
Chapter 7 -64 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
Advanced Ju nos Security
Answers to Review Questions
1.
The key server is the device responsible for sending the policies out to all group members.
2.
The two options for authentication for remote clients of a dynamic VPN are local and RADIUS.
3.
The remote client ,viii be prompted to download the Junos Pulse software after successfully authenticating an
HTTPS request to the external IPsec interface of the configured SRJC remote access server. Alternately, the
remote client can download the Junos Pulse software from
http://\V\V\v.juniper.net/support/products/pulse/#s,v.
www.juniper.net Enterprise IPsec Technologies: Group and Dynamic VPNs • Chapter 7-65
Advanced Junos Security
Chapter 7 -66 • Enterprise IPsec Technologies: Group and Dynamic VPNs www.juniper.net
JUnlf2;�[
Advanced Junos Security
Objectives
We Will Discuss:
Configuring OSPF over generic routing encapsulation (GRE) over IP Security (IF'sec)
virtual private network (VPN) tunnels;
Configuring IPsec between sites with overlapping addresses;
Configuring an IPsec VPN using the hostname as the Internet Key Exchange (11-<E) ID;
and
Some IPsec VPN tips and tricks for the enterprise environment.
Case Study (1 of 3)
Case Study
In this case study, Ultimate Music Inc. has purchased Mom-N-Pop Music Shop. Both networks are
currently running OSPF and each network has a single area.
Management in Ultimate Music Inc. wants to establish internal communication with Mom-M-Pop
Music Shop immediately.
Case Study (2 of 3)
�d '.�)J(il�fW��®tideEducationServices "ww1un,perne1 Is
Case Study (3 of 3)
------
.,,..... -UltimateMusiclnc- ....._
/
/ ..........
. ·� "
\\ . .
-J:i-.· ·•-.
"."'"/ ""· . ,....., "'""1
(/��·. .. --"��]
}-L:
'<. __
-·
d)_.-/�/�:
-
,
-
/,
QJ�
osPFNooO
- - - -
·
C a-:.
.1. / Mom-N-Pop bl
.
,!__
A
Mus1cShop
� §I
1\ /j El
-�
', . ,./..J:] OSPFArea�//
' �Q /
"
...... ___ ..,..,
bJ /
Requirements
GRE and OSPF are only supported with route-based IPsec VPNs. When merging two networks, it is
important that there are not any overlapping network addresses. Overlapping network addresses will
cause routing problems between the two networks. We will discuss how to handle overlapping
network addresses later in this chapter. It is also important when using routing protocols that you
enable the protocol on the interfaces within the zone configuration. Because OSPF will be signaled
over the GRE tunnel you must configure the GRE interface under OSPF.
For the purposes of this case study, both OSPF networks need to remain in area 0. The IPsec VPN
must be a point-to-point VPN and allow all internal traffic through. Internet traffic should exit each
site directly to their Internet service provider (ISP).
Preliminary Configuration
The configuration examples provided in the next few pages demonstrate the unique configuration
steps needed to enable OSPF over GRE over IPsec tunnels. The topics outlined on this slide, are not
going to be explicitly defined with examples in this section. These configuration steps will sHrve as
the foundation for this case study.
[edit]
user@Corporate-Gateway# show interfaces gr-0/0/0
unit O {
tunnel {
source 10.0.0.1;
destination 10.0.0.2;
family inet {
address 10.1.0.1/30;
• Interface configuration
• Must configure the stO interface
• IP address should be on the same network for both sto interfaces
• Configure the gr-0/0/0 interface
• Specify the source and destination addresses of the tunnel and
assign an IP address and network to the interface
Interface Configuration
Because this is a route-based IPsec VPN, you must configure the stO interface. If the GRE tunnel will
be using the stO interface as the source and destination, the interface addresses for both sides of
the IPsec tunnel should be in the same network. Being on the same network is not required, but
makes it much simpler when configuring. You must also configure the gr-0/0/0 interface, which is
the interface used to signal the GRE tunnel. When configuring this interface, the source and
destination addresses of the tunnel must be specified. Additionally, you must specify an IP address
to be used as the source of packets entering the GRE tunnel.
In the example displayed on the slide, the source and destination of the GRE tunnel are the IP
address of the stO interfaces. The IP address for the tunnel is also defined.
host-inbound-traffic
protocols {
ospf;
interfaces {
ge-0/0/2. 0;
ge-0/0/3.0;
ge-6/0/0.0;
loO .O;
I gr-01010. o;
• Configure the security zone
• Add the gr-0/0/0 interface to the appropriate zone
• Enable the OSPF protocol for the gr-0/0/0 interface
• OSPF can be added for the entire zone of for the specific interface
[edit prntocols]
usec@Cocpocate-Gateway# show ospf
acea 0.0.0.0 {
intecface ge-0/0/3.0;
intecface ge-0/0/2.0;
intecface lo0.0;
intecface ge-6/0/0.0;
!
intecface gc-0/0/0.0;
• Configure OSPF
• Add the gr-0/0/0 interface and proper unit to the
protocols ospf area O hierarchy
OSPF Configuration
As mentioned earlier the gr-0/0/0 interface must be added to the OSPF protocol configuration. This
addition allows a neighborship to establish through the tunnel to the remote GRE interface.
• Verify OSPF
• Review interfaces in OSPF
user@Corporate-Gateway> show ospf interface
Interface State Area DR ID BDR ID Nbrs
ge-0/0/2.0 DR 0. O. O. 0 192.168.1.6 1 92.168 .1.2 1
ge-0/0/3.0 DR 0. 0. 0. 0 192.168.1.6 192.168.1.1 1
ge-6/0/0.0 DR 0.0. o. 0 192.168.1.6 192.168.1.3 1
!gr-0/0/0.0 PtToPt 0. 0. o. 0 0. 0. 0. 0 0. 0. 0. o 1
loO. 0 DR 0. 0. o. 0 192.168.1.6 0. o. 0. o 0
Verifying OSPF
Once the two ends of the GRE tunnel can communicate, the GRE interface becomes an operational
OSPF interface. You can view it using the show commands displayed on the slide.
• Contiguous area O
• Type 1 LSAs are exchanged through the tunnels
OSPF database, Area 0. 0. 0. o
Type ID Adv R tr: Seq Age Opt Cksum Len
Router: 192 .168 .1.1 192.168.1.1 Ox80000069 1732 Ox22 Ox38b3 72
Router: 192 .168 .1.2 192.168.1.2 Ox80000057 82 Ox22 Ox199f 72
Router: 192 .168 .1.3 192.168. 1.3 Ox8000006d 1201 Ox22 Ox3036 96
Router: 192 .168 .1. 4 192.168. l.4 Ox8000003a 1104 Ox22 Oxefcf 72
Router: 192.168 .1. 5 192 .168.1.5 Ox80000046 1810 Ox22 Ox6411 72
Router: "192.168 .1. 6 192.168. l.6 Ox800000a5 386 Ox22 Oxec31 96
Router: �.
.�- ux r
Router: 192 .168 .2. 2 192.168.2.2 Ox800000d 6 1869 72
Router: 192 .168 .2.3 192.168.2.3 Ox8000005f 1869 72
Router: 192.168.2.4 192.168.2.4 Ox80000004 2260 108
JUfilL�iifS�ideEducationServices ""'"'""'P""'' 1 13
Contiguous Area O
Once the neighbor is established using GRE over the IPsec tunnel, all link-state advertisements
(LSAs) are processed and routes to each company are installed into the routing table.
Ci11se Study (1 of 3)
Case Study
In this case study Ultimate Music Inc. has purchased Mom-N-Pop Music Shop. Both networks are
currently running OSPF and each network has a single area.
Management in Ultimate Music Inc. wants to establish internal communication with Mom-N-Pop
Music Shop immediately.
Case Study (2 of 3)
Case Study (3 of 3)
--- --: - - --- -......
/
- Ult1mateMus1clnc. -
/ ......._
n '
\
�bJ
/· d � 7=-- ' \
/1:J
I o> ''\_
I, QI
',EJ� /�! &-A ·i ---� - -
'
........ __ '[ � // ·�I
/ r� / ,
OSPF Area O u,
�kJ \
EI
- - - - El \
..,:;
_ /
I / Mom-N-Pop
Mus1cShop
TI · - \
�
\ /. El )
-
\, -� CT3PFAf:o/
' bJ /
����-�---·
�j ,ij:lJU�
........ ___
_ !P�_ �rldwideEclucationServices .,,,.,1un,pern,l 1 19
Preliminary Configuration
The configuration examples provided in the next few pages demonstrate the unique configuration
steps needed to enable static NAT with IPsec tunnels. The topics outlined on this slide are not going
to be explicitly defined with examples in this section. These configuration steps will serve as the
foundation for this case study.
then { �
! t_a_t�ic- -- n-a-t�p-re
�s_ � .� �0�/�2�4;- -,
- �f�i -x.....,..1�0.- 2�0�.�20
[edit couting-options]
usec@Cocpocate-Gateway# show
static (
Static Routes
A route entry must be in the routing table to reach the remote Mom-N-Pop Music Shop network. This
slide demonstrates the static route configured on the Ultimate Music gateway to reach the remote
network. You might also note that a static default route is configured to send Internet traffic to the
ISP.
• Zone vpn
[edit secucity zones]
usec@Cocpocate-Gateway# show security-zone� address-book
addcess mom-n-pop-int-net 10.10.10.0/24;
addcess mom-n-pop-int-loO 192.168.2.0/24;
addcess mom-n-pop-stO 10.0.0.0/30;
addcess-set mom-n-pop {
addcess mom-n-pop-int-net;
addcess mom-n-pop-int-loO;
addcess mom-n-pop-stO;
• Policy configuration
• Policy for trust zone to vpn zone
[edit secucity policies fcom-zone trust to-zone vpn]
usec@Cocpocate-Gateway# show policy,,ecure-traffic
match (
soucce-addcess ultimate-music;
destination-addcess mom-n-pop;
application any;
)
then (
pecmit;
Policy Configuration
The slide provides an example of what the policy configuration should look like when allowing traffic
in and out of your protected (trust) zone.
L
u::>er@Corporate-Gateway> show security flow session
L
Out: 10.20.20.2/1382 --> 10.10.10.2/6;icmp, If: ge-0/0/3.0, Pkts: 1, Bytes: 84
• Overview
• Many ISPs dynamically assign IP addresses to customers
using DHCP
• This situation becomes problematic when trying to establish a VPN
tunnel to an IP address tl1at is not statically assigned
• Gateway devices can use a hostname as their IKE ID
• This ability allows IKE to negotiate and verify identities using the
hostname instead of the IP address
,.,,.,.... -- ---..
Case Study
In this case study Ultimate Music Inc. has purchased Mom-N-Pop Music Shop. Both networks are
currently running OSPF and each network has a single area.
Management in Ultimate Music Inc. wants to establish internal communication with Mom-M-Pop
Music Shop immediately.
Ci1se Study (2 of 3)
• Ultimate Music Inc. has purchased Mom-N-Pop Music
Shop
• A migration team has been formed
• The gateway device at Ultimate Media Inc. has a statically assigned
public address
• The gateway device at Mom-N-Pop Music Shop is receiving a
dynamically assigned IP address from their provider
• No overlapping addresses exist between these two networks
• The IT manager at Ultimate Music Inc. does not want to
spend additional money at this time
• This migration needs to be completed quickly
• Traffic through the Internet has to be protected because
sensitive corporate proprietary information is being shared
z �*""
.;:JIJtlCil8�!r
'l -.�
Case Study (3 of 3)
IP Address
dynamically
assigned
• Interface configuration
• Standard s to configuration on both sides
[edit interfaces]
user@rnorn-pop-gateway# show stO
unit O {
family inet {
address 10.0.0.2/30;
Interface Configuration
For the purposes of this case study, the IPsec VPN is a route-based VPN. The slide demonstrates the
interface configuration for the stO interface as well as the Mom-N-Pop Music Shop's external
interface. As mentioned earlier, this interface is receiving its IP address dynamically from their ISP.
• Zone configuration
• External facing interface must allow DHCP and IKE within
the appropriate zone (Mom-N-Pop gateway)
Zone Configuration
The slide demonstrates the external interface configuration under the external zone (untrust). As
the example illustrates, you have to ensure that IKE and DHCP are configured as
host-inbound-traffic on the external interface.
gateway gate-1 {
ike-policy ike-pol-1;
address 66.124.30.5;
local-identity hostname "[email protected]";
ex erna -in er ace ge-
gateway gate-1 {
ike- olic ike- ol-1;
dynamic hostname "srxl@srx. juniper. net";
externa -inter ace ge-
DHCP options:
Name: secvec-identifier, Value: 77.128.30.1
Code: 1, Type: ip-addcess, Value: 255.255.255.0
Name: coutec, Value: [ 77.128.30.1]
Name: name-secvec, Value: [ 77.128.30.1 ]
• Verify SAs
• IKE SA
usec@mom-pop-gateway> show security ike security-associations
Index Remote Address State Initiator cookie Responder cooki e Mode
11 66.124.30.5 UP 66d07f0757497fd8 41424860ea4fa944 Aggressive
IPsecSA
usec@mom-pop-gateway> show security ipsec security-associations
Total active tunnels: 1
ID Gateway Poet Algorithm SPI Life:sec/kb Mon vsys
<131073 66.124.30.5 500 ESP :3des/shal e747c73a 2797/ u nlim coot
>131073 66.124.30.5 500 ESP:3des/shal a8669f0e 2797/ unlim coot
Verifying SAs
The slide serves as verification that both the IKE and IPsec security associations (SAs) have been
negotiated correctly using the hostname configuration.
MTU Settings
Path MTU discovery is enabled by default on devices running the Junos operating system and can be
disabled by configuring the no-path-mtu-discovery option under the system
internet-options hierarchy. When a Junos device receives a packet that it is not able to
forward because it exceeds the MTU of the next-hop network and the packet has the do-not-fragment
(DF) bit set, the Junos device is required to return an Internet Control Message Protocol (ICIVIP)
Destination Unreachable message to the source of the packet, with the code indicating
fragmentation needed and DF bit is set (ICMP error type 3 code 4 packet). The reporting device must
also indicate the correct MTU to be used by the sending device with the ICMP error messag;es being
sent.
Zone Considerations
Summary
• In this content, we:
• Configured OSPF over GRE over IPsec VPNs
• Configured IPsec between sites with overlapping IP
addresses
• Configured an IPsec VPN using the hostname as the IKE ID
• Described some IPsec VPN tips and tricks for the enterprise
environment
We Discussed:
Configuring OSPF over GRE over IPsec VPN tunnels;
Configuring IPsec between sites with overlapping addresses;
Configuring an IPsec VPN using the hostname as the IKE ID; and
Some IPsec VPN tips and tricks for the enterprise environment.
Review Questions
Review Questions
1.
2.
3.
.�
£:�mlftLJffilPef'. WorldwideEducationServices www,un,oernet 1 47
��;;_:,� w
Static NAT translates both the source address and destination address.
3.
You can use the hostname as the IKE ID. The hostname will be used to verify the device's identity.
Objectives
We Will Discuss:
A troubleshooting. methodology;
Logging, traceoptions and packet capture configurations
Traffic flow analysis; and
Common IP Security (IPsec) issues and their identification.
� Troubleshooting Methodology
• Troubleshooting Tools
• Identifying I Psec Issues
{ti;;"" �- (w=m.,;;·�""�0v)F
-�
etN.i..�. ln,:!Mt�111$·M<i, Ul:.lfilmffWol'ldwil:le Education Services ""''" Jun;per net I 3
� """ -::...._�s--
Troubleshooting Methodology
The slide lists the topics we will discuss. We discuss the highlighted topic first.
Troubleshooting Overview
• Troubleshooting:
• The ability to identify the root cause of a problem impacting
the network
• The ability to identify the root cause of any deviation from
the normal or expected behavior of a network
Troubleshooting Defined
The purpose of troubleshooting is to identify the root cause of an issue.
Frequently, troubleshooting is thought of only as it applies to tracking down the root cause of a
clearly identifiable problem, generally in terms of the impact it has on a network or a user's ability to
use the network. In reality, it can extend beyond that simple definition to include searching for the
root cause of any deviation from the normal or expected behavior.
When problems do occur, or when the behavior of a network varies from the normal or expected
behavior, identifying the root cause becomes necessary to resolve the issue and eliminate the
negative impact. Additionally, in a production network, doing so in a manner that introduces the least
disruption possible is important.
• Process-based methodology:
• Learnable
• Repeatable
• Can be used when dealing within any of these elements of a
device running the Junos OS:
• Chassis
• Control plane
• Interfaces and circuits
• Data plane
J.Jl:Jf;'l�
-sc � s_,fil,V»=°"*©°fo �
A Process-Based Methodology
The art of troubleshooting, is not an art at alL But rather a learnable, repeatable, process-based
methodology.
Two individuals working with the same sets of tools and a common symptom might approach the act
of fault analysis in completely different ways. For example, one person might always start with visual
inspection while another opts to begin with interface loopback tests. In the end, stating that one
approach is better than another is difficult, assuming that both individuals arrive at a similar
conclusion, in a similar amount of time with similar levels of disruption.
Although many different approaches to troubleshooting exist, certain fundamental elements are
involved in any sound troubleshooting methodology. Experienced technical engineers likely already
employ many of these techniques, intentionally or otherwise.
• Troubleshooting steps:
• Define success
• Isolate the component preventing success
- Define
Success
]
• Characterize
• Hypothesize
• Predict
• Test and experiment
• Identify a solution - Identify
Solution
J
CCJ�nfiguration Errors
• Configuration:
• Most plausible in new setup or with recent changes
• Use show systern commit to check for recent changes
• Use show compare to display differences
• Remember to check all devices that could introduce a problem
• Eliminate the control plane as a possibility before focusing
on the data plane
• When configuration errors are suspected. it is OK to quickly
glance at configuration. but rely on operational mode
commands to isolate errors
• The human brain sees what it expects to see
Configuration Errors
Configuration issues are the most likely cause of problems in new setups. They are also the most
probable cause of problems within the control plane. Problems in the control plane can even occur
because changes were made to the configuration of another device within the environment.
The Junos operating system has built-in sanity checks to ensure that all configuration entries are
valid. In some cases, they can also check for completeness, such as ensuring that a referenced
policy exists. This process is different from checking for accuracy because no automated way exists
to check a configuration against intent.
It is common practice to jump directly to viewing the configuration when configuration errors are
suspected. This process is not troubleshooting! It does not guarantee that you will be one step closer
to finding the root cause of an issue. It is okay to take a quick glance at a configuration to see if the
configuration error is readily apparent. However, be wary of spending a lot of time looking at a
configuration for errors, because configurations can be quite long and complex. Any benefit to be
achieved from looking at a configuration is further frustrated because the human brain tends to see
that which it expects to see. It is a much better practice to rely on the output of operational mode
commands when trying to isolate configuration errors.
Hardware Errors
• Hardware:
• Plausible in new out-of-box setups
• Plausible if new problems show up in established networks
• Can be a delayed effect from improper handling
• Alarms, LEDs, and log files, along with operational mode
command output all prove helpful in troubleshooting
hardware issues
• Try moving the problem
• Generally eliminate hardware as a possibility before
progressing on to software
Hardware Errors
Hardware is a plausible cause of issues that appear in established environments where
configuration is not suspect. It is also possible in new setups, or anytime that hardware has been
moved or relocated-particularly if proper handling techniques were not used.
Always use appropriate handling techniques when working with hardware including proper grounding
and other electrical static discharge (ESD) precautions, because even the slightest electrical influx
can damage the fine traces used in today's electronic equipment. This damage is not always
immediately evident-but it could weaken a trace and could contribute to a future failure.
Several tools are available when troubleshooting hardware, including alarms, LEDs, various log files
and operational mode command output.
Another very useful tactic when troubleshooting hardware is to attempt to move the problem. By
relocating hardware within a device or between devices, it is often possible to identify the problem
component. Remember to take appropriate precautions when a possibility of impacting production
traffic exists.
Because hardware issues are more easily identified than software issues and more likely to occur in
established operating environments, it is generally more efficient to eliminate hardware as a root
cause before proceeding to troubleshoot software.
<
1'
Software Errors
• Software
• Plausible in new setups. with recent Junos OS upgrades, or
when using new features
• View version and last Junos OS change
show version detail
show system software detail
file list /var/sw/pkg detail I match rollback
• Check online resources for known issues
• Check release notes
www.juniper.net;techpubs/software/junos/
• Searcl1 using keyword search-requires login
www.juniper.net;support (link: Junos Defect Search)
Software Errors
Like configuration issues, software issues are not as likely to cause random failures in established
functional environments. They are more likely to appear with changes, either to the operating
system, or with the utilization of new features. Software is generally suspect once hardware has
been eliminated as a probable cause.
If software errors are suspected, check online references for known issues.
If you are not running the latest version of code, be sure to check the latest release to see if an issue
you are experiencing has been identified and resolved. If an issue is identified in the latest release,
remember to proceed using the normal upgrade procedures including testing the new code in a lab
setting specific to your environment. Bypassing proper testing in a rush to resolve an issue can lead
to different and possibly more disruptive issues.
SCJ,ftware Troubleshooting
Hardwar e Is OK
Display Running
show system processes
Processes show system connections
file show /etc/services
D etermin eWhether
show system core-dumps
�
Co
F' I ?
�-···········• co_ r_ e _F_il es
_ _AI_ e_P_r _es_e_n_ t__.
.....
file list /var/tmp/*core*
file list /var/crash/*cor,�*
• Tiroubleshooting Methodology
7 Troubleshooting Tools
• Identifying IPsec Issues
�= ,.�-,,,,,._, �=
""}-'iJ JLJ!i}l��
,<
@ rNa1worl<>, rne Alf ri�lrn,;e,,,.d • ide Education Se1Vices ..,,,., 1uniper na1 J 13
-1'.::��
Troubleshooting Tools
The slide highlights the topic we discuss next.
host 10.0.0.1 {
1securityj notice;
match IDP;
source-address 192.168.0.1;
stream collector2
host {
10.0.0.2;
port 1514;
No!.,oifts,fu.(AlFrt$11t�rM�� �� lllllfuuilf-%
�--
fl lf!�dtlwide EducationSer;lces
� -
..,,.,., 1un,per n<l I 17
Default Logs
By default, Junos security devices maintain several daemon logs representing various security
services. To save resources, many of the default logs only log a minimal amount of information. Most
of the default security services Jogs can be enhanced through the configuration of traceoptions.
The slide displays a few of the common security services daemon Jogs as well as an example output
of the j srpd Jog, which houses information regarding high availability chassis clustering.
Traceoptions Overview
Flow Traceoptions
• Use to perform detailed analysis of traffic flows
through Junos security device
• Configuration example
[edit security flow]
user@srx# show
traceo ptions {
file file-name;
flag basic-datapath;
packet-filter filter-name
source-prefix source-address/mask;
destination-prefix destination-address/mask;
source-port source-port;
destination-port destination-port;
• Traceoptions configuration
[edit security flow traceoptions]
use r@s r:x# show
file flow"tra ce;
flag basic-datapath;
packet-filter MatchTraffic
source-prefix 1.1.1. 0/24;
destination-prefix 1.1.1.30/32;
packet-filter MatchTrafficReverse {
source-prefix 192.168.224.30/32;
destination-prefix 192.168.224.3/32;
The IPID of the packet shows 885. which is useful for comparing packets across
multiple capture points. (For example. viewing packet on originating device.
SRX device. and destination device to make sure the packet arrives).
l�T_ h_ i_s p_ a_ ck
_ _et_ a
_ _niv
·_ _ e_d_ o_n�po_r t_ fe
_ _-_O_i0_;_·1._ o�. ����������������
Feb 12 16:22:22 16:22:21.1100315:CID-0:RT: fe-0/0/7.0:1.1.1.100/57650-
>1.1.1.30/3389, tcp, flag 2 syn
I
448
No existing session is found in the table so the Junos OS begins first path process.
The route lookup points out the interface ge-0/0/0.0 with a next hop that is the
destination on the attached 192.168.224.0/24 network.
The Junos OS performs a policy lookup that shows that the destination zone on
ge-0/0/0.0 is trust. and the packet arrived on fe-0/0/7.0 in the untrust zone.
- - erved.�,': ;";, ,
©W13Junip•rN•tw•ro, Inc. "11 rights ,.�
"�-�
Worldwide Education Services
.
WW\"'J
The IPID of the packet show s as 5015.which is useful for comparingpackets acro s
:J
multiple capture points (for example.viewing packet on the originating device, on the
SRX device .and on the destination device to make sure the packet arrives).
Feb 4 16:21:02 16:21:00.1872004:CID-0:RT:packet [48] ipid = 5015, @423d7e9e
Feb 4 16:21:02 16:21:00.1872004:CID-0:RT:---- flow_process_pkt: (thd 1):
flow_ctxt type 13, common flag OxO, rnbuf Ox423d7d00
I is
_ _ t _ a_ r_r_ive
�T_h_ _ _p_a_cke _d_ _o_n_p_o_r _t _fe_-_o;_ o_;_-_r._o _.________________________________ ::===J
Feb 4 16:21:02 16:21:00.1872004:CID-0:RT: flow process pak fast ifl 72 in_ifp
fe-0/0/7.O
The .Junos OS performs a packet lookup with the previous information. where
sa = 8ource address. da =destination address, sp = so urce port. dp =destination port.
proto = protocol. and tok = token.
Feb 4 16:21:02 16:21:00.1872004:CID-0:RT: find flow: table Ox5258d7b0, hash
17008(0x ffff), sa 1.1.1.100, da 1.1.1.30, sp 51303, dp 3389, proto 6, tok
448
l The .Junos OS is unable to find an existing session and creates a new one.
, ru � - =,q ,
. e!,.•!'l!S: nmAii,rft11!•"' Md ·;::;�ITT� Worldwide Education Services "w" iunlper not J 29
"�-�es �xo=x=
TheJunos OS displays the source NAT pool used for this session.
TheJunos OS uses DIP id 2/0. The term DIP is a legacy ScreenOS term. The log shows
that the Junos OS is translating the source from 1.1.1.100 (source port 51303) to
192.168.224.3 (source port 48810). In this example. translation is needed because
the destination host 192.168.224.30 does not know about the 1.1.1.0/24 network.
Feb 4 16:21:02 16:21:00.1872004:CID-0:RT: dip id = 2/0, 1.1.1.100/51303-
>192.168.224.3/48810
The Ju nos OS matches the flow to policy 9 and determines other services processing is
I
not applicable to this flow.
Feb 4 16:21:02 16:21:00.1872004:CID-0:RT:policy is NULL (wx/pim scenario)
Feb 4 16:21:02 16:21:00.1872004:CID-0:RT:sm flow interest check: app_id 0,
policy 9, app_svc_en O, flags Ox2. not interested
Feb 4 16:21:02 16:21:00.1872004:CID-0:RT:sm flow interest check: app_id 1,
policy 9, app_svc_en O, flags Ox2. not interested
Feb 4 16:21:02 16:21:00.1872004:CID-0:RT:flow _first_service_lookup():
natp(Ox51ee4680): app_id, 0(0).
Feb 4 16:21:02 16:21:00.1872004:CID-0:RT: service lookup identified service 0.
-fillP€f;�\,Vo�dwideEducatio11Services ww..,1unipernet i 33
Next. we take a look at the reverse traffic flow. The trace shows that traffic arrives from
192.168.224.30 with a source port 3389. and is destined to our translated interface I
address 192.168.224.3 with a destination port 48810.
4:,� ._,;t"',.,J�
Worfdwide Education Services
-,,,/'-
www I
�Junos OS performs NAT translation and buffers the packet to be sent toward its
�:ination.
• Questions to ask:
• Is the packet arriving on the SRX device?
• Is the packet being blocked by a screen?
• Is the packet host-inbound traffic?
• Is the session asymmetric?
• Does the packet belong to an existing session?
• Is the packet arriving on the correct interface and zone?
• Is the correct forwarding path being chosen?
• Is the correct security policy being invoked?
-�fl
• What is the action on the policy?
• Is the correct NAT rule being applied?
f: �orldwideEducatlonServlces wwwJ
• •
JU8i'i'Je( "'""' Juniper not
@ rNe!worl<5, !no.All rljhh r.:erued
���- Worldwide
--
Education Services I 37
Note that the sample action can also be applied directly under an interface to capture all traffic on
a particular interface.
• Troubleshooting Methodology
• Troubleshooting Tools
�Identifying IPsec Issues
Q •
IPsec Troubleshooting
Troubleshooting IPsec virtual private networks (VPNs) is a common scenario. Due to the standard's
loose definitions of implementations, various vendors implement components such as negotiating
proxy IDs in different manners. A lot of values must also match on both peers. This situation can be
daunting when both endpoints reside in different administrative domains without full visibility of the
peer's configuration.
IP:sec Logging
<>.
• Possible causes:
• Incorrect peer address
• Mismatched peer ID type
• Incorrect peer ID
• Possible resolutions:
• Confirm local device has correct peer address
• Confirm peer has IKE ID type of IP address
• Possible causes:
• Usually a mismatched pre-shared key
• Possible resolutions:
• Confirm pre-shared keys match on both sides
• Possible causes:
• Usually a phase two proposal mismatch
• Possible resolutions:
• Confirm phase two proposals match on both peers
G• r Network,, lno:AII rll!h!• ,.,;;;.d, -. ·2· , JU[:) i,r�Worltiwide Educatio 11 Services """ )Un ,per net I 47
• Possible causes:
• Proxy ID mismatch
• Possible resolutions:
• Confirm proxy IDs match for the peers
Summary
• In this content, we:
·• Presented a troubleshooting methodology
·• Configured logs, traces and packet captures
·• Analyzed traffic flows
·• Identified common IPsec issues
We Discussed:
A methodology for troubleshooting;
The configuration of logs, traces, and packet captures;
Traffic flow analysis; and
Common IPsec VPN issues.
Review Questions
W�_rldwideEducationServlces
-��- +,J
Review Questions
1.
2.
3.
4.
Objectives
• After successfully completing this content, you will be
able to:
• Describe the different SRX platforms
• Explain SRX hardware components and traffic flows
• Implement various SRX interface types
We Will Discuss:
The different SRX platforms;
SRX hardware components and traffic flows; and
SRX interface types.
�"" "W.
"'Ne!,,orks,lne.Allrl�:rost>Wd. JUnm]:WorldwideEducationServices
,:
ww•o,,n,pe,nel I 3
� " o.s®1t0e "" -
Current Trends
• The current trends:
• As boundaries of networks become virtual, so do the
requirements of network edge devices
• The functions of a router and a firewall are collapsing
• The network edge requires more protection
• The hardware is now more capable
Current Trends
As boundaries of networks are becoming less clear, so are the requirements of network edge
devices. More and more enterprises are interconnecting themselves through an ISP's virtual cloud
by using IP. The Internet has created possibilities and opportunities for businesses and marl<ets, and
it has erased the concept of distance. With the Internet, however, came network vulnerabilities.
Traditionally, routers have been positioned on the edge of an enterprise network and provided very
basic network security such as stateless firewall filters. Network administrators became us,"d to
relying on separate firewall devices positioned within enterprise DMZs. The consolidation o·f these
functions at the network edge improves costs, reduces management overhead, and increases
operational simplicity.
A l\jew Perspective
Branch Office
·�
CTSRX210
A New Perspective
The graphic on the slide illustrates how a device with strong routing and firewall features can be
positioned at network boundaries. Remote offices can deploy SRX Series branch platforms running
the Junos OS to provide both routing and security features.
The SRX Series Services Gateway at the enterprise headquarters in this example also provides
routing and security in a high-density, modular chassis. The Dynamic Services Architecture allows
SRX Series Services Gateways to leverage new services with appropriate processing capabilities
without sacrificing overall system performance. SRX Series Services Gateways are next-generation
systems designed to meet the network and security requirements for the enterprise and service
provider infrastructure, and facilitate data center consolidation, rapid managed services
deployments, and security services aggregation.
SRX100 SRX240
SRX650
�It::.•
--:_; �
SRX210
SRX220
• Components:
• Multicore "System-on-a-chip" network processing unit
• PIM: Physical Interface Module
• SRE: Services and Routing Engine
• SRX650 only
Select models feature Content Security Accelerator for high-performance IPS and antivirus
performance. Junos security platforms for the branch integrate with other Juniper Networks security
products to deliver enterprise-wide unified access control and adaptive threat management. These
capabilities give security professionals powerful tools in the fight against cybercrime and data loss.
REG EX
Content .t. USB
Processor Multiple Core USB Hub
1 Ports
Processor
Serial
Console
Ethernet Switch
On board Mini-PIM
Interfaces Slots
SJfXGSO Hardware
• SRX650 hardware provides additional features
• Hardware-based separation of control and data planes
• Power redundancy
Multi-use
processing slot
(future use)
SRX650 Hardware
The SRX650 provides some additional features than the other branch SRX platforms. It contains
hardware separation of the control and data plane, whereas all other branch platforms use the
system-on-a-chip architecture. The SRX650 also provides Symmetric Multiprocessing-based data
forwarding.
The SRX650 provides power supply redundancy. It supports dual AC and DC power supplies with a
redundant configuration in the chassis. The AC and DC power supplies are hot-swappable. The two
power supply slots are located on the left side on the rear of the chassis. Slot O is on the bottom, and
slot 1 is on the top.
The Services and Routing Engine (SRE) module provides processing power for security services,
routing protocol processes, and other software processes that control the services gateway
interfaces, some of the chassis components, system management, and user access to the device.
The SRE slot is located on the rear of the chassis. The bottom slot is for SREO, and the top slot is
called a multi-use processing slot, which is not yet supported as of Junos OS revision 10.4R1.9.
For more information on specific Junos security platform branch models and hardware, visit the
Juniper Networks Web site for technical publications at http://www.juniper.neVtechpubs.
SRX1400
till
SRX3400 SRX3600
SRX5600 SRX5800
-,-
JIJlilmi Wo�ideEducationServices "'""'Jun,pernet 1 13
• Components:
• IOC: lnputjoutput card
• NPC: Network Processing Card
• SPC: Services Processing Card
• SCB: Switch Control Board
• RE: Routing Engine
,__,CFa
:.§
&'.
·o.o
c
FPGA FPGA NPU FPGA FPGA .-----
.s::::. ..______, SPIJ
.B
-�
Routing
Engjne
NP
..a
.Q
(1)
c
�
a.. &'.
'o.O
c
ro ..c
0
NP .B
"3!
IOC SPC
(1)
c
ro Switching Fabric Switching Fabric
a.. Second Routing
0
Routing Routing Engine for chassis
c cluster control link
+,J
The SPC processes network packets.The chassis must have at least one SPC to operate.
Performance is greatly increased when more than one SPC is installed. The addition of a new SPC
essentially results in a larger system that can perform many more tasks at a given time.
-·--
. �Ufi1�:. ".'Vorldwide Education Services "'w"' J
Ingress
pac;ket
�
Egress
packet
Varies by platform
...
IDP. NAT. and routing
Network ;
j control Processing 1
Olngyess :: �� ::
packet : :
: :
:: ____,.......
----llo.... ____,.......
----llo.... : __,........
----llo....
0E�ess
packet
.:. :.
: Services
Input/output ..............•.....................................
Integrated in SRX5000 IOC :
•
Proce:,.sing
cards 0CoS and shaping Cards
• Oversubscription
-·
, Input/output
cards @Flow lookup. policing. @Services FW. VPN.
Olngress and Cos IDP. NAT. and routing
·-
packet ............................................................................................
Network Services
Processing Processing
0Egress
packet
-
System and
lnput;output cards
nte ated in.NSCP ;
-.....����-���-����'.��---·················I gr _
SPC#1
8
CPa
FPGA FPGA NPU
c: SPU
IOC#1 0
(.)
SPC#1
.Q
@)
IOC#2 NPC#2 SPC#2
@
CP
c
NPU
SPU
IOC#1
(,)
0 NPC#1 SPC#1
SPU
".
Ingress
Packet CP
NP
8-8
IOC SPC
8-8
Egress SPU
Packet
IOC SPC
� J'LJ(;llDi:> ;Jt':Jit®
r.. Worldwide
�!. � Education Services """ ,un,per net 1 31
c,-
-�
Distributed Session Lookup with NP Bundle
iNPBuncii'er
--....
Olng)"ess I I
...
packe
0Egriess
packet
IOCs SPC
NP Bundling Example
The slide demonstrates traffic flow with an NP bundle configuration on four physical interfaces.
Remember, one interface is always tied to one NP. The ingress interface forwards a packet to its
associated NP. The ingress NP becomes the master NP for the session flow. After the master NP
receives the packet, it parses the IP packet header and generates a hash value. The master NP is
aware of helper NPs to use for session lookups. The master NP looks up the helper NP using the
hash value, and then forwards the packet to the helper NP. The helper NP receives the forwarded
packet and performs the usual task of flow lookup and packet parsing. The packet then follows the
normal traffic flow through the SRX5000. The NPU sends the packet to the CP. The CP selects the
SPU to set up the session for the packet, and it sends the packet to that SPU. The SPU processes the
packet and sends it to the egress NPU for transmission out the egress interface.
NP Bundling Configuration
[edit interface pie-set Bundlel]
user@srx# show
interface xe-1/0/0; Master NP
interface xe-1/1/0; Master NP
fpc 1 {
pie O; Master NP and helper NP to xe-1/1/0
pie l; Master NP and helper NP to xe-1/0/0
fpc 2 {
pie O; Helper NP
pie l; Helper NP
NP Bundling Configuration
The slide shows the command-line interface (CU) configuration for the NP bundle example. The
pie-set command is used to create the NP bundle. In this case, we named the NP bundle
Bundle 1. The next step is to configure interfaces to belong to the bundle. You must specify both the
FPC and PIC locations of all interfaces to be used in the NP bundle. In this case, we place both PICO
and PIC 1 of FPCs 1 and 2 in the NP bundle, but we only specify interfaces xe-1/ o / o and
xe-1/1/ o as belonging to the bundle. Only incoming traffic on interfaces xe-1/ o / o and
xe-1/1/0 are going to participate in the NP bundle. The assigned NPs for each of these interfaces
become the master NPs for the traffic flow, and all other NPs in the bundle are used as helper NPs
for the traffic flow.
SRX Interfaces
The slide highlights the topic we will discuss next.
-
- -
-:-CJ�
�
.- C"l •
D!JL Interfaces
• ADSL2/2+
• Asymmetric data transfer
• Annex A and B support
• G.SHDSL
• Symmetric data transfer
• Annex A B, F. and G support
• VDSL2+
• ADSL backwards compatibility
• Annex A and M support
-·J•s,; ·-
��----- Worldwide Education Services
Ne!wor1<s.1n-. )l,ll!ltf>h,..,e,ve<!_,
.�JUnlEf!,
�- ' R- -
---c.--o,.;
"'"'"''""'Per net I 17
ADSL Interfaces
The different types of DSL interfaces available for use on the SRX210, SRX220, and SRX240 are
ADSL, G.SHDSL, and VDSL. The single-port ADSL2/2+ Mini-Pl Ms are used to provide asymmetric
digital subscriber line (ADSL) WAN connectivity. The Mini-Pl Ms support Annex A and Annex B
connection types. Annex A supports connections over plain old telephone service (POTS) and
Annex B supports connections over ISDN. The ADSL Mini-PIMs support the ADSL, ADSL2, and
ADSL2+ protocols, and allow for automatic configuration of the ADSL line by the digital subscriber
line access multiplexer (DSLAM), minimizing configuration.
G.SHDSL Interface
Symmetric high-speed DSL (SHDSL), also known as G.SHDSL, is part of the xDSL family of modem
technologies that provide faster data transmission over a single flat untwisted or twisted pair of
copper wires. The G.SHDSL interface provides the physical connection to DSL network media types
and supports SHDSL for data transfer between a single subscriber and a central office.
VDSL Interface
Very-high-bit-rate digital subscriber line (VDSL) technology is part of the xDSL family of modem
technologies, which provide faster data transmission over a single flat untwisted or twisted pair of
copper wires. The 1-Port VDSL2 supports Annex A and Annex M connections. The VDSL2 Mini-PIM
has backward compatibility with ADSL/ADSL2/ADSL2+.
ds 1-options
operating-mode auto;
}
unit O {
encapsulation atm-ppp-llc;
vci 8.35;
ppp-options {
chap {
default-chap-secret "$9 $Xr I7NbDj qmfzdb2 az U.mQFnCOIWB 7 ";
local-name alidcedsl;
passive;
}
family inet {
mtu 1450;
negotiate-address;
SE!rial Interface
• �:ey features
• Configurable clock rate
• Loopback diagnostics
• Automatically selects an operational mode based on DTE or
DCEcable
[edit]
user@srx# show interfaces
se-1/0/0 (
serial-options (
clock-rate rate;
clocking-mode dcelinternallloop;
Serial Interface
The single-port synchronous serial Mini-PIM interface is available for use on the SRX210, SRX220,
and SRX240. The interface provides the physical connection to serial network media types. The
interface forwards packets for processing while performing framing and line-speed signaling. Serial
WAN links are bidirectional links, and require very few control signals. In a basic serial setup, the
data circuit-terminating equipment (DCE) is responsible for establishing, maintaining, and
terminating a connection. A modem is a typical DCE device. A serial cable connects the DCE to a
telephony network where, ultimately, a link is established with data terminal equipment (DTE). The
serial Mini-PIM automatically selects an operational mode based on which cable type (DTE or DCE) is
connected. The serial interface also can perform loopback diagnostic testing. Loopback testing
allows you to verify the connectivity of a circuit. Ethernet, Tl and El interfaces can also perform
loopback diagnostic testing.
The slide shows the serial interface configuration options. The clock-rate specifies the interface
speed. The clocking-mode can be set to dee, internal, or loop. Loop clocking mode uses
the DC E's receive clock to clock data from the DCE to the DTE. Internal clocking mode, also known as
line timing, uses an internally generated clock. DCE clocking mode and loop clocking mode use
external clocks generated by the DCE.
T1 and E1 Interfaces
• Key features
• CSU/DSU
• Internal and external clocking
[edit]
user@srx# show interfaces
tl-0/0/0 {
dee;
encapsulation frame-relay;
tl- options {
line-encoding ami;
framing esf;
unit O {
dlci 141;
)
el-1/0/0
encapsulation cisco-hdlc;
el-options {
framing g704;
<>.
SRX650 GPIMs
• T1 and E1 GPIMs
SRX650
(8 PIM slots)
T1 and E1 GPIMs
A GPIM is a network interface card that installs in the front slots of the services gateway to provide
physical connections to a LAN or a WAN. The dual-port and quad-port T1/E1 GPIMs provide the
physical connection to T1 or E1 network media types, perform framing and line-speed signaling, and
include an integrated CSU/DSU. The T1 and E1 GPIMS are available in either dual-port or quad-port
modules. The SRX650 chassis can hold GPIMs that use more than one standard slot. It could be
double-high, single-wide, which uses two standard slots vertically, or it could be double-high,
double-wide, which uses two vertical and two horizontal slots for a total of four standard slots.
Because the GPIMs communicate with the backplane at various performance levels, you must install
them in the correct slots.
• CX111 Bridge
·• For use on all branch SRX Series
3G ExpressCard
The SRX210 has the added capability to use a third-generation (3G) wireless ExpressCard as a WAN
interface. The 3G ExpressCard can either be used as a backup or a primary WAN link supporting
Evolution-Data Optimiz�d (EV-DO), Code Division Multiple Access (CDMA), universal mobile
telecommunications system (UMTS), High-Speed Packet Access (HSPA), or Global System for Mobile
Communications (GSM) standards. The 3G ExpressCard is an ideal backup option for small branch
deployments with adequate 3G coverage. The SRX210 has a built-in 3G ExpressCard slot for single
device 3G connectivity. The 3G ExpressCard ships with an external antenna for improved
performance. The 3G wireless card is used as a backup interface by using a dialer interface. Only
when the primary interface is down will the dialer interface be enabled, triggering a connection to the
3G network.
CX111 Bridge
The CX1113G Cellular Broadband Data Bridge delivers simple and flexible cellular data connectivity
for small and large branch offices. It is the industry's first all Ethernet cable plant that does not
require a coaxial cable or an antenna for installation. The 3G Bridge supports 802.3af PoE for
additional ease of installation. The 3G Bridge integrates with all branch SRX platforms.
-
• Maintain connectivity if Ethernet WAN link goes down
@
SRX210 SRX210 dlO l
=········
[edit]
user@srx# show interfaces
ge-0/0/ 0 {
unit O {
backup-options {
interface dlO.O;
}
cl-0/0/8
modem-options
init-command- string ATS0=2;
}
dialer-options {
pool 1 priority 100;
dialer-options {
pool 1;
dial-stc ing !.J..J..;
activation-delay 60;
deactivation-delay 60;
dialer-option s
pool 1;
dial-string 777;
watch-list {
10 . 0 . 0 . 0/ B;
Summary
• In this content, we:
• Described the different SRX platforms
• Explained SRX hardware components and traffic flows
• Implemented the various SRX interface types
We Discussed:
Different SRX platforms;
SRX hardware components and traffic flows; and
SRX interface types.
Review Questions
Review Questions
1.
2.
3.
3G.................................................................................... third-generation
ACL................................................................................. access control list
ADSL................................................................... asymmetric digital subscriber line
AFTR.................................................................... Address Family Transition Router
AH............................................................................... authentication header
ALG.......................................................................... Application Layer Gateway
ARP......................................................................... Address Resolution Protocol
ASC........................................................................... application system cache
BFD............................................................ Bidirectional Forwarding Detection protocol
BGP ........................................................................... Border Gateway Protocol
CA.................................................................................. certificate authority
CCC..... ........................................................................... circuit cross-connect
CDMA...................................................................... Code Division Multiple Access
CE...... ................................................................................ customer edge
CFM .........................................................................common form-factor module
CGN .................................................................................. carrier-grade NAT
CHAP ........................................................ Challenge Handshake Authentication Protocol
CLI .............................................................................command-line interface
CMTS ....•.••................................................•.••...... cable modem termination system
Cos.......••••................................................•........................ class of service
CP.......••...••......................................................................... Central Point
CPE......••...••.......................................................... customer premises equipment
CPP............••...............................................•.............. Control Plane Processor
cps ....•.••.••..................................................•.•..••.••..... connections per second
CRL............................................................................ certificate revocation list
dcd .......••.••.................................................•................ device control process
DCE........•..•..................................................••... data circuit-terminating equipment
DDoS ......•....••...............................................•.......... distributed denial of service
DER ............••.••••....................................................Distinguished Encoding Rules
DFA.......•..•••••.•............................................•.........deterministic finite automation
DHCP .......................................................•........ Dynamic Host Configuration Protocol
DLCI ............•••...•......................................•.•.......... data-link connection identifier
DN ...............•................................................................ distinguished name
DNS .............•....•.......................................................... Domain Name System
DOCSIS........•••••••••.................................... Data over Cable System Interface Specifications
DoS.............•..................................................................... denial of service
DPD .......•....•.....•............................................................dead peer detection
DSCP .............................................................................. DiffServ code point
DSLAM............•.•.•.......................................... digital subscriber line access multiplexer
OS-Lite ....•...••........................................................................ dual-stack lite
DTE...........•••••..••........................................................ data terminal equipment
DVMRP.......................................................... Distance Vector Multicast Routing Protocol
ESD........•..•••.....•......................................................... electrostatic discharge
ESP...................................................................... Encapsulating Security Payload
EV-DO......•..•••.•...•....................................................... Evolution-Data Optimized
FBF..............•................................................•..•...........filter-based forwarding
FQDN ............•.••.•..................................................... fully qualified domain name
GB.....................••••.....•••.••.•.................................................... gigabyte
GDOI.............••••.•.................................................. Group Domain of Interpretation
GPIM......................•••.•••............................. Gigabit-Backplane Physical Interface Module
GRE .......................................................................generic routing encapsulation
GSM............................................................ Global System for Mobile Communications
GUI............................................................................. graphical user interface
HA.....................................................................................high availability
HSPA ...........••.•••....................................................... High-Speed Packet Access