Juniper--CLI配置

配置路由:
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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值