防火墙技术案例3 - 校园网出口网关配置 下载本文

9、配置基于zone的NAT Server,使外网用户能够访问内网服务器。

一般情况下一台服务器的私网IP会映射成多个ISP的公网地址,供各个ISP的用户访问。 下面以其中一台图书馆服务器10.1.10.10为例配置基于zone的NAT Server。

[USG] nat server 1 zone isp1 global 200.1.10.10 inside 10.1.10.10 description lb-isp1 [USG] nat server 1 zone isp2 global 202.1.10.10 inside 10.1.10.10 description lb-isp2 [USG] nat server 1 zone csnet global 218.1.10.10 inside 10.1.10.10 description csnet [USG] ip route-static 218.1.10.10 32 NULL 0

10、配置智能DNS,使各个ISP的外网用户都能够使用自己所在的ISP地址访问内网服务器。 智能DNS的作用是确保各个ISP的用户访问学校的服务器时,都能够解析到自己ISP的地址,从而提高访问速度。例如ISP1的用户通过域名访问图书馆服务器10.1.10.10时,会解析到服务器的ISP1地址200.1.10.10。

【强叔点评】使用智能DNS的前提是内网部署了DNS服务器(本案例仅以10.1.10.20为例)。 智能DNS将分配给每个ISP的服务器地址与连接ISP的出接口绑定。

各位小伙伴注意,智能DNS功能是USG9000系列V300R001C20版本的新功能噢~ [USG] dns resolve

[USG] dns server 10.1.10.20 [USG] dns-smart enable

[USG] dns-smart group 1 type single [USG-dns-smart-group-1] description lb

[USG-dns-smart-group-1] real-server-ip 10.1.10.10

[USG-dns-smart-group-1] out-interface GigabitEthernet 1/0/0 map 218.1.10.10 [USG-dns-smart-group-1] out-interface GigabitEthernet 1/0/1 map 200.1.10.10 [USG-dns-smart-group-1] out-interface GigabitEthernet 1/0/2 map 202.1.10.10 11、配置攻击防范,保护内部网络安全。 [USG] firewall defend land enable [USG] firewall defend smurf enable [USG] firewall defend fraggle enable [USG] firewall defend winnuke enable [USG] firewall defend source-route enable [USG] firewall defend route-record enable [USG] firewall defend time-stamp enable [USG] firewall defend ping-of-death enable [USG] firewall defend syn-flood enable

[USG] firewall defend syn-flood interface GigabitEthernet1/0/0 max-rate 24000 tcp-proxy auto [USG] firewall defend syn-flood interface GigabitEthernet1/0/1 max-rate 24000 tcp-proxy auto [USG] firewall defend syn-flood interface GigabitEthernet1/0/2 max-rate 24000 tcp-proxy auto 【强叔点评】一般情况下,如果对网络安全没有特殊要求,开启以上攻击防范即可。

对于syn flood攻击防范,建议10GE接口阈值取值16000pps。本案例的接口都是10GE接口,之所以取值为24000pps,也是实际试验的结果。因为实际经验往往是配置较大的阈值,然后一边观察一边调小阈值,直到调整到合适的范围(既很好的限制了攻击,又不影响正常业务)。 12、配置带宽管理,限制网络的P2P流量。

【强叔点评】带宽管理的配置方法是先创建带宽通道(也就是指定各种限流动作),然后在带宽策略中引用带宽通道。需要特别注意的是上传、下载的方向与outbound、inbound的关系。另外一般情况下建议限制P2P流量到网络总流量的20%到30%。

各位小伙伴注意,带宽管理功能是USG9000系列V300R001C20版本的新功能噢~ [USG] car-class p2p_all_download

[USG-car-class-p2p_all_download] car-mode per-ip [USG-car-class-p2p_all_download] cir 100000 [USG-car-class-p2p_all_download] cir 4000000 total [USG-car-class-p2p_all_download] quit [USG] car-class p2p_all_upload

[USG-car-class-p2p_all_upload] car-mode per-ip [USG-car-class-p2p_all_upload] cir 100000 [USG-car-class-p2p_all_upload] cir 4000000 total [USG-car-class-p2p_all_upload] quit [USG] car-policy zone trust inbound

