Juniper SRX Branch系列防火墙配置管理手册 - 图文

更新时间:2023-12-04 15:05:01 阅读量: 教育文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

Juniper SRX Branch系列防火墙配置管理手册

王晓方

Juniper 系统工程师

Juniper Networks, Inc.

上海市淮海中路333号瑞安广场1102-1104室

邮编:200021 电话:61415000 http://www.juniper.net

第 1 页 共 52 页

目录

一、JUNOS操作系统介绍 ...............................................................................................3 1.1 层次化配置结构 ........................................................................................................3 1.2 JunOS配置管理 .........................................................................................................4 1.3 SRX主要配置内容.....................................................................................................4 二、SRX防火墙配置操作举例说明 .................................................................................5 2.1 初始安装 ..................................................................................................................5

2.1.1 设备登陆 .......................................................................................................5

2.1.2 设备恢复出厂介绍 .........................................................................................5 2.1.3 设置root用户口令 .......................................................................................5 2.1.4 设置远程登陆管理用户 ..................................................................................6 2.1.5 远程管理SRX相关配置 ..................................................................................6 2.2 配置操作实验拓扑 ....................................................................................................7 2.3 策略相关配置说明 ....................................................................................................7

2.3.1 策略地址对象定义 .........................................................................................8

2.3.2 策略服务对象定义 .........................................................................................8 2.3.3 策略时间调度对象定义 ..................................................................................8 2.3.4 策略配置举例 ................................................................................................9 2.4 地址转换 ................................................................................................................ 10

2.4.1 Interface based NAT 基于接口的源地址转换 ............................................. 10

2.4.2 Pool based Source NAT基于地址池的源地址转换 ....................................... 11 2.4.3 Pool base destination NAT基于地址池的目标地址转换 ............................ 12 2.4.4 Pool base Static NAT基于地址池的静态地址转换 ..................................... 13 2.5 IPSEC VPN .............................................................................................................. 13

2.5.1 基于路由的LAN TO LAN IPSEC VPN.............................................................. 14 2.5.2 基于策略的LAN TO LAN IPSEC VPN.............................................................. 15 2.5.3 基于Remote VPN 客户端拨号VPN ................................................................ 15 2.5.4 基于IPSEC动态VPN .................................................................................... 24 2.6 应用层网关ALG配置及说明................................................................................... 29 2.7 SRX Branch 系列JSRP HA高可用性配置及说明 ...................................................... 29 2.8 SRX Branch 系列IDP、UTM配置操作介绍 ............................................................. 33 2.9 SRX Branch 系列与UAC联动配置说明 ................................................................... 38 2.10 SRX Branch系列FLOW配置说明 .......................................................................... 42 2.11 SRX Branch系列SCREEN攻击防护配置说明 ......................................................... 43 2.12 SRX Branch系列J-WEB操作配置简要说明 ............................................................ 44 三、SRX防火墙常规操作与维护 ................................................................................... 50 3.2 3.3 3.4 3.5 3.6

设备关机 ............................................................................................................ 50 设备重启 ............................................................................................................ 50 操作系统升级 ..................................................................................................... 50 密码恢复 ............................................................................................................ 51 常用监控维护命令 .............................................................................................. 51

第 2 页 共 52 页

Juniper SRX Branch系列防火墙配置管理手册说明

SRX系列防火墙是Juniper公司基于JUNOS操作系统的安全系列产品,JUNOS集成了路由、交换、安全性和一系列丰富的网络服务。目前Juniper公司的全系列路由器产品、交换机产品和SRX安全产品均采用统一源代码的JUNOS操作系统,JUNOS是全球首款将转发与控制功能相隔离,并采用模块化软件架构的网络操作系统。JUNOS作为电信级产品的精髓是Juniper真正成功的基石,它让企业级产品同样具有电信级的不间断运营特性,更好的安全性和管理特性,JUNOS软件创新的分布式架构为高性能、高可用、高可扩展的网络奠定了基础。基于NP架构的SRX系列产品产品同时提供性能优异的防火墙、NAT、IPSEC、IPS、UTM等全系列安全功能,其安全功能主要来源于已被广泛证明的ScreenOS操作系统。

本文旨在为熟悉Netscreen防火墙ScreenOS操作系统的工程师提供SRX防火墙参考配置,以便于大家能够快速部署和维护SRX防火墙,文档介绍JUNOS操作系统,并参考ScreenOS配置介绍SRX防火墙配置方法,最后对SRX防火墙常规操作与维护做简要说明。

鉴于SRX系列防火墙低端系列与高端3K、5K系列在功能配置与包处理流程有所差异,本人主要以低端系列功能配置介绍为主,Branch系列型号目前包含:SRX100\\210\\240\\650将来会有新的产品加入到Branch家族,请随时关注官方网站动态,配置大同小异。

一、JUNOS操作系统介绍 1.1 层次化配置结构

JUNOS采用基于FreeBSD内核的软件模块化操作系统,支持CLI命令行和WEBUI两种接口配置方式,本文主要对CLI命令行方式进行配置说明。JUNOS CLI使用层次化配置结构,分为操作(operational)和配置(configure)两类模式,在操作模式下可对当前配置、设备运行状态、路由及会话表等状态进行查看及设备运维操作,并通过执行config或edit命令进入配置模式,在配置模式下可对各相关模块进行配置并能够执行操作模式下的所有命令(run)。在配置模式下JUNOS采用分层分级模块下配置结构,如下图所示,edit命令进入下一级配置(类似unix cd命令),exit命令退回上一级,top命令回到根级。

第 3 页 共 52 页

1.2 JunOS配置管理

JUNOS通过set语句进行配置,配置输入后并不会立即生效,而是作为候选配置(Candidate Config)等待管理员提交确认,管理员通过输入commit命令来提交配置,配置内容在通过SRX语法检查后才会生效,一旦commit通过后当前配置即成为有效配置(Active config)。另外,JUNOS允许执行commit命令时要求管理员对提交的配置进行两次确认,如执行commit confirmed 2命令要求管理员必须在输入此命令后2分钟内再次输入commit以确认提交,否则2分钟后配置将自动回退,这样可以避免远程配置变更时管理员失去对SRX的远程连接风险。

