JuniperSRX配置手册

上传人:仙*** 文档编号:114143195 上传时间:2022-06-27 格式:DOC 页数:25 大小:330.04KB
收藏 版权申诉 举报 下载
JuniperSRX配置手册_第1页
第1页 / 共25页
JuniperSRX配置手册_第2页
第2页 / 共25页
JuniperSRX配置手册_第3页
第3页 / 共25页
资源描述:

《JuniperSRX配置手册》由会员分享,可在线阅读,更多相关《JuniperSRX配置手册(25页珍藏版)》请在装配图网上搜索。

1、 Juniper SRX防火墙配置手册一、JUNOS操作系统介绍 1.1 层次化配置结构 JUNOS采用基于FreeBSD内核的软件模块化操作系统,支持CLI命令行和WEBUI两种接口配置方式,本文主要对CLI命令行方式进行配置说明.JUNOS CLI使用层次化配置结构,分为操作(operational)和配置(configure)两类模式,在操作模式下可对当前配置、设备运行状态、路由及会话表等状态进行查看及设备运维操作,并通过执行config或edit命令进入配置模式,在配置模式下可对各相关模块进行配置并能够执行操作模式下的所有命令(run)。在配置模式下JUNOS采用分层分级模块下配置结构

2、,如下图所示,edit命令进入下一级配置(类似unix cd命令),exit命令退回上一级,top命令回到根级。1.2 JunOS配置管理 JUNOS通过set语句进行配置,配置输入后并不会立即生效,而是作为候选配置(Candidate Config)等待管理员提交确认,管理员通过输入commit命令来提交配置,配置内容在通过SRX语法检查后才会生效,一旦commit通过后当前配置即成为有效配置(Active config)。另外,JUNOS允许执行commit命令时要求管理员对提交的配置进行两次确认,如执行commit confirmed 2命令要求管理员必须在输入此命令后2分钟内再次输入c

