Juniper srx 240 端口映射\\N个ISP出口 之 “浮动路由+指定资源走指定线路”

发布时间:2020-07-19 01:57:17 作者:ITint
来源:网络 阅读:924

172.18.18.42 port 2020、2009 ISP_IP Port XXXX、XXXX
172.18.18.45 port 2020、2009 ISP_IP Port XXXX、XXXX

步骤一:定义全局地址
set security address-book global address Nutanix_Cluster 172.18.18.50/32
步骤二:定义协议端口
set applications application tcp-2020 protocol tcp
set applications application tcp-2020 destination-port 2020
set applications application tcp-2009 protocol tcp
set applications application tcp-2009 destination-port 2009
步骤三:定义目的NAT+Port之定义内网IP匹配端口
set security nat destination pool DP_Nutanix_Cluster_2020 address 172.18.18.50/32
set security nat destination pool DP_Nutanix_Cluster_2020 address port 2020
set security nat destination pool DP_Nutanix_Cluster_2009 address 172.18.18.50/32
set security nat destination pool DP_Nutanix_Cluster_2009 address port 2009
步骤三:定义目的NAT+Port之定义内外网NAT规则
set security nat destination rule-set DNAT_FROM_ISP6 rule ISP6_TO_Nutanix_2020_Owenli match destination-address-name WAN3006_162
set security nat destination rule-set DNAT_FROM_ISP6 rule ISP6_TO_Nutanix_2020_Owenli match destination-port 2020
set security nat destination rule-set DNAT_FROM_ISP6 rule ISP6_TO_Nutanix_2020_Owenli then destination-nat pool DP_Nutanix_Cluster_2020
set security nat destination rule-set DNAT_FROM_ISP6 rule ISP6_TO_Nutanix_2009_Owenli match destination-address-name WAN3006_162
set security nat destination rule-set DNAT_FROM_ISP6 rule ISP6_TO_Nutanix_2009_Owenli match destination-port 2009
set security nat destination rule-set DNAT_FROM_ISP6 rule ISP6_TO_Nutanix_2009_Owenli then destination-nat pool DP_Nutanix_Cluster_2009

步骤四:定义源区域访问内网特定区域的控制策略
set security policies from-zone ISP6 to-zone trust policy Nutanix_Cluster-OWEN-EDIT match source-address any destination-address Nutanix_Cluster application tcp-2020 application tcp-2009
set security policies from-zone ISP6 to-zone trust policy Nutanix_Cluster-OWEN-EDIT then permit
set security policies from-zone ISP6 to-zone trust policy Nutanix_Cluster-OWEN-EDIT then log session-init
set security policies from-zone ISP6 to-zone trust policy Nutanix_Cluster-OWEN-EDIT then log session-close
set security policies from-zone ISP6 to-zone trust policy Nutanix_Cluster-OWEN-EDIT then count
步骤五:新定义之策略插入拒绝策略之前,即调整策略优先顺序
insert security policies from-zone ISP6 to-zone trust policy Nutanix_Cluster-OWEN-EDIT before policy DENY

set security policies from-zone trust to-zone ISP6 policy Nutanix_Cluster-OWEN-EDIT match source-address Nutanix_Cluster destination-address any application tcp-2020 application tcp-2009
set security policies from-zone trust to-zone ISP6 policy Nutanix_Cluster-OWEN-EDIT then permit
set security policies from-zone trust to-zone ISP6 policy Nutanix_Cluster-OWEN-EDIT then log session-init
set security policies from-zone trust to-zone ISP6 policy Nutanix_Cluster-OWEN-EDIT then log session-close
set security policies from-zone trust to-zone ISP6 policy Nutanix_Cluster-OWEN-EDIT then count
步骤六:定义网段或特定IP从那条ISP线路访问外网资源

INGRESS_FROM_TRUST---- 在内网接口应用过滤器filter [reth4.500 zone trust]

set firewall family inet filter INGRESS_FROM_TRUST term Nutanix_Cluster from source-address 172.18.18.45/32
set firewall family inet filter INGRESS_FROM_TRUST term Nutanix_Cluster from source-address 172.18.18.50/32
set firewall family inet filter INGRESS_FROM_TRUST term Nutanix_Cluster from source-address 172.18.18.42/32
set firewall family inet filter INGRESS_FROM_TRUST term Nutanix_Cluster from source-address 172.18.18.48/32
set firewall family inet filter INGRESS_FROM_TRUST term Nutanix_Cluster from source-address 172.18.18.52/32
set firewall family inet filter INGRESS_FROM_TRUST term Nutanix_Cluster from source-address 172.18.18.55/32
set firewall family inet filter INGRESS_FROM_TRUST term Nutanix_Cluster from source-address 172.18.18.58/32
set firewall family inet filter INGRESS_FROM_TRUST term Nutanix_Cluster from destination-address 0.0.0.0/0
set firewall family inet filter INGRESS_FROM_TRUST term Nutanix_Cluster then routing-instance FORWARD_TO_ISP6
步骤七:新定义之firewall filter策略执行 then acceppt,若之前已有跳至步骤八;
set firewall family inet filter INGRESS_FROM_TRUST term ACCEPT_ALL then accept
步骤八:把步骤六插入步骤七之前,即调整策略优先顺序;
insert firewall family inet filter INGRESS_FROM_TRUST term Nutanix_Cluster before term ACCEPT_ALL
步骤九:查询NAT会话,确定IN AND OUT双向策略是否正确;

show security flow session nat destination-port 2020
node0:

Session ID: 91904, Policy name: LEGACY_ID_15/89, State: Backup, Timeout: 14342, Valid
In: 172.18.18.45/46082 --> 202.82.130.199/2020;tcp, If: reth4.500, Pkts: 0, Bytes: 0
Out: 202.82.130.199/2020 --> 119.145.16.241/24323;tcp, If: reth25.3001, Pkts: 0, Bytes: 0

Session ID: 234948, Policy name: Nutanix_Cluster-OWEN-EDIT/263, State: Backup, Timeout: 14292, Valid
In: 202.82.130.199/6688 --> 210.21.218.163/2020;tcp, If: reth25.3006, Pkts: 0, Bytes: 0
Out: 172.18.18.50/2020 --> 202.82.130.199/6688;tcp, If: reth4.500, Pkts: 0, Bytes: 0
Total sessions: 2

推荐阅读:
  1. Juniper SRX防火墙HA配置
  2. Juniper SRX550防火墙之基本配置

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

juniper srx 240

上一篇:优化Apache安全方面(二)——防盗链、隐藏版本信息

下一篇:Gitlab数据备份及数据恢复重置gitlab管理密码方法

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》