实验三十三:防火墙技术_实验防火墙技术实验

2020-02-27 其他范文 下载本文

实验三十三:防火墙技术由刀豆文库小编整理,希望给你工作、学习、生活带来方便,猜你可能喜欢“实验防火墙技术实验”。

实验三十三:防火墙技术

一、理论基础

1.什么是防火墙

对于报文的访问控制技术被称为防火墙技术。实施是为了保护内部网络免遭非法数据包的侵害。正如防火墙这一词语本身所显示的那样,防火墙一般部署于一个网络的边缘,用于控制进入网络数据包的种类。

防火墙作为Internet访问控制的基本技术,其主要作用是监视和过滤通过它的数据包,根据自身所配置的访问控制策略决定该包应当被转发还是应当被抛弃,以拒绝非法用户访问网络并保障合法用户正常工作。

一般应将防火墙置于被保护网络的入口点来执行访问控制。例如,将防火墙设置在内部网和外部网的连接处,以保护内部网络或数据免于为未认证或未授权的用户访问,防止来自外网的恶意攻击。也可以用防火墙将企业网中比较敏感的网段与相对开放的网段隔离开来,对受保护数据的访问都必须经过防火墙的过滤,即使该访问是来自组织内部。

防火墙可通过监测、限制、更改跨越防火墙的数据流,尽可能地对外部屏蔽网络内部的信息、结构和运行状况,以此来实现网络的安全保护。现在的许多防火墙同时还具有一些其它特点,如进行用户身份鉴别,对信息进行安全(加密)处理等等。

在路由器上配置了防火墙特性后,路由器就成了一个健壮而有效的防火墙。

2.防火墙的分类

一般把防火墙分为两类:网络层防火墙、应用层防火墙。网络层的防火墙主要获取数据包的包头信息,如协议号、源地址、目的地址和目的端口等或者直接获取包头的一段数据,而应用层的防火墙则对整个信息流进行分析。

常见的防火墙有以下几类:

应用网关(Application Gateway)包过滤(Packet Filter)代理(Proxy)

3、ACL 华为路由器的防火墙配置包括两个内容,一是定义对特定数据流的访问控制规则,即定义访问控制列表ACL;二是定义将特定的规则应用到具体的接口上,从而过滤特定方向的数据流。

常用的访问控制列表可以分为两种:标准的访问控制列表和扩展的访问控制列表。标准访问控制列表仅仅可以根据IP报文的源地址域区分不同的数据流,扩展访问控制列表则可以根据IP报文中的更多域(如目的IP地址,上层协议信息等)来区分不同数据流。所有的访问控制列表都有一个编号,标准的访问控制列表和扩展的访问控制列表就是按照这个编号来区分的:标准的访问控制列表编号范围是1-99,扩展的访问控制列表编号范围是100-199。

二、实验案例

防火墙的配置

1、实验拓扑结构图:

在实验室我们用RouterA模拟企业网,用另一台路由器RouterB模拟外部网。

2、配置说明:

RouterA的各个接口的地址分别为: E0:192.168.1.1/24 S0:192.168.2.1/24 RouterB的各个接口的地址分别为: E0:192.168.3.1/24 S0:192.168.2.2/24 pcA的地址:192.168.1.2/24 网关:192.168.1.1 pcB的地址:192.168.1.3/24 网关:192.168.1.1 pcC的地址:192.168.3.2/24 网关:192.168.3.2

3、具体的配置:

方法一:(标准的)

