配置路由:
set routing-options static route 0.0.0.0/0 next-hop 192.168.1.253
配置接口IP及划zone:
接口设置IP地址
set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.239/24
set interfaces vlan unit 0 family inet address 172.17.1.1/24
接口关联ZONE
set security zones security-zone trust interfaces vlan.0
set security zones security-zone untrust interfaces ge-0/0/0.0
1,策略地址及地址集对象定义
例:
在untrust区段中定义
地址集:DNSGROUP
地址名称:DNS10 ,对应地址为:192.168.1.10/32;并讲DNS10放入DNSGROUP
在trust区段定义
地址名称为Lan,对应地址为172.17.1.0/24
CLI配置如下:
set security zone security-zone untrust address-book address DNS10 192.168.1.10/32
set security zone security-zone untrust address-book address-set DNSGROUP address DNS10
set security zone security-zone trust address-book address Lan 172.17.1.0/24
2,策略服务对象定义:不常用的服务端口需要自己定义
例:定义一个TCP-8080端口
CLI配置如下:
set applications application tcp-8080 protocol tcp
set applications application tcp-8080 destination-port 8080
3,策略时间调度对象定义
定义名称AllowDNS,时间为每天中午12:00-13:00
set schedulers scheduler AllowDNS daily start-time 12:00:00 stop-time 13:00:00
4,策略配置
创建一条策略允许从 Trust 的地址 Lan 到 untrust 的地址集 DNSGROUP 的自定义服务 TCP-8080 的访问,并受调式时间 AllowDNS 的限制
CLI配置如下:
set security policies from-zone trust to-zone untrust policy AllowDNS match source-address Lan
set security policies from-zone trust to-zone untrust policy AllowDNS match destination-address DNSGROUP
set security policies from-zone trust to-zone untrust policy AllowDNS match application tcp-8080
set security policies from-zone trust to-zone untrust poicy AllowDNS then permit
set security policies from-zone trust to-zone untrust policy AllowDNS scheduler-name AllowDNS