3、ommit以确认提交,否则2分钟后配置将自动回退,这样可以避免远程配置变更时管理员失去对SRX的远程连接风险。在执行commit命令前可通过配置模式下show命令查看当前候选配置(Candidate Config),在执行commit后配置模式下可通过run show config命令查看当前有效配置(Active config)。此外可通过执行show | compare比对候选配置和有效配置的差异. SRX上由于配备大容量硬盘存储器,缺省按先后commit顺序自动保存50份有效配置,并可通过执行rolback和commit命令返回到以前配置(如rollback 0/commit可返回到前一

4、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

5、security nat和edit security nat / delete一样,均可删除security防火墙层级下所有NAT相关配置,删除配置和ScreenOS不同,配置过程中需加以留意.1。3 SRX主要配置内容 部署SRX防火墙主要有以下几个方面需要进行配置: System:主要是系统级内容配置,如主机名、管理员账号口令及权限、时钟时区、Syslog、SNMP、系统级开放的远程管理服务(如telnet)等内容。 Interface:接口相关配置内容。 Security: 是SRX防火墙的主要配置内容,安全相关部分内容全部在Security层级下完成配置,如NAT、Zone、Polic

6、y、Addressbook、Ipsec、Screen、Idp等,可简单理解为ScreenOS防火墙安全相关内容都迁移至此配置层次下,除了Application自定义服务。 Application:自定义服务单独在此进行配置,配置内容与ScreenOS基本一致。 routing-options: 配置静态路由或routerid等系统全局路由属性配置。二、SRX防火墙配置对照说明 策略处理流程图2。1 初始安装 2.1.1 登陆 Console口(通用超级终端缺省配置)连接SRX,root用户登陆,密码为空 login: root Password: - JUNOS 9。5R1。8 built 2

7、009-0716 15:04:30 UTC root% cli / /进入操作模式root root configure /进入配置模式 edit Root 2.1。2 设置root用户口令 设置root用户口令 root# set system rootauthentication plain-text-password root new password : root123 root retype new password: root123 editroot# set system login class superuser idletimeout 3 设置当前用户超时时间密码将以密文方式

8、显示 root# show system rootauthentication encryptedpassword 1$xavDeUe6fNM6olGU.8.M7B62u05D6。; # SECRET-DATA注意:强烈建议不要使用其它加密选项来加密root和其它user口令(如encryptedpassword加密方式),此配置参数要求输入的口令应是经加密算法加密后的字符串,采用这种加密方式手工输入时存在密码无法通过验证风险. 2.1.3 设置远程登陆管理用户 root set system login user lab class superuser authentication plai

9、ntext-password /创建用户labroot new password : lab123 /配置用户lab密码root# retype new password: lab123 注:此lab用户拥有超级管理员权限,可用于console和远程管理访问,另也可自行灵活定义其它不同管理权限用户。2。1。4 管理SRX相关配置rootshow system uptime /查看时间rootrun set date YYYYMMDDhhmm.ss /设置系统时钟root#set system timezone Asia/beijing /设置时区为北京rootset system hostna

10、me SRX3400-A /设置主机名rootset system name-server 1.1。1。1 /设置DNS服务器rootset system ntp server 202.120。2。101 /设置NTP服务器rootshow ntp associations rootshow ntp status /查看NTProotshow security alg status /查看ALG状态ALG Status : DNS : Enabled FTP : Enabled H323 : Enabled MGCP : Enabled MSRPC : Enabled PPTP : Enabl

11、ed RSH : Enabled RTSP : Enabled SCCP : Enabled SIP : Enabled SQL : Enabled SUNRPC : Enabled TALK : Enabled TFTP : Enabled IKEESP : Disabledroot#set system services ftp root#set system services telnet root#set system services web-management http /在系统级开启ftp/telnet/http远程接入管理服务rootrequest system reboot

12、 /重启系统rootrequest system poweroff / 关闭系统rootshow version /查看版本信息Model: srx210bJUNOS Software Release 10.4R5.5rootshow system uptime /查看系统启动时间 Current time: 2011-0811 05:09:15 UTCSystem booted: 201108-11 01:12:48 UTC (03:56:27 ago)Protocols started: 2011-08-11 01:15:28 UTC (03:53:47 ago)Last configur

13、ed: 20110811 03:11:08 UTC (01:58:07 ago) by root 5:09AM up 3:56, 1 user, load averages: 0。01, 0。02, 0。00rootShow chassis haredware /查看硬件板卡及序列号 Hardware inventory:Item Version Part number Serial number DescriptionChassis AC5210AA0079 SRX210bRouting Engine REV 40 750-021778 AACN5249 RESRX210BFPC 0 FPC

14、 PIC 0 2x GE, 6x FE, 1x 3GPower Supply 0root show chassis environment /查看硬件板卡当前状态 Class Item Status MeasurementTemp Routing Engine OK 52 degrees C / 125 degrees F Routing Engine CPU Absent Fans SRX210 Chassis fan OK Spinning at normal speedPower Power Supply 0 OK rootshow chassis routingengine /查看主控

15、板(RE)资源使用及状态Routing Engine status: Temperature 52 degrees C / 125 degrees F Total memory 512 MB Max 415 MB used ( 81 percent) Control plane memory 336 MB Max 306 MB used ( 91 percent) Data plane memory 176 MB Max 107 MB used ( 61 percent) CPU utilization: User 4 percent Background 0 percent Kernel 5

16、 percent Interrupt 0 percent Idle 91 percent Model RESRX210B Serial ID AACN5249 Start time 20110811 01:12:47 UTC Uptime 4 hours, 17 minutes, 57 seconds Last reboot reason 0x200:chassis control reset Load averages: 1 minute 5 minute 15 minute 0。09 0.05 0.01rootshow system license /查看授权License usage:

17、Licenses Licenses Licenses Expiry Feature name used installed needed ax411wlanap 0 2 0 permanentrootshow system processes extensive /查看系统利用率last pid: 1968; load averages: 0。01, 0。03, 0。00 up 0+04:20:28 05:32:46111 processes: 17 running, 83 sleeping, 11 waitingMem: 120M Active, 87M Inact, 231M Wired,

18、 30M Cache, 61M Buf, 1356K FreeSwap:PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 1097 root 4 76 0 194M 34836K select 0 298:05 98。44% flowd_octeon 22 root 1 171 52 0K 16K RUN 0 203:47 84。96% idle: cpu0 24 root 1 -20 -139 0K 16K RUN 0 5:42 0.00 swi7: clock 21 root 1 171 52 0K 16K RUN 1

19、 2:21 0.00 idle: cpu1 5 root 1 84 0 0K 16K rtfifo 0 1:02 0.00% rtfifo_kern_recv 1109 root 1 76 0 9724K 3796K select 0 0:46 0.00 rtlogd 868 root 1 76 0 7004K 2588K select 0 0:37 0.00% eventd 52 root 1 -8 0 0K 16K mdwait 0 0:34 0。00 md0 1085 root 1 76 0 16984K 10676K select 0 0:29 0.00 snmpd 1088 root

20、 1 76 0 14288K 4788K select 0 0:23 0。00% l2ald 1090 root 2 76 0 20124K 6476K select 0 0:22 0。00% pfed 1115 root 1 76 0 4180K 1104K select 0 0:19 0.00% license-check 1087 root 1 4 0 39620K 20172K kqread 0 0:15 0。00 rpd 23 root 1 40 159 0K 16K WAIT 0 0:15 0。00% swi2: net-(more 39)-rootmonitor interfac

21、e ge0/0/0 /动态统计接口数据包转发信息Interface: ge0/0/0。0, Enabled, Link is UpFlags: SNMPTrapsEncapsulation: ENET2Local statistics: Current delta Input bytes: 2986416 4121 Output bytes: 47303 90 Input packets: 47631 64 Output packets: 969 1Remote statistics: Input bytes: 94404820 (1896 bps) 6685 Output bytes: 95

22、53700 (952 bps) 2078 Input packets: 111689 (4 pps) 50 Output packets: 59369 (2 pps) 29Traffic statistics: Input bytes: 97391236 Output bytes: , 10806 Next=n, Quit=q or ESC, Freeze=f, Thaw=t, Clear=c, Interface=irootmonitor traffic interface ge-0/0/0 / 动态报文抓取verbose output suppressed, use detail or t

23、o avoid reverse lookups on IP addresses.05:41:02。773631 In arp whohas 172.56.1.23 tell 172.56。1.2405:41:02。783007 In arp who-has 172。56。1.21 tell 172。56。1。2405:41:02.787524 In arp who-has 172.56.6.135 tell 172.56.7.305:41:02。884849 In IPX 00000000。00:13:8f:74:bc:19。0455 00000000。ff:ff:ff:ff:ff:ff。04

24、55: ipxnetbios 5005:41:03。437039 In arp who-has 172。56。7。41 tell 172.56。1.2405:41:03。509837 Out IP truncated-ip - 10 bytes missing! 172。56。3。34。55730 ns.szptt。net。cn.domain: 51866+domain05:41:03.568547 In STP 802。1d, Config, Flags none, bridgeid 8000。00:06:53:48:8a:80.8010, length 4305:41:03。678096

25、In IPX 00000000.00:13:8f:74:bc:19。0455 00000000.ff:ff:ff:ff:ff:ff。0455: ipx-netbios 502。1.5 接口的初始化接口说明:root% cli /进入操作模式root root show interfaces /查看接口状态调整输出详细程度rootshow intefaces terserootshow interfaces briefrootshow interfaces detailrootshow interfaces extensive /由上到下查看接口的信息越来越详细rootshow interfac

26、es detail | match fe-0/0/0 /使用管道符匹配特定关键字roothelp reference security policy-security /查看配置参考信息root help apropos security /帮助搜索关键字相关的操作命令root configure /进入配置模式 edit root root# show interfaces /查看接口配置状态为接口配置IP地址的两种方法:set配置:rootset interfaces ge0/0/0.0 family inet address 1.1。1.1/24 /为接口配置IP地址rootshow i

27、nterfaces ge0/0/0。0 family inet /查看接口配置address 1。1。1。1./24edit 配置直接指定到某个层级:edit rootedit interfaces ge0/0/0。0 family inet /在该层级下为接口配置 edit interfaces ge-0/0/0.0 family inetrootset address 1。1。1.1/24 /配置IP地址edit interfaces ge0/0/0。0 family inetrootup /返回上一级,一层一层的退出(也可以使用exit和top退出到edit)edit interface

28、sRootshowroot # set system syslog file monitorlog any any /创建名字为monitorlog的日志 root # set system syslog file monitor-log match ”172.56.3.34 /监控接口root # run monitor start monitor-log /开始监控root run monitor stop /停止监控删除配置:rootdelete interfaces ge0/0/0.0 /普通删除配置命令root#wildcard delete interfaces fe-0* /通配

29、符匹配删除配置命令matched:fe-0/0/0matched:fe0/0/1 matched:fe0/0/2matched:fe-0/0/3matched:fe-0/0/4matched:fe0/0/5matched:fe-0/0/6matched:fe0/0/7delete 8 objecgts?yes,no(no)yes配置addressbook (addressbook就是为地址命名,以便调用)editroot# edit security zones security-zone outside / 配置outside区域address-bookedit security zones

30、 securityzone outsideroot# set address-book address outaddress 172。56.3。0/16 /把接口IP放入地址薄out-addressedit security zones securityzone outsideroot# up edit security zonesrootedit securityzone inside /配置inside区域addressbookedit security zones security-zone insideroot set address-book address in-address 1

31、0。1。1.0/24 /把接口IP放入地址薄in addressedit security zones securityzone insideroot exit edit security zonesroot exit配置applicationeditroot edit applications application tcp-1752 /定义服务名字edit applications application tcp-1752root# set protocol tcp sourceport 1752 destinationport 1752 /定义协议及端口号editroot# show a

32、pplications application tcp1752 protocol tcp; sourceport 1752; destinationport 1752;配置application-seteditroot set applications applicationset web-mgt application junosssh /配置应用服务集webmgteditroot set applications applicationset webmgt application junos-pingeditroot set applications application-set web

33、mgt application junos pcanywhereeditroot# set applications applicationset webmgt application junoshttpeditroot# set applications applicationset webmgt application junosftproot# show applications /查看applicationsapplication-set webmgt application junos-ssh; application junosping; application junospc-a

34、nywhere; application junoshttp; application junosftp; 替换配置:rootset interfaces ge0/0/0。0 family inet address 1.1.1.1/24 root show interfaces ge-0/0/0ge-0/0/0 unit 0 family inet address 1。1。1。1/24rootreplace pattern ge-0/0/0 with ge0/0/1 /一个接口取代另一个接口的配置root# show interfaces ge-0/0/1ge-0/0/1 unit 0 fam

35、ily inet address 1.1。1.1/24复制配置:root#set interfaces ge0/0/0。0 family Ethernet-swithing vlanroot#copy interfaces ge-0/0/0。0 to ge-0/0/1.0 /复制接口配置配置模式下的showroot#show /查看配置rootshow display set / 查看set格式的配置set version 10。4R5.5set system timezone asia/beijingset system root-authentication encryptedpasswo

36、rd ”$1$XyydlG84f46l82dR8C/JHUvzFuq9o。”set system name-server 202。96。134.133set system login user lab uid 2002set system login user lab class super-userset system login user lab authentication encrypted-password ”$1Y0X8gbap$GZNvirOuGhW.4ZAq4xwHF。”set system services sshset system services telnetset s

37、ystem services web-management http interface vlan。0set system services webmanagement http interface ge0/0/1.0set system services webmanagement http interface vlan。3set system services web-management http interface ge-0/0/0.0set system services web-management http interface fe0/0/4。0set system servic

38、es web-management https system-generatedcertificateset system services webmanagement https interface vlan.0set system services web-management https interface ge0/0/1。0set system syslog file nat-log any anyset system syslog file natlog match RT_FLOW_SESSIONset system syslog file monitor-log any anyse

39、t system syslog file monitorlog match 172.56。3。34(more)-基本提交与恢复配置命令:root#commit /最基本的提交配置命令root#show | compare /查看待提交的配置与当前运行的配置差别(+表示增加的,- 表示减少的) encryptedpassword 1$XyydlG84$f46l82dR8C/JHUvzFuq9o。”; # SECRETDATA+ encryptedpassword 1PRX8HyIJ$X0uFTlOJ4yn.DQYeDiHl10; SECRET-DATAedit system services w

40、eb-management http- interface vlan。0 ge0/0/1。0 vlan.3 ge-0/0/0。0 fe0/0/3.0 ;+ interface vlan.0 ge-0/0/1.0 vlan.3 ge-0/0/0。0 fe0/0/4.0 ;edit interfaces+ fe0/0/4 + unit 0 + family inet;+ family ethernetswitching;+ + edit security zones security-zone inside interfaces vlan。3 .。 + fe0/0/4.0 + hostinboun

41、dtraffic + systemservices + http;+ + + fe0/0/3。0 - host-inbound-traffic system-services http;root#rollback ? / /查看可恢复的配置 (注意:使用load facroty-default命令恢复到出厂配置) Possible completions: clear system commit /清除未被提交的配置rootcommit comment “onlyconfiguration-interfaces /为提交的配置进行说明调换策略顺序Insert security policies

42、 fromzone zonename to-zone zone-name policy name before after policy name配置SNMP配置系统信息(可配可不配)set snmp location lab (设备位置)set snmp contact ”labguy (管理员联系方式)配置SNMP通讯的“团体名”(可理解为通讯密码,必须配置)set snmp community public authorization read-write 在接口上启用SNMP访问(必须配置)set security zones securityzone trust interfaces

43、 ge0/0/0。0 hostinboundtraffic system-services snmp (Please add other services as needed)访问控制(可配可不配,建议配置)set snmp community public clients 172.26.0.0/16set snmp community public clients 0.0.0。0/0 restrict2.1.6 配置安全策略图解:定义outside属于Internet,inside属于内部局域网,通过juniper访问Internet。接口的配置及创建不同的区域:root#set inter

44、faces ge-0/0/0。0 family inet address 172。56.3.34/16root#set interfaces ge0/0/1.0 family inet address 10.1.1。10/24 /为接口ge0/0/0、ge0/0/1配置IP地址root#set security zones securityzone outside interfaces ge0/0/0。0 rootset security zones security-zone inside interfaces ge-0/0/1.0 / 把接口放在不同的区域(outside /inside)

45、中root#commit /提交配置root show interfaces / 查看接口配置信息 ge0/0/0 unit 0 family inet address 172.56。3。34/16 ge0/0/1 unit 0 family inet address 10。1.1。1/24; root # show security zones /查看zones的配置信息securityzone inside interfaces ge-0/0/1。0; security-zone outside interfaces ge-0/0/0.0; 配置路由:editroot edit routi

46、ng-options edit routing-optionsroot set static route 0.0.0.0/0 next-hop172.56.0。1 /配置静态路由rootcommitedit routing-optionsroot # show /查看路由条目static route 0。0.0.0/0 next-hop 172.56。0。1 ;root# run show route /查看路由inet。0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)+ = Active Route, = Last Active, = Both0.0.0。0/0 *Static/5 00:34:17 to 172.56.0.1 via ge0/0/0。010。1.1.0/24 *Direct/0 00:34:16 via ge-0/0/1.010。1.1。1/32 *Local/0 00:34:23 Local via ge-0/0/1。0172。56.0.0/16 *Direct/0 00:34:17 via ge-0/0/0.0172.56。3.34/32 *Local/0 00:34:23 Local via ge0/0/0.0

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!