RouterA上配置策略(启动防火墙)[routerA]firewall enable Firewall enabled [routerA]acl 1 [routerA-acl-2000]rule normal permit source 192.168.1.2 0.0.0.0 Rule has been added to normal packet-filtering rules [routerA-acl-2000]rule normal deny source 192.168.1.0 0.0.0.255 Rule has been added to normal packet-filtering rules [routerA-acl-2000] [routerA]int s0 [routerA-Serial0]firewall packet-filter 1 outbound [routerA-Serial0] [routerA]dis cur Now create configuration...Current configuration version 1.74 sysname routerA firewall enable aaa-enable aaa accounting-scheme optional acl 2000 match-order auto rule normal permit source 192.168.1.2 0.0.0.0 rule normal deny source 192.168.1.0 0.0.0.255 interface Aux0 async mode flow link-protocol ppp interface Ethernet0 ip addre 192.168.1.1 255.255.255.0 interface Serial0 link-protocol ppp ip addre 192.168.2.1 255.255.255.0 firewall packet-filter 2000 outbound interface Serial1 link-protocol ppp interface Serial2 link-protocol ppp quit rip network all quit return RouterB的配置: [RouterB]int s0 [RouterB-Serial0]ip addre 192.168.2.2 255.255.255.0 [RouterB-Serial0] %15:49:51: Line protocol ip on the interface Serial0 is UP [RouterB-Serial0]int E0 [RouterB-Ethernet0]ip addre 192.168.3.1 255.255.255.0 [RouterB-Ethernet0] %15:50:31: Line protocol ip on the interface Ethernet0 is UP [RouterB-Ethernet0] [RouterB]rip waiting...RIP is running [RouterB-rip]network all [RouterB-rip]save Now writing the running config to flash memory.Please wait for a while......write the running config to flash memory succefully [RouterB-rip] [RouterB]int s0 [RouterB-Serial0]clock dteclk3 [RouterB-Serial0] %15:52:25: Interface Serial0 is DOWN %15:52:25: Interface Serial0 is UP %15:52:25: Line protocol ip on the interface Serial0 is UP [RouterB-Ethernet0]save Now writing the running config to flash memory.Please wait for a while......write the running config to flash memory succefully

方法二:(扩展的)RouterA的配置:

其它的配置和上面的保持一致,不同的是: [routerA]acl 101 [routerA-acl-3001] [routerA]acl 101 match-order auto [routerA-acl-3001]rule normal permit ip source 192.168.1.2 0.0.0.0 destination 192.168.3.2 0.0.0.0 Rule has been added to normal packet-filtering rules [routerA-acl-3001]rule normal deny ip source 192.168.1.0 0.0.0.255 destination 192.168.3.2 0.0.0.0 Rule has been added to normal packet-filtering rules [routerA-acl-3001] [routerA]dis cur Now create configuration...Current configuration version 1.74 sysname routerA firewall enable aaa-enable aaa accounting-scheme optional acl 3001 match-order auto rule normal permit ip source 192.168.1.2 0.0.0.0 destination 192.168.3.2 0.0.0.0 rule normal deny ip source 192.168.1.0 0.0.0.255 destination 192.168.3.2 0.0.0.0 interface Aux0 async mode flow link-protocol ppp interface Ethernet0 ip addre 192.168.1.1 255.255.255.0 interface Serial0 link-protocol ppp ip addre 192.168.2.1 255.255.255.0 interface Serial1 link-protocol ppp interface Serial2 link-protocol ppp quit rip network all quit return [routerA] [routerA]int s0 [routerA-Serial0]firewall packet-filter 101 outbound [routerA-Serial0] [routerA]dis cur Now create configuration...Current configuration version 1.74 sysname routerA firewall enable aaa-enable aaa accounting-scheme optional acl 3001 match-order autorule normal permit ip source 192.168.1.2 0.0.0.0 destination 192.168.3.2 0.0.0.0 rule normal deny ip source 192.168.1.0 0.0.0.255 destination 192.168.3.2 0.0.0.0 interface Aux0 async mode flow link-protocol ppp interface Ethernet0 ip addre 192.168.1.1 255.255.255.0 interface Serial0 link-protocol ppp ip addre 192.168.2.1 255.255.255.0 firewall packet-filter 3001 outbound interface Serial1 link-protocol ppp interface Serial2 link-protocol ppp quit rip network all quit return

三、实验总结

在使用标准的访问控制列表的实验1中,我们只允许IP地址为:192.168.1.2的PCA访问外部网络,而禁止其它PC机访问外网。

在扩展的访问控制列表的实验2中,我们通过配置可以控制只有特定的数据源PCA访问特定的目标PCC,而使用标准的控制列表是不能实现的。

在访问控制列表命令中还有normal字段,这是区别于special的,即我们可以分时间段进行不同的访问控制策略。此时,需要允许时间段控制和设定特定时间段。同时在同一列表中若有多条规则,多条规则之间采用深度优先的原则,即描述的地址范围越小,优先级越高,越先考虑。在多条列表时,先匹配列表序号大的规则,如果匹配则按该规则处理数据包,如果不匹配则匹配较小序号的列表,直到最后。等等一系列的配置在此不再详细阐述,大家可以自行完成。

《实验三十三:防火墙技术.docx》
将本文的Word文档下载,方便收藏和打印
推荐度:
实验三十三:防火墙技术
点击下载文档
相关专题 实验防火墙技术实验 防火墙 技术 三十三 实验防火墙技术实验 防火墙 技术 三十三
[其他范文]相关推荐
    [其他范文]热门文章
      下载全文