在执行commit命令前可通过配置模式下show命令查看当前候选配置(Candidate Config),在执行commit后配置模式下可通过run show config命令查看当前有效配置(Active config)。此外可通过执行show | compare比对候选配置和有效配置的差异。

SRX上由于配备大容量存储器,缺省按先后commit顺序自动保存50份有效配置,并可通过执行rolback和commit命令返回到以前配置(如rollback 0/commit可返回到前一commit配置);也可以直接通过执行save configname.conf手动保存当前配置,并执行load override configname.conf / commit调用前期手动保存的配置。执行load factory-default / commit命令可恢复到出厂缺省配置。

SRX可对模块化配置进行功能关闭与激活,如执行deactivate security nat/comit命令可使NAT相关配置不生效,并可通过执行activate security nat/commit使NAT配置再次生效。

SRX通过set语句来配置防火墙,通过delete语句来删除配置,如delete security nat和edit security nat / delete一样,均可删除security防火墙层级下所有NAT相关配置,删除配置和ScreenOS不同,配置过程中需加以留意。

1.3 SRX主要配置内容

部署SRX防火墙主要有以下几个方面需要进行配置:

System:主要是系统级内容配置,如主机名、管理员账号口令及权限、时钟时区、Syslog、SNMP、系统级开放的远程管理服务(如telnet)等内容。

Interface:接口相关配置内容。

Security: 是SRX防火墙的主要配置内容,安全相关部分内容全部在Security层级下完成配置,如NAT、Zone、Policy、Address-book、Ipsec、Screen、Idp、UTM等,可简单理解为ScreenOS防火墙安全相关内容都迁移至此配置层次下,除了Application自定义服务。

Application:自定义服务单独在此进行配置,配置内容与ScreenOS基本一致。

routing-options: 配置静态路由或router-id等系统全局路由属性配置。

第 4 页 共 52 页

二、SRX防火墙配置操作举例说明 2.1 初始安装

2.1.1 设备登陆

Console口(通用超级终端缺省配置)连接SRX,root用户登陆,密码为空<初始第一次登陆>

login: root Password:

--- JUNOS 9.5R1.8 built 2009-07-16 15:04:30 UTC root% cli /***进入操作模式***/ root>

root> configure

Entering configuration mode /***进入配置模式***/ [edit] Root#

2.1.2 设备恢复出厂介绍

首先根据上述操作进入到配置模式,执行下列命令:

root# load factory-default

warning: activating factory configuration /***系统激活出厂配置***/

恢复出厂后,必须立刻设置ROOT帐号密码<默认密码至少6位数:字母加数字>

root# set system root-authentication plain-text-password New password:

当设置完ROOT帐号密码以后,进行保存激活配置

root# commit commit complete

在此需要提醒配置操作员注意,系统恢复出厂后并不代表没有任何配置,系统缺省配置有Screen\\DHCP\\Policy等相关配置,你如果需要完整的删除,可以执行命令delete 删除相关配置。通过show 来查看系统是否还有遗留不需要的配置,可以一一进行删除,直到符合你的要求,然后再重新根据实际需求进行配置。

2.1.3 设置root用户口令

设置root用户口令

root# set system root-authentication plain-text-password root# new password : root123

root# retype new password: root123 密码将以密文方式显示

root# show system root-authentication

encrypted-password \TA

第 5 页 共 52 页

Policy配置:

set security policies from-zone trust to-zone untrust policy 1 match source-address pc-1 set security policies from-zone trust to-zone untrust policy 1 match destination-address any set security policies from-zone trust to-zone untrust policy 1 match application any set security policies from-zone trust to-zone untrust policy 1 then permit

上述配置定义Policy策略,允许Trust zone 10.1.2.2地址访问Untrust方向任何地址,根据前面的NAT配置,SRX在建立session时自动执行接口源地址转换。

2.4.2 Pool based Source NAT基于地址池的源地址转换

图片仅供参考,下列配置参考实验拓扑

NAT配置:

set security nat source pool pool-1 address 192.168.1.50 to 192.168.1.150 set security nat source rule-set 1 from zone trust

set security nat source rule-set 1 to zone untrust

set security nat source rule-set 1 rule rule1 match source-address 0.0.0.0/0 destination-address 0.0.0.0/0

set security nat source rule-set 1 rule rule1 then source-nat pool pool-1

set security nat proxy-arp interface ge-0/0/0 address 192.168.1.50 to 192.168.1.150

上述配置表示从trust方向(any)到untrust方向(any)访问时提供源地址转换,源地址池为pool1(192.168.1.50-192.168.1.150),同时fe-0/0/0接口为此pool IP提供ARP代理。需要注意的是:定义Pool时不需要与Zone及接口进行关联。配置proxy-arp目的是让返回包能够送达SRX,如果Pool与出接口IP不在同一子网,则对端设备需要配置指向fe-0/0/0接口的Pool地址路由。

Policy:

set security policies from-zone trust to-zone untrust policy 1 match source-address pc-1 set security policies from-zone trust to-zone untrust policy 1 match destination-address any set security policies from-zone trust to-zone untrust policy 1 match application any set security policies from-zone trust to-zone untrust policy 1 then permit

上述配置定义Policy策略,允许Trust zone 10.1.2.2地址访问Untrust方向任何地址,根据前面的NAT配置,SRX在建立session时自动执行源地址转换。

第 11 页 共 52 页

2.4.3 Pool base destination NAT基于地址池的目标地址转换

图片仅供参考,下列配置参考实验拓扑

NAT配置:

set security nat destination pool 111 address 20.1.1.200/32 set security nat destination rule-set 1 from zone untrust

set security nat destination rule-set 1 rule 111 match source-address 0.0.0.0/0

set security nat destination rule-set 1 rule 111 match destination-address 192.168.1.150/32 set security nat destination rule-set 1 rule 111 then destination-nat pool 111

上述配置将外网any访问192.168.1.150地址映射到内网20.1.1.200地址,注意:定义的Dst Pool是内网真实IP地址,而不是映射前的公网地址。这点和Src-NAT Pool有所区别。

Policy:

set security policies from-zone trust to-zone untrust policy 1 match source-address any

