SRX基本配置
- 格式:doc
- 大小:73.00 KB
- 文档页数:7
SRX 300配置上网(WLAN与VLAN都为内部IP)
环境介绍
设备ge-0/0/0口为外网口,即第一个口,地址172.16.65。203/24,下一跳地址172.16.65。1
设备ge-0/0/2口为内网口即第三个口,地址192。168。2。1/24,内网口作为PC网关来用,设置DHCP,DHCP设置参数如下:地址段 192。168.2.29—192。168.2。39
网关 192。168.1。1
DNS 202。103.24。68;8。8.8.8
设置源NAT,用172.16.65.250、172。16.65.251两个地址做转换NAT地址
设置策略允许内网上网
创建超级用户root 密码TS……。
具体步骤
用串口线连接设备console口,设置参数如下:
这台设备是有配置的,所以要先清空设备配置,清空完设备配置,需要直接设备初始超级用户的密码,然后保存,才可以完成恢复出厂设置
登入设备出现以下 root@root〉
root@root>configure 进入配置模式
Entering configuration mode
[edit]
root@root# load factory-default 恢复出厂设备
warning: activating factory configuration
[edit]
root@root# set system root-authentication plain—text-password 设置超级用户密码
New password:
Retype new password:
[edit]
root@root# commit
commit complete
[edit] 此时回复出厂设置完成,下一步开始配置
login: root 输入默认用户名root
Password: 输入重置设备前输入的密码
root@root% cli 敲入cli进入执行模式
root@root> configure 敲入configure进入配置模式,执行模式代表符号“〉”
Entering configuration mode
[edit]
root@root# 配置模式“#”
root@root# set system login user lvlin class super—user authentication plain-text—password 建立用户名为“wangjian”的超级用户
New password: 为用户“root"设置密码
Retype new password: 重复输入密码
[edit]
root@root# delete interfaces ge—0/0/0。0 删除接口相关配置,接口默认处于交换
[edit] 模式Ethernet—switching模式下,要想设置成三层必须先把这个属
root@root# delete interfaces fe-0/0/2 unit 0 性删除,“.0”和unit0在意义上一样
[edit]
wangjian# set interfaces ge—0/0/0。0 family inet address 192.168.201.239/24
[edit] 设置ge-0/0/0.0为三层接口地址192.168。201。239
set interfaces ge—0/0/0.0 family inet address 172。16.65。203/24
wangjian# set interfaces fe—0/0/2.0 family inet address 192。168。1.1/24 [edit] 设置Ge-0/0/2.0为三层接口地址192.168.2.1
wangjian# set routing-options static route 0.0。0.0/0 next-hop 192。168.201。250
set routing—options static route 0.0.0.0/0 next—hop 172.16。65.1
[edit] 设置默认路由
wangjian# set security zones security—zone untrust interfaces ge-0/0/0。0
[edit] 设置ge—0/0/0.0口为untrust安全域接口
wangjian# set security zones security-zone trust interfaces ge-0/0/2。0
[edit] 设置fe-0/0/2.0口为trust安全域接口
wangjian# delete security nat source rule—set trust—to—untrust
[edit] 删除系统自带的源nat规则
wangjian# set security nat source pool wangjian address 192.168.201.59 to 192.168。201。60 设置源nat地址池
set security nat source pool wangjian address 172.16。65.250 to 172。16。65。251
[edit]
wangjian# set security nat source rule-set wangjiannat from zone trust
[edit] 设置nat源安全域
wangjian# set security nat source rule—set wangjiannat to zone untrust
[edit] 设置nat目的安全域
wangjian# set security nat source rule—set wangjiannat rule wangjiannat1 match
source—address 0.0。0。0/0 设置nat源地址
[edit]
wangjian# set security nat source rule-set wangjiannat rule wangjiannat1 then source—nat pool
wangjian 设置nat关联地址池
[edit]
wangjian# set security zones security-zone untrust interface ge-0/0/0.0 host—inbound-traffic
system—services http
[edit] 打开接口http管理
wangjian# set system services web—management http
[edit] 打开http全局开关
wangjian# delete security policies from-zone trust to—zone untrust policy trust—to untrust 删除系统自带策略
delete security policies from—zone trust to—zone untrust policy trust—to untrust
[edit]
wangjian# set security policies from—zone trust to—zone untrust policy wangjian match
source-address any [edit] 配置策略源地址
wangjian# set security policies from—zone trust to-zone untrust policy wangjian match
destination—address any 配置策略目的地址
[edit]
wangjian# set security policies from-zone trust to—zone untrust policy wangjian match
application any 配置策略应用
[edit]
wangjian# set security policies from-zone trust to-zone untrust policy wangjian then
permit 配置策略动作
[edit]
wangjian# set security policies from—zone trust to-zone untrust policy wangjian then log
session-init 开启策略日志—会话开始
[edit]
wangjian# set security policies from-zone trust to-zone untrust policy wangjian then log
session—close 开启策略日志-会话结束
[edit]
wangjian# delete system services dhcp
[edit] 删除系统默认dhcp
wangjian# set system services dhcp router 192.168。1.1
[edit] DHCP参数默认网关
wangjian# set system services dhcp pool 192。168。2。0/24 address-range low
192.168.2.29 DHCP参数地址池开始地址
[edit]
wangjian# set system services dhcp pool 192.168。2。0/24 address-range high 192.168。2.39 DHCP参数地址池结束地址
[edit]
wangjian# set system services dhcp maximum—lease—time 4294967295