[USG-car-policy-zone-trust-inbound] policy 0

[USG-car-policy-zone-trust-inbound-0] policy application category p2p [USG-car-policy-zone-trust-inbound-0] action car

[USG-car-policy-zone-trust-inbound-0] car-class p2p_all_download [USG-car-policy-zone-trust-inbound-0] description p2p_limit_download [USG-car-policy-zone-trust-inbound-0] quit [USG] car-policy zone trust outbound

[USG-car-policy-zone-trust-outbound] policy 0

[USG-car-policy-zone-trust-outbound-0] policy application category p2p [USG-car-policy-zone-trust-outbound-0] action car

[USG-car-policy-zone-trust-outbound-0] car-class p2p_all_upload [USG-car-policy-zone-trust-outbound-0] description p2p_limit_upload [USG-car-policy-zone-trust-outbound-0] quit

13、配置日志和NAT溯源功能,在网管系统eSight上查看日志。

配置USG向日志主机(10.1.10.30)发送系统日志(本案例发送IPS日志和攻击防范日志)。 [USG] info-center enable [USG] engine log ips enable

[USG] info-center source ips channel loghost log level emergencies [USG] info-center source ANTIATTACK channel loghost [USG] info-center loghost 10.1.10.30

配置USG向日志主机(10.1.10.30)发送会话日志(端口9002)。这里需要在trust与isp、isp2、csnet间的双方向都配置审计策略。本案例仅以trust与isp1间的outbound方向的审计策略为例。 [USG] firewall log source 172.16.1.1 9002 [USG] firewall log host 2 10.1.10.30 9002

[USG] audit-policy interzone trust isp1 outbound

[USG- audit-policy -interzone-trust-isp1-outbound] policy 0 [USG- audit-policy -interzone-trust-isp1-outbound-0] action audit

本案例中日志主机(10.1.10.30)上安装了网管系统eSight。如果希望在eSight上查看日志,需要在USG上配置SNMP,使USG与eSight对接。eSight上的SNMP参数需要与USG上保持一致。 [USG] snmp-agent sys-info v3

[USG] snmp-agent group v3 NMS1 privacy

[USG] snmp-agent usm-user v3 admin1 NMS1 authentication-mode md5 Admin@123 privacy-mode aes256 Admin@123

eSight配置完成后,在eSight上选择“业务>安全业务>LogCenter>日志分析>会话分析> IPv4会话日志”,可以查看会话日志。(此图仅为示意,后续专门带来真实数据的防火墙与esight对接案例)

【拍案惊奇】

1、此案例的惊奇之处在于几乎囊括了防火墙的所有经典特性:安全策略、NAT、ASPF、攻击防范、IPS、带宽管理(基于应用的带宽限制、基于每IP的带宽限制)。防火墙功能繁多,如果小伙伴们不知道如何选择,那么参考此样板案例就八九不离十啦~

2、此案例的另一惊奇之处在于展现了防火墙作网关的能力。网关最重要的特性之一就是出口选路。防火墙通过ISP选路功能实现基于目的地址的选路,通过策略路由功能实现基于源地址的选路,通过智能DNS功能实现外网用户访问内网服务器的选路(选择最适合的服务器)。

另外与路由器作网关相比,防火墙作网关的优势在于更强大的NAT、更强大的安全性。

3、此案例的又一惊奇之处在于展现了防火墙的NAT溯源功能(防火墙上配置审计策略后,会将会话日志发送给网管系统,客户在网管系统上能够查看到NAT前后的地址)。这个功能最近很火,是应对上级和相关部门检查的利器噢~ 【参考资料】

对于上面强叔提到的ISP选路、智能DNS以及带宽管理等USG9000系列V300R001C20版本的新功能,各位小伙伴一定迫不及待地想深入学习一番,请访问V300R001C20版本产品文档,下载产品文档,在管理员指南中的负载均衡以及带宽管理章节中一探究竟吧。

【强叔问答】看完此案例后,强叔请各位小伙伴谈谈你对出口网关的认识?