set security policies from-zone trust to-zone untrust policy 1 match destination-address PC-1 set security policies from-zone trust to-zone untrust policy 1 match application any set security policies from-zone trust to-zone untrust policy 1 then permit

上述配置定义Policy策略,允许Untrust方向任何地址访问Trust方向PC-1:20.1.1.200,根据前面的NAT配置,公网访问192.168.1.150时,SRX自动执行到20.1.1.200的目的地址转换。

ScreenOS VIP功能对应的SRX Dst-nat配置:

set security nat destination pool 222 address 20.1.1.200/32 port 8080 set security nat destination rule-set 1 from zone untrust

set security nat destination rule-set 1 rule 111 match source-address 0.0.0.0/0

set security nat destination rule-set 1 rule 111 match destination-address 192.168.1.150/32 set security nat destination rule-set 1 rule 111 match destination-port 8080 set security nat destination rule-set 1 rule 111 then destination-nat pool 222

上述NAT配置定义:访问192.168.1.150地址8080端口映射至20.1.1.200地址8080端口,功能与ScreenOS VIP端口映射一致。

第 12 页 共 52 页

2.4.4 Pool base Static NAT基于地址池的静态地址转换

图片仅供参考,下列配置参考实验拓扑

NAT:

set security nat static rule-set static-nat from zone untrust

set security nat static rule-set static-nat rule rule1 match destination-address 192.168.1.150 set security nat static rule-set static-nat rule rule1 then static-nat prefix 20.1.1.200 Policy:

set security policies from-zone trust to-zone untrust policy 1 match source-address any set security policies from-zone trust to-zone untrust policy 1 match destination-address pc-1 set security policies from-zone trust to-zone untrust policy 1 match application any set security policies from-zone trust to-zone untrust policy 1 then permit

Static NAT概念与ScreenOS MIP一致,属于静态双向一对一NAT,上述配置表示访问192.168.1.150时转换为20.1.1.200,当20.1.1.200访问Internet时自动转换为192.168.1.150,并且优先级比其他类型NAT高。

2.5 IPSEC VPN

SRX IPSEC VPN支持Site-to-Site VPN 和基于NS-remote的拨号VPN以及基于IPSEC的动态VPN,访问方式通过WEB界面进行,和ScreenOS一样,site-to-site VPN也支持路由模式和Policy模式,在配置方面也和ScreenOS基本一致。SRX中的加密/验证算法在命名上和ScreenOS存在一些区别,配置过程中建议选择ike和ipsec的proposal为 standard模式,standard中包含SRX支持的全部加密/验证算法,只要对端设备支持其中任何一种即可。SRX中通道接口使用st0接口,对应ScreenOS中的tunnel虚拟接口。

本次将列举如下配置案例:

1、 基于策略的LAN TO LAN IPSEC VPN 2、 基于路由的LAN TO LAN IPSEC VPN 3、 基于REMOTE VPN客户端拨号VPN 4、 基于IPSEC动态VPN<通过WEB界面>

注意在REMOTE VPN客户端拨号VPN中我们将列举JUNIPER REMOTE VPN客户端和第三方ShrewSoft VPN Client,另外基于IPSEC动态VPN是通过WEB界面访问,初次登陆系统自动或人工下载一个JAVA客户端。

第 13 页 共 52 页

2.5.1 基于路由的LAN TO LAN IPSEC VPN

SRX配置:

下面是图中左侧SRX基于路由方式Site-to-site VPN配置:

set interfaces st0 unit 0 family inet address 1.1.1.1/24 set security zones security-zone untrust interfaces st0.0 set routing-options static route 172.16.1.0/24 next-hop st0.0

定义st0 tunnel接口地址/Zone及通过VPN通道到对端网络路由

set security ike policy ABC mode main

set security ike policy ABC proposal-set standard

set security ike policy ABC pre-shared-key ascii-text juniper

定义IKE Phase1 policy参数,main mode,standard proposal及预共享密钥方式

set security ike gateway gw1 ike-policy ABC

set security ike gateway gw1 address 10.1.1.254

set security ike gateway gw1 external-interface fe-0/0/2.0

定义IKE gaeway参数,预共享密钥认证,对端网关10.1.1.254,出接口fe-0/0/2(位于dmz zone)

set security ipsec policy AAA proposal-set standard set security ipsec vpn vpn1 bind-interface st0.0 set security ipsec vpn vpn1 ike gateway gw1 set security ipsec vpn vpn1 ike ipsec-policy AAA set security ipsec vpn vpn1 establish-tunnels immediately

定义ipsec Phase 2 VPN参数:standard proposal、与st0.0接口绑定,调用Phase 1 gw1 ike网关。

set security policies from-zone untrust to-zone trust policy vpn-policy match source-address any set security policies from-zone untrust to-zone trust policy vpn-policy match destination-address any set security policies from-zone untrust to-zone trust policy vpn-policy match application any set security policies from-zone untrust to-zone trust policy vpn-policy then permit

set security policies from-zone trust to-zone untrust policy vpn-policy match source-address any set security policies from-zone trust to-zone untrust policy vpn-policy match destination-address any set security policies from-zone trust to-zone untrust policy vpn-policy match application any set security policies from-zone trust to-zone untrust policy vpn-policy then permit

两端设备策略开启双向policy以允许VPN流量通过 SSG配置参考:

set ike gateway \address 10.1.1.1 Main outgoing-interface \preshare \sec-level standard

set vpn \set vpn \

set vpn \set interface tunnel.1 ip 1.1.1.2/24 set route 20.1.1.0/24 interface tunnel.1

set policy id 3 from \ \ set policy id 2 from \ \

第 14 页 共 52 页

SRX设备端监控VPN状态

SSG设备端监控VPN状态

2.5.2 基于策略的LAN TO LAN IPSEC VPN

要设置基于策略的LAN TO LAN IPSEC VPN通道,请在通道两端的安全设备上执行以下步骤: 1. 同样配置IKE\\IPSEC参数<指定对方的IP地址、指定加密方式等> 2. 不需要配置通道接口

3. 为每个站点间通过的 VPN 流量设置策略,注意此时需要在策略中调用VPN IKE通道,如下命令:

SRX设备策略配置:

root# set security policies from-zone srx-vpn to-zone trust policy vpn-policy then permit tunnel ipsec-vpn vpn1

root# set security policies from-zone trust to-zone srx-vpn policy vpn-policy then permit tunnel ipsec-vpn vpn1

SSG设备策略配置:

set policy id 3 from ssg-vpn to trust 20.1.1.0/24 172.16.1.0/24 any tunnel vpn abc set policy id 3 from trust to ssg-vpn 172.16.1.0/24 20.1.1.0/24 any tunnel vpn abc

特别提醒,基于策略的LAN TO LAN IPSEC VPN 在建立策略的时候,两端设备的双向策略源地址、目标地址、服务必须一致对应。

2.5.3 基于Remote VPN 客户端拨号VPN

为了能够体现其配置真实性、可观性、此次配置将采用真实环境进行配置演示,具体如下: 第一步:定义分配给VPN拨号用户的IP地址池

set access address-pool xauth-pool address-range low 30.1.1.1 第 15 页 共 52 页

set access address-pool xauth-pool address-range high 30.1.1.100 第二步:定义VPN拨号用户

set access profile xauth-users authentication-order password

set access profile xauth-users client test1 firewall-user password \set access profile xauth-users client test2 firewall-user password \第三步:定义IKE Proposal

set security ike proposal dialup-proposal authentication-method pre-shared-keys set security ike proposal dialup-proposal dh-group group2

set security ike proposal dialup-proposal authentication-algorithm sha1 set security ike proposal dialup-proposal encryption-algorithm aes-128-cbc 第四步:定义IPSEC Proposal

set security ipsec proposal dialup-proposal protocol esp

set security ipsec proposal dialup-proposal authentication-algorithm hmac-sha1-96 set security ipsec proposal dialup-proposal encryption-algorithm aes-128-cbc 第五步: 定义IKE policy

set security ike policy dialup-policy mode aggressive

set security ike policy dialup-policy proposals dialup-proposal

set security ike policy dialup-policy pre-shared-key ascii-text “JUNIPER-WXF1987” 第六步:定义IKE gateway

set security ike gateway dialup-ike ike-policy dialup-policy set security ike gateway dialup-ike dynamic hostname juniper set security ike gateway dialup-ike dynamic connections-limit 100 set security ike gateway dialup-ike dynamic ike-user-type shared-ike-id

set security ike gateway dialup-ike external-interface ge-0/0/8.0 选择VPN接受从那个接口拨进来 set security ike gateway dialup-ike xauth access-profile xauth-users 第七步:定义Ipsec policy

set security ipsec policy dialup-policy2 proposals dialup-proposal set security ipsec policy ipsec-pol perfect-forward-secrecy keys group2 set security ipsec policy ipsec-pol proposals phase2-prop 第八步:定义ipsev vpn

set security ipsec vpn dialup-vpn ike gateway dialup-ike

set security ipsec vpn dialup-vpn ike ipsec-policy dialup-policy2 set security ipsec vpn dialup-vpn establish-tunnels on-traffic 第九步:定义VPN策略<内部允许访问的资源>

set security policies from-zone untrust to-zone dmz policy dialup-vpn match source-address any set security policies from-zone untrust to-zone dmz policy dialup-vpn match destination-address 10.0.100.0/24-vlan_3

set security policies from-zone untrust to-zone dmz policy dialup-vpn match destination-address 10.0.110.0/24-vlan_4

set security policies from-zone untrust to-zone dmz policy dialup-vpn match destination-address 10.0.130.0/24-vlan_5

set security policies from-zone untrust to-zone dmz policy dialup-vpn match destination-address 10.0.140.0/24-vlan6

set security policies from-zone untrust to-zone dmz policy dialup-vpn match application any

第 16 页 共 52 页

set security policies from-zone untrust to-zone dmz policy dialup-vpn then permit tunnel ipsec-vpn dialup-vpn

set security policies from-zone untrust to-zone dmz policy dialup-vpn then log session-init set security policies from-zone untrust to-zone dmz policy dialup-vpn then log session-close

至此ipsec 拨号VPN设备配置完成。

接下来我们将演示如何配置Juniper Remote vpn 客户端 如何配置第三方ShrewSoft VPN Client

首先我们介绍Juniper Remote vpn 客户端配置,参考如下截图配置<依据上述配置进行>:

第 17 页 共 52 页

第 18 页 共 52 页

第 19 页 共 52 页

客户端查看连接状态如上,设备端查看连接状态如下:

接下来我们介绍ShrewSoft VPN Client客户端配置,参考如下截图配置<依据上述配置进行>: 软件下载地址:http://www.shrewsoft.com/download

Please Select Your Download

? ?

VPN Client For Windows VPN Client For Linux and BSD

第 20 页 共 52 页

第 26 页 共 52 页

第 27 页 共 52 页

至此客户端配置完成,下面介绍设备端动态VPN状态

第 28 页 共 52 页

2.6 应用层网关ALG配置及说明

SRX中自定义服务及ALG使用方法与ScreenOS保持一致,系统缺省开启FTP ALG,为TCP 21服务提供FTP应用ALG。自定义服务如果属于FTP类应用,需要将此自定义服务(非TCP 21端口)与FTP应用进行关联。下面举例定义一个FTP类服务ftp-test,使用目的端口为TCP 2100,服务超时时间为3600秒,并将此自定义服务与FTP应用关联(ALG),系统将识别此服务为FTP应用并开启FTP ALG来处理该应用流量。

set applications application ftp-test protocol tcp destination-port 2100 inactivity-timeout 3600 set applications application ftp-test application-protocol ftp Branch 系统防火墙ALG状态如下(10.1R2.8版本) root# run show security alg status <默认配置下> ALG Status :

DNS : Enabled FTP : Enable H323 : Enabled MGCP : Enabled MSRPC : Enabled PPTP : Enabled RSH : Enabled RTSP : Enabled SCCP : Enabled SIP : Enabled SQL : Enabled SUNRPC : Enabled TALK : Enabled TFTP : Enabled

建议不需要使用到的ALG可以关闭,以免影响正常应用,但是如果应用工作在NAT模式下则建议开启。

2.7 SRX Branch 系列JSRP HA高可用性配置及说明

JSRP是Juniper SRX的私有HA协议,对应ScreenOS的NSRP双机集群协议,支持A/P和A/A模式,JSRP对ScreenOS NSRP协议和JUNOS Cluster集群技术进行了整合集成,熟悉NSRP协议有助于对JSRP协议的理解。JSRP和NSRP最大的区别在于JSRP是完全意义上的Cluster概念,两台设备完全当作一台设备来看待,两台设备的接口板卡顺序编号、运维变更将对两台设备同时进行操作,无需额外执行ScreenOS的配置和会话同步等操作,而ScreenOS NSRP可看作在同步配置和动态对象(session)基础上独立运行的两台单独设备。

JSRP要求两台设备在软件版本、硬件型号、板卡数量、插槽位置及端口使用方面严格一一对应。由于SRX 是转发与控制层面完全分裂架构,JSRP需要控制层面 (配置同步)和数据层面(Session同步)两个平面的互联,高端系列3K\\5K建议控制和数据层面互联链路使用光纤链路直连(部分平台强制要求光纤链路直连)。

在Branch系列则控制平面连接、带外管理接口必须使用设备规定的接口,而数据平面可以使用任何一个以太网口进行互连。

下面将介绍SRX Branch系列防火墙运行HA情况下,控制平面、带外接口连接示意图:

You must use the following ports to form the control link on the SRX Series branch

你必须使用下面设备指定端口来作为HA控制信号端口进行互连 设备型号:

■ ■ ■ ■

For SRX100 devices, connect the fe-0/0/7 port to the fe-1/0/7 port For SRX210 devices, connect the fe-0/0/7 port to the fe-2/0/7 port For SRX240 devices, connect the ge-0/0/1 port to the ge-5/0/1 port For SRX650 devices, connect the ge-0/0/1 port to the ge-9/0/1 port

SRX650<标准配置4个千兆以太网RJ-45接口>SRX650平台如果需要部署HA结构,则必须增加数据接口板卡<因为HA控制平面、数据平面和带外管理接口被占用了至少3个接口>

第 29 页 共 52 页

SRX240<标准配置16个千兆以太网RJ-45接口>

SRX210<标准配置2个千兆以太网RJ-45接口和6个百兆以太网RJ-45接口>

SRX100<标准配置8个百兆以太网RJ-45接口>

第 30 页 共 52 页

SRX Branch系列接口规范

JSRP接口命名方式采用多个机箱抽象成一个逻辑机箱之后再统一为各个槽位进行编号,如上所示的每个机箱有几个业务槽位,节点0槽位号从0开始编号,节点1槽位号从节点0后面开始往后编。

整个JSRP配置过程包括如下7个步骤 ? ? ? ? ?

配置Cluster id和Node id (对应ScreenOS NSRP 的cluster id并需手工指定设备使用节点id) 指定Control Port (指定控制层面使用接口,用于配置同步及心跳) 指定Fabric Link Port (指定数据层面使用接口,主要session等RTO同步) 配置Redundancy Group (类似NSRP的VSD group,优先级与抢占等配置)

每个机箱的个性化配置 (单机无需同步的个性化配置,如主机名、带外管理口IP地址等) 配置Redundant Ethernet Interface (类似NSRP的Redundant冗余接口)

配置Interface Monitoring (类似NSRP interface monitor,是RG数据层面切换依据)

?

?

第 31 页 共 52 页

SRX JSRP配置样例: ? 配置Cluster id和Node id

SRX-A>set chassis cluster cluster-id 1 node 0 reboot(注意该命令需在operational模式下输入,Cluster ID取值范围为1 – 15,当Cluster ID = 0时将unsets the cluster) SRX-B>set chassis cluster cluster-id 1 node 1 reboot

? ?

指定Control Port(SRX Branch系列,则无需指定,默认规定采用某一个接口作为控制接口,参考上一节): 指定Fabric Link Port

set interfaces fab0 fabric-options member-interfaces ge-0/0/2 set interfaces fab1 fabric-options member-interfaces ge-5/0/2

注:Fabric Link中的Fab0固定用于node 0,Fab1固定用于node 1 ?

配置Redundancy Group

RG0固定用于主控板RE切换,RG1以后用于redundant interface切换,RE切换独立于接口切换

set chassis cluster reth-count 10 (指定整个Cluster中redundant ethernet interface最多数量) set chassis cluster redundancy-group 0 node 0 priority 200 (高值优先,与NSRP相反) set chassis cluster redundancy-group 0 node 1 priority 100

set chassis cluster redundancy-group 1 node 0 priority 200 (高值优先,与NSRP相反) set chassis cluster redundancy-group 1 node 1 priority 100

?

每个机箱的个性化配置,便于对两台设备的区分与管理

set groups node0 system host-name SRX-A

set groups node0 interfaces fxp0 unit 0 family inet address 1.1.1.1/24 (带外网管口名称为fxp0,区

别ScreenOS的MGT口)

set groups node1 system host-name SRX-B

set groups node1 interfaces fxp0 unit 0 family inet address 1.1.1.2/24 set apply-groups ${node} (应用上述groups配置)

?

配置Redundant Ethernet Interface

Redundant Ethernet Interface类似ScreenOS里的redundant interface,只不过Redundant Ethernet interface是分布在不同的机箱上 (这一特性又类似ScreenOS 的VSI接口)。

Set interface ge-0/0/8 gigether-options redundant-parent reth0 (node 0的ge-0/0/8接口) Set interface ge-5/0/8 gigether-options redundant-parent reth0 (node 1的ge-0/0/8接口) Set interface reth0 redundant-ether-options redundancy-group 1 (reth0属于RG1) Set interface reth0 unit 0 family inet address 192.168.0.1/24

?

配置Interface Monitoring,被监控的接口Down掉后,RG1将自动进行主备切换(与ScreenOS类似),

Set cluster redundancy-group 1 interface-monitor ge-0/0/0 weight 255 Set cluster redundancy-group 1 interface-monitor ge-0/0/1 weight 255 Set cluster redundancy-group 1 interface-monitor ge-13/0/0 weight 255 Set cluster redundancy-group 1 interface-monitor ge-13/0/1 weight 255

?

JSRP维护命令 a) b)

手工切换JSRP Master,RG1 原backup将成为Master

root@srx240a> request chassis cluster failover redundancy-group 1 node 1

手工恢复JSRP状态,按照优先级重新确定主备关系(高值优先)

root@srx240b> request chassis cluster failover reset redundancy-group 1

c) d)

查看cluster interface

root@router> show chassis cluster interfaces

查看cluster 状态、节点状态、主备关系

第 32 页 共 52 页

lab@240a# run show chassis cluster status

e) f)

取消cluster配置

lab@Srx240a# set chassis cluster disable reboot

升级JSRP软件版本

SRX目前暂不支持软件在线升级(ISSU),升级过程会中断业务。 升级步骤如下:

1.升级node 0,注意不要重启系统 2.升级node 1,注意不要重启系统. 3.同时重启两个系统 g)

恢复处于disabled状态的node

当control port或fabric link出现故障时,为避免出现双master (split-brain)现象,JSRP会把出现故障前状态为secdonary的node设为disabled状态,即除了RE,其余部件都不工作。想要恢复必须reboot该node。2.8 WEB界面操作介绍2.9 Screen配置操作介绍

2.8 SRX Branch 系列IDP、UTM配置操作介绍

SRX Branch系列产品提供一整套统一威胁管理 (UTM) 服务,包括:入侵防御系统 (IPS)、防病毒、防垃圾邮件、通过内容过滤实现的网页过滤以及防信息泄露,从而保护您的网络,防止最新的内容威胁。特定型号的产品还具有内容安全加速器以提供高性能 IPS和防病毒性能。面向分支机构的 SRX 系列产品与其它的瞻博安全产品集成,从而提供企业级的统一接入控制和自适应威胁管理功能。这些功能为安全专家提供了与网络犯罪和数据丢失斗争的强大工具。

配置IDP、UTM功能之前,你首先需要知道你的设备是否购买了相关功能的license,可以通过下面命令进行查看,由于测试中本人的设备License过期,相应的功能只是不能更新而已,功能测试使用没有问题。 由于当前测试过程没有NSM管理平台,故测试中的IDP\\UTM等功能产生的日志无法收集分析。

root# run show system license <将会显示相应的功能license以及过期时间>

如果license过去也可以通过相应的命令进行查看,如下:

root# run show system alarms

3 alarms currently active

Alarm time Class Description

2010-06-17 19:22:31 CST Minor License grace period for feature 28 expired 2010-06-17 19:22:31 CST Minor License grace period for feature 27 expired 2010-06-17 19:22:31 CST Minor License grace period for feature 25 expired

默认情况下,设备沟通过去将有提供一个月的试用期license。 首先我们将介绍IDP配置

第一步:申请license,此步骤必须保证设备本身能够访问Internet

Root#run request system license update trial

第二步:查看license更新情况

root# run show system license

第三步:检查并下载安装IDP特征库更新包<需要设备本身能够访问internet>

root# run request security idp security-package ? 下载并安装更新包

Possible completions:

download Download security package (Package includes detector and deltas for attack table) install Update attack database, active policy, detector with new package

第 33 页 共 52 页

第四步:检查下载状态、下载特征库版本、更新日期等信息

root# run request security idp security-package download status In progress: Downloading ...

root# run request security idp security-package download status

Done;Successfully downloaded from(https://services.netscreen.com/cgi-bin/index.cgi). Version info:1714(Wed Jun 16 14:41:19 2010, Detector=10.4.160100525)

root# run request security idp security-package download check-server Successfully retrieved from(https://services.netscreen.com/cgi-bin/index.cgi). Version info:1714(Detector=10.4.160100525, Templates=2)

第五步:当完成上述操作下载IDP特征库以后,需要进行对特征库的安装

root# run request security idp security-package install ? 特征库安装并查看安装状态 Possible completions:

<[Enter]> Execute this command

policy-templates Update previously installed policy-templates with newly downloaded ones status Retrieve the status of security package load operation

update-attack-database-only Don't update/push active policy or detector to data plane | Pipe through a command

第六步:配置IDP策略与安装策略

root# show security idp 配置IDP策略与安全策略 idp-policy juniper-srx-idp-test { rulebase-ips {

rule 1 {

match {

source-address any; destination-address any;

attacks {

predefined-attack-groups [ HTTP DNS ICMP UDP TCP ]; } } then {

action {

ignore-connection; }

notification { log-attacks; } } } }

}

active-policy juniper-srx-idp-test; 激活IDP策略

[edit]

root# show security policies

第 34 页 共 52 页

from-zone dmz to-zone untrust { policy d-u { match {

source-address any; destination-address any; application any; }

then {

permit {

application-services {

idp; 针对当前策略开启IDP功能 } } log {

session-init;

第七步:查看IDP功能工作状态命令:

root# run show security idp ? Possible completions:

application-identification Show IDP application identification data application-statistics Show IDP application statistics attack Show IDP attack data

counters Show IDP counters

memory Show IDP data plane memory statistics policies Show the list of currently installed policies policy-templates-list Show available policy templates

security-package-version Show the version of currently installed security-package status Show IDP status

root# run show security idp status

State of IDP: 2-default, Up since: 2010-01-19 23:23:21 CST (21:59:39 ago) Packets/second: 281 Peak: 2703 @ 2010-01-20 20:15:34 CST KBits/second : 280 Peak: 10097 @ 2010-01-20 20:15:34 CST Latency (microseconds): [min: 0] [max: 0] [avg: 0]

Packet Statistics:

[ICMP: 2210497] [TCP: 11918] [UDP: 2419330] [Other: 0] Flow Statistics:

ICMP: [Current: 1218] [Max: 2278 @ 2010-01-20 21:22:37 CST] TCP: [Current: 40] [Max: 138 @ 2010-01-20 19:14:02 CST] UDP: [Current: 16] [Max: 434 @ 2010-01-20 19:15:48 CST] Other: [Current: 0] [Max: 0 @ 2010-01-19 23:23:21 CST] Session Statistics:

[ICMP: 609] [TCP: 20] [UDP: 8] [Other: 0]

Policy Name : juniper-srx-idp-test v0 关键查看此处IDP策略是否激活工作状态 Running Detector Version : 10.2.160091104 运行中使用的检测版本

第 35 页 共 52 页

接下我们将介绍UTM中的web-filtering功能配置

Juniper SRX Branch系列能够做到的WEB过滤内网包括如下:

可以通过WEB过滤功能过滤涉及上述信息的网站等,有效提高企业办公效率

列举一个简单的例子,不允许内网用户访问任何与新闻有关的网站, 但是可以访问news.163.com,并且不允许访问开心网, 其他类型网站可以访问<体育、51JOB等>

首先我们同样需要检查设备的license与特征库等是否最新<根据上述IDP操作,不再重复> 第一步:申请license,此步骤必须保证设备本身能够访问Internet

Root#run request system license update trial

第二步:查看license更新情况

root# run show system license

第三步:配置UTM- web-filtering策略和安全策略

root# show security utm custom-objects { url-pattern { badsite-1 {

value www.kaixin001.com; }

goodsite-1 {

value news.163.com; }

}

custom-url-category { bad-site {

value badsite-1; }

good-site {

value goodsite-1; } } }

feature-profile {

web-filtering {

url-whitelist good-site; url-blacklist bad-site;

第 36 页 共 52 页

type surf-control-integrated; surf-control-integrated {

profile block-selected-sites { category { News {

action block; }

}

default log-and-permit;

custom-block-message \work! If you have questions, Please contact technical, support This is the Juniper solution!\ } } }

}

utm-policy web_filtering {

web-filtering {

http-profile block-selected-sites; } }

[edit]

root# show security policies from-zone trust to-zone untrust policy t-u match {

source-address any; destination-address any; application any; } then {

permit {

application-services {

utm-policy web_filtering;针对此条策略开启WEB_Fitering

[edit]

第四步:查看WEB-过滤功能工作状态命令:

root# run show security utm web-filtering ? Possible completions:

statistics Show web-filtering statistics status Show web-filtering status [edit]

root# run show security utm web-filtering

第 37 页 共 52 页

2.9 SRX Branch 系列与UAC联动配置说明

JUNIPER SRX Branch系列防火墙可以与Juniper统一接入控制器UAC进行3层访问控制联动工作,下面将具体介绍UAC、SRX配置,主要通过截图来进行说明: 主要事项:

1、 SRX与UAC设备系统时间必须一致

2、 SRX设备与UAC设备证书必须来自同一个根证书颁发

3、 SRX与UAC之间通过SSL连接<如果通过防火墙或者ACL等控制>必须将其443端口放开

第一步:生成并获取UAC设备证书,并导入设备证书和根服务器证书<由于此操作需要通过第三方证书服务器来完成>为此我单独有WORD文档来介绍。

第二步:生成并获取SRX设备证书,具体步骤如下:

user@host> request security pki generate-key-pair certificate-id uac 手工生成certificate-id user@host> request security pki generate-certificate-request certificate-id uac domain-name juniper.net subject CN=abc 手工生成证书信息 The following certificate request is displayed in PEM format. Generated certificate request

-----BEGIN CERTIFICATE REQUEST-----

MIHxMIGcAgEAMA4xDDAKBgNVBAMTA2htMTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgC QQCbhaiWzmctH0ZDldCn+mSNM62kyiSgc4cmN68U/j9El09/DgGoMNy2y+RYA1xU sr4B0NedGrZZJx5L1sIYjHr/AgMBAAGgKTAnBgkqhkiG9w0BCQ4xGjAYMBYGA1Ud EQQPMA2CC2p1bmlwZXIubmV0MA0GCSqGSIb3DQEBBQUAA0EAleLR6Hp2ity8Dugs MW4HI6SxfwMc2eYM5Nj2UhwpEEpsce77dUBZriKdehAgli7vwNsHGIuhHjEaFzfO hpM3tA==

-----END CERTIFICATE REQUEST----- 通过windows证书服务器或者OPENSSL生成并获取证书 Fingerprint:

9e:d5:7d:44:e8:e7:b6:d7:4b:58:d4:4e:2b:fb:c6:b2:4b:b7:8b:82 (sha1) b0:8d:c7:6d:41:d5:58:61:dc:a0:3e:4e:d6:39:02:d7 (md5)

user@host> request security pki local-certificate load certificate-id uac filename /var/tmp/device.cer 手工加载证书到设备

此证书是通过证书服务器生成后由FTP等方式传入到设备中。

lab# run show security pki local-certificate detail 查看当前证书信息 Certificate identifier: uac Certificate version: 3

Serial number: 61069676000000000006 Issuer:

Common name: srx \\\\\\*** 部分显示信息省略***\\\\\\\\

第三步:配置UAC设备Infranet enforcer connection,根据截图配置步骤如下:

第 38 页 共 52 页

定义Infranet enforcer connection连接参数<设备序列号、共享密钥等>

定义Resource 内部资源

定义认证列表匹配到的enforcer

第 39 页 共 52 页

定义roles <注意 enable host enforcer选项>

定义Host enforcer policys

客户端尝试登陆,输入用户名和密码

第 40 页 共 52 页

联动正常,UAC首页显示如下:

第四步:配置SRX设备unified-access-control,具体内容如下: lab# show services unified-access-control { infranet-controller ic-1 {

address 20.1.1.20; UAC设备IP地址

interface fe-0/0/1.0; 与UAC设备进行通信的端口

password \ 与UAC设备联动的共享密钥

}

第五步:SRX设备针对需要进行与UAC设备联动的策略开启UAC认证策略功能:

set security policies from-zone trust to-zone untrust policy t-u then permit application-services uac-policy

第六步:查看SRX设备unified-access-control状态,具体内容如下:

lab# run show services unified-access-control authentication-table 用户认证表 Id Source IP Username Age Role identifier 2 20.1.1.100 test2 0 0000000001.000005.0 Total: 1 [edit]

lab# run show services unified-access-control policies detail UAC下发到设备的策略 Identifier: 1

Resource: icmp://*:* Resource: tcp://*:* Resource: udp://*:* Action: allow Apply: all Total: 1 [edit]

lab# run show services unified-access-control status SRX设备与UAC设备连接的状态 Host Address Port Interface State ic-1 20.1.1.20 11123 fe-0/0/1.0 connected

第 41 页 共 52 页

2.10 SRX Branch系列FLOW配置说明

root# set security flow ? Possible completions:

> aging Aging configuration

allow-dns-reply Allow unmatched incoming DNS reply packet + apply-groups Groups from which to inherit configuration data + apply-groups-except Don't inherit configuration data from these groups

route-change-timeout Timeout value for route change to nonexistent route (6..1800 seconds) syn-flood-protection-mode TCP SYN flood protection mode

> tcp-mss TCP maximum segment size configuration > tcp-session Transmission Control Protocol session configuration > traceoptions Trace options for flow services

[edit]

root# set security flow syn-flood-protection-mode ? 设置SYN-FLOOD攻击防护 Possible completions:

syn-cookie Enable SYN cookie protection syn-proxy Enable SYN proxy protection [edit]

root# set security flow tcp-session ? 设置tcp-session相关参数 Possible completions:

+ apply-groups Groups from which to inherit configuration data + apply-groups-except Don't inherit configuration data from these groups no-sequence-check Disable sequence-number checking

no-syn-check Disable creation-time SYN-flag check

no-syn-check-in-tunnel Disable creation-time SYN-flag check for tunnel packets rst-invalidate-session Immediately end session on receipt of reset (RST) segment rst-sequence-check Check sequence number in reset (RST) segment strict-syn-check Enable strict syn check

tcp-initial-timeout Timeout for TCP session when initialization fails (20..300 seconds) [edit]

root# set security flow tcp-mss ? 设置TCP-MSS相关参数 Possible completions:

> all-tcp Enable MSS override for all packets

+ apply-groups Groups from which to inherit configuration data + apply-groups-except Don't inherit configuration data from these groups

> gre-in Enable MSS override for all GRE packets coming out of an IPSec tunnel > gre-out Enable MSS override for all GRE packets entering an IPsec tunnel > ipsec-vpn Enable MSS override for all packets entering IPSec tunnel [edit]

第 42 页 共 52 页

2.11 SRX Branch系列SCREEN攻击防护配置说明

Juniper SRX系列 防火墙用于保护网络的安全,具体做法是先检查要求从一个安全区段到另一区段的通路的所有连接尝试,然后予以允许或拒绝。对于每个安全区段和 MGT 区段,可启用一组预定义的 SCREEN 选项,检测并阻塞安全设备将其确定为具有潜在危害的各种信息流。

SCREEN 选项用于保护区段的安全,具体做法是先检查要求经过绑定到该区域的某一接口的所有连接尝试,然后予以准许或拒绝。然后安全设备应用防火墙策略,在这些策略中,可能包含针对通过 SCREEN 过滤器的信息流的内容过滤和入侵检测及防护 (IDP) 组件。

下面我们将举例配置一个SCREEN应用在外网Untrust区域: 具体配置命令如下:

root# show security screen

ids-option juniper-srx-screen-test {

alarm-without-drop; 此动作表示仅记录攻击信息到日志,但是不拒绝攻击<可选设置> icmp {

ip-sweep threshold 1000; fragment;

flood threshold 100; }

ip {

bad-option; spoofing; tear-drop; }

tcp {

syn-frag;

port-scan threshold 1000;端口扫描触发值为1000<每秒1000个扫描动作> land; winnuke; } udp {

flood threshold 100; UDP FLOOD触发值为100<每秒100个> }

limit-session {

source-ip-based 128;会话数限制<针对源IP地址>

destination-ip-based 128;会话数限制<针对目标IP地址> } }

[edit]

root# show security zones security-zone untrust

screen juniper-srx-screen-test; 将上述定义的screen配置应用到untrust区域

第 43 页 共 52 页

2.12 SRX Branch系列J-WEB操作配置简要说明

Juniper SRX 系列防火墙提供WEB操作界面,WEB操作界面主要包括如下几个大类: 1、 首页<监控实时系统状态>

2、 配置页面<防火墙功能配置,比如策略、VPN、NAT、路由等> 3、 监控页面<防火墙各项功能状态监控、接口流量监控等> 4、 系统维护页面<防火墙日常维护,比如升级等>

5、 系统故障排查页面<防火墙日常维护故障排查,比如抓包、PING、tracert route等> 功能分类页面截图如下:

登录页面

第 44 页 共 52 页

第 45 页 共 52 页

第 46 页 共 52 页

第 47 页 共 52 页

第 48 页 共 52 页

第 49 页 共 52 页

三、SRX防火墙常规操作与维护 3.2 设备关机

SRX因为主控板上有大容量存储,为防止强行断电关机造成硬件故障,要求设备关机必须按照下面的步骤进行操作:

1. 管理终端连接SRX console口。

2. 使用具有足够权限的用户名和密码登陆CLI命令行界面。 3. 在提示符下输入下面的命令:

user@host> request system halt

The operating system has halted.

Please press any key to reboot(除非需要重启设备,此时不要敲任何键,否则设备将进行重启)

4. 等待console输出上面提示信息后,确认操作系统已停止运行,关闭机箱背后电源模

块电源。

3.3 设备重启

SRX重启必须按照下面的步骤进行操作: 1. 管理终端连接SRX console口。

2. 使用具有足够权限的用户名和密码登陆CLI命令行界面。 3. 在提示符下输入下面的命令:

user@host> request system reboot 4. 等待console设备的输出,操作系统已经重新启动。

3.4 操作系统升级

SRX操作系统软件升级必须按照下面的步骤进行操作:

1. 管理终端连接SRX console口,便于升级过程中查看设备重启和软件加载状态。 2. SRX上开启FTP服务,并使用具有超级用户权限的非root用户通过FTP客户端将下

载的升级软件介质上传到SRX上。

3. 升级前,执行下面的命令备份旧的软件及设定:

user@host> request system snapshot 4. 加载新的SRX软件:

第 50 页 共 52 页

本文来源:https://www.bwwdw.com/article/n9bt.html

Top