《防火墙配置实训》专业实习答案(福大) - 图文

更新时间:2023-11-14 16:02:01 阅读量: 教育文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

实训任务书

一、

要求:

1) 企业网络中由防火墙作为中继代理,由DMZ区的DHCP服务器为内部主机分配动态地

址。升级许可证。 2) 设置登录密码和特权模式密码。

3) 作为管理员平时的任务把防火墙操作系统和配置文件备份下来。

4) 允许内网用户使用telnet登录,允许外网用户使用ssh方式安全登录防火墙。允许内外

网用户运用asdm方式管理防火墙。 (1)

pixfirewall(config)# int e1

pixfirewall(config-if)# no shutdown pixfirewall(config-if)# nameif

inside

INFO: Security level for \pixfirewall(config-if)# ip add 10.10.10.1 255.255.255.0 pixfirewall(config-if)# int e0 pixfirewall(config-if)# no shutdown

pixfirewall(config-if)# ip add 200.200.200.1 255.255.255.0 pixfirewall(config-if)# nameif

outside

INFO: Security level for \pixfirewall(config-if)# exit pixfirewall(config)# int e2

pixfirewall(config-if)# no shutdown

pixfirewall(config-if)# ip add 100.100.100.1 255.255.255.0 pixfirewall(config-if)# nameif

dmz

INFO: Security level for \pixfirewall(config-if)# security-level 50 pixfirewall(config)# activation-key 重启

pixfirewall(config)# dhcprelay server 100.100.100.2 dmz 定义一个DHCP服务器 pixfirewall(config)# dhcprelay timeout 120 设置超时应答

pixfirewall(config)# dhcprelay setroute inside 引入防火墙接口作为默认网关(将防火墙的接口inside的ip地址作为内网用户的默认网关) pixfirewall(config)# dhcprelay enable inside 启用DHCP

2)

pixfirewall(config)# username linli password 123456 pixfirewall(config)# enable password 123456

pixfirewall(config)# aaa authentication enable console LOCAL

pixfirewall(config)# aaa authentication serial console LOCAL

aaa authentication telnet console LOCAL --------启用本地库的telnet aaa authentication ssh console LOCAL --------启用本地库的ssh aaa authentication http console LOCAL --------启用本地库的http http server enable ----------启用嵌入式HTTP服务器

http 200.200.1.0 255.255.255.0 outside ------------允许外网用户运用asdm方式管理防火墙。 http 192.168.1.0 255.255.255.0 inside ------------允许内网用户运用asdm方式管理防火墙。 3)

pixfirewall# copy tftp flash

Address or name of remote host []? 200.200.200.2 Source filename []? asdm-512.bin

Destination filename [asdm-512.bin]? asdm.bin pixfirewall(config)# asdm image flash:/asdm.bin pixfirewall# copy run tftp Source filename [running-config]?

Address or name of remote host []? 200.200.200.2 Destination filename [running-config]? sx1

第 2 页 2

Cryptochecksum: 87f73ec8 43a9be77 af58152f 4354838f !

1928 bytes copied in 3.190 secs (642 bytes/sec)

4)

pixfirewall(config)# telnet 10.10.10.0 255.255.255.0 inside pixfirewall(config)# passwd 123456

pixfirewall(config)# aaa authentication telnet console LOCAL

pixfirewall(config)# crypto key generate rsa general-keys modulus 1024 INFO: The name for the keys will be: Keypair generation process begin. Please wait...

pixfirewall(config)# ssh 200.200.200.2 255.255.255.0 outside pixfirewall(config)# aaa authentication ssh console LOCAL pixfirewall(config)# http 200.200.200.2 255.255.255.255 outside pixfirewall(config)# http 10.10.10.2 255.255.255.255 inside pixfirewall(config)# http server enable

pixfirewall(config)# aaa authentication http console LOCAL

第 3 页 3

二、

要求:

1) 企业内部有两个分支机构,每个分支机构都有自己的防火墙,这两个防火墙通过ospf

路由协议相互访问。 2) 两个防火墙有一个公共的DMZ区,设置一个AAA服务器,由AAA服务器集中对两个

防火墙的用户进行身份验证、授权、审计,为两个管理员分别设置权限级别8和权限10级别。为项目经理设置最高权限。

3) 在DMZ区再设置一个日志服务器,由日志服务器统计记录两个防火墙的level 为4的

日志消息,并在消息中标识每个防火墙。并设置将为level 5,6,7的日志发往控制台、登录终端、内部缓存区等不同目的作为对联系不上日志服务器的备份。 (1)

pixfirewall# config t

pixfirewall(config)# int e0

pixfirewall(config-if)# nameif dmz

INFO: Security level for \pixfirewall(config-if)# security-level 50

pixfirewall(config-if)# no shutdown

pixfirewall(config-if)# ip add 100.100.100.1 255.255.255.0 pixfirewall(config-if)# int e1

pixfirewall(config-if)# no shutdown

pixfirewall(config-if)# nameif inside

INFO: Security level for \pixfirewall(config-if)# ip add 192.168.0.1 255.255.255.0

pixfirewall(config-if)# router ospf 1

pixfirewall(config-router)# network 192.168.0.0 255.255.255.0 area 100 pixfirewall(config-router)# network 100.100.100.0 255.255.255.0 area 0 pixfirewall(config-router)# area 100 authentication message-digest pixfirewall(config-router)# area 0 authentication message-diges pixfirewall(config)# int e0

第 4 页 4

pixfirewall(config-if)# ospf message-digest-key 1 md5 123456 pixfirewall(config-if)# int e1

pixfirewall(config-if)# ospf message-digest-key 1 md5 123456 pixfirewall# sh route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set

O IA 200.200.200.0 255.255.255.0 [110/20] via 100.100.100.2, 0:13:46, dmz C 100.100.100.0 255.255.255.0 is directly connected, dmz C 192.168.0.0 255.255.255.0 is directly connected, inside

pixfirewall# config t pixfirewall(config)# int e0 pixfirewall(config-if)# no shutdown

pixfirewall(config-if)# ip add 100.100.100.2 255.255.255.0 pixfirewall(config-if)# nameif dmz

INFO: Security level for \pixfirewall(config-if)# security-level 50 pixfirewall(config-if)# int e1

pixfirewall(config-if)# nameif inside

INFO: Security level for \pixfirewall(config-if)# no shutdown

pixfirewall(config-if)# ip add 200.200.200.1 255.255.255.0 pixfirewall(config)# router ospf 2

pixfirewall(config-router)# router-id 100.100.100.2

pixfirewall(config-router)# network 200.200.200.0 255.255.255.0 area 200 pixfirewall(config-router)# network 100.100.100.0 255.255.255.0 area 0

pixfirewall(config-router)# area 0 authentication message-digest -在区域0内验证OSPF与其他邻居的交换

pixfirewall(config-router)# area 200 authentication message-digest -------在区域200内验证OSPF与其他邻居的交换 pixfirewall(config)# int e0

pixfirewall(config-if)# ospf message-digest-key 1 md5 123456 pixfirewall(config-if)# int e1

pixfirewall(config-if)# ospf message-digest-key 1 md5 123456 pixfirewall# sh route

第 5 页 5

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

* - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set

C 200.200.200.0 255.255.255.0 is directly connected, inside

C 100.100.100.0 255.255.255.0 is directly connected, dmz

O IA 192.168.0.0 255.255.255.0 [110/20] via 100.100.100.1, 0:01:56, dmz (2)

pixfirewall(config)# username gl01 password 123456 privilege 8 pixfirewall(config)# username gl02 password 123456 privilege 10

pixfirewall(config)# username linli password 123456 privilege 15

pixfirewall(config)# aaa-server linli protocol tacacs+ 定义防火墙服务器组和协议

pixfirewall(config-aaa-server-group)# aaa-server linli (dmz) host 100.100.100.3 为群组加服务器

pixfirewall(config-aaa-server-host)# key 123456

pixfirewall(config)# aaa authentication serial console linli LOCAL 启用控制台本地库 pixfirewall(config)# privilege show level 8 command conn 大于8显示连接表条目

pixfirewall(config)# privilege configure level 10 command terminal 大于10的用户进入configure模式

pixfirewall(config)# aaa authorization command LOCAL 启用命令的本地库 pixfirewall(config)# aaa accounting command privilege 15 linli 在用户执行特权等级大于15才启用命令统计 (3)

pixfirewall(config)# logging enable pixfirewall(config)# logging trap 4

pixfirewall(config)# logging host dmz 100.100.100.3 WARNING: interface Ethernet0 security level is 50. pixfirewall# shun 100.100.100.3

Shun 100.100.100.3 added in context: single_vf Shun 100.100.100.3 successful pixfirewall# no shun 100.100.100.3

第 6 页 6

pixfirewall(config)# logging console 5

%PIX-5-111008: User 'enable_15' executed the 'logging console 5' command. pixfirewall(config)# logging monitor 6

%PIX-5-111008: User 'enable_15' executed the 'logging monitor 6' command.

pixfirewall(config)# logging buffered 7

%PIX-5-111008: User 'enable_15' executed the 'logging buffered 7' command. logging enable -------启用消息日志

logging console notifications ------------发送日志到防火墙控制台,严重等级为5通告 logging monitor informational -----------发送日志到防火墙的登录终端,严重等级为6消息 logging buffered debugging ---------设置内部缓存区,严重等级为7调试

第 7 页 7

logging trap warnings ---------设置日志等级为4 logging host dmz 200.200.200.10 --------Syslog服务器目的地

pixfirewall# copy run tftp Source filename [running-config]?

Address or name of remote host []? 100.100.100.3 Destination filename [running-config]? sx2-right

Cryptochecksum: 35c9bd0d 11e0b25f cf9f3377 1f92b31d !

2313 bytes copied in 1.870 secs (2313 bytes/sec)

%PIX-5-111008: User 'enable_15' executed the 'copy running-config tftp' command. 三、

要求:

1) 将内网用户配置上网,定义网络对象,可以实现基本上网需求,访问网页,安全访问加

密网站,上传下载,聊天,收发邮件等。并限制在工作时间不可聊天。 2) 将DMZ区web服务器、mail 服务器发布到外网,供外网用户访问。 3) 为内网用户通过VPN访问合作伙伴网络设置NAT豁免。

第 8 页 8

pixfirewall(config)# int e1

pixfirewall(config-if)# no shutdown

pixfirewall(config-if)# ip add 100.100.100.1 255.255.255.0 pixfirewall(config-if)# nameif inside pixfirewall(config-if)# int e0 pixfirewall(config-if)# no shutdown

pixfirewall(config-if)# ip add 200.200.200.1 255.255.255.0 pixfirewall(config-if)# nameif outside

INFO: Security level for \pixfirewall(config-if)# int e2

pixfirewall(config-if)# nameif dmz

INFO: Security level for \pixfirewall(config-if)# security-level 50

pixfirewall(config-if)# ip add 10.10.10.1 255.255.255.0 pixfirewall(config-if)# exit

pixfirewall(config)# object-group service mail-ser tcp 防火墙中有对象组(Object Group)

用于简化ACL的配置管理,路由器没有相关概念

Object Group允许把任意多个,可设置同一访问策略的,IP地址,IP协议及端口号组成一组,共享一条ACE,还可以重复使用。大大减少了必须的ACE数量,简化了ACL配置;同时,修改Object Group中的成员后,与之相关联的ACL会自动更新,这样也简化了ACL的维护工作。

pixfirewall(config-service)# port-object eq smtp

pixfirewall(config-service)# port-object eq pop3 pixfirewall(config-service)# port-object eq smtp pixfirewall(config-service)# port-object eq www pixfirewall(config-service)# port-object eq ftp pixfirewall(config-service)# port-object eq https

第 9 页 9

pixfirewall(config-service)# port-object eq talk

pixfirewall(config)# time-range work

pixfirewall(config-time-range)# periodic weekdays 8:00 to 18:00 pixfirewall(config)# object-group service deny tcp pixfirewall(config-service)# port-object eq talk

pixfirewall(config)#access-list acl-inside extended permit tcp any any object-group mail-ser pixfirewall(config)#access-list in-deny extended permit tcp any any object-group deny time-range work

pixfirewall(config)# access-group in-deny in interface inside pixfirewall(config)# access-group acl-inside in int outside 2)

pixfirewall(config)#static (dmz,outside) tcp 200.200.200.4 smtp 10.10.10.2 smtp netmask 255.255.255.255

pixfirewall(config)#static (dmz,outside) tcp 200.200.200.4 www 10.10.10.2 www netmask 255.255.255.255

pixfirewall(config)# access-list acl-inside extended permit tcp any host 200.200.200.4 eq smtp pixfirewall(config)# access-list acl-inside extended permit tcp any host 200.200.200.4 eq www pixfirewall(config)# access-group acl-inside in int outside 3)

pixfirewall(config)# access-list nat-hm extended permit ip 100.100.100.0 255.255.255.0 200.200.200.0 255.255.255.0

pixfirewall(config)# nat (inside) 0 access-list nat-hm pixfirewall# sh xlate interface inside 2 in use, 2 most used

pixfirewall# sh xlate interface dmz

2 in use, 2 most used PAT Global 200.200.200.4(25) Local 10.10.10.2(25) PAT Global 200.200.200.4(80) Local 10.10.10.2(80) pixfirewall# sh xlate interface outside 2 in use, 2 most used

PAT Global 200.200.200.4(25) Local 10.10.10.2(25) PAT Global 200.200.200.4(80) Local 10.10.10.2(80) 四、

要求: 第七章检测流量

1) 在第3题基础上,定制安全策略。制定策略过滤URL,Java,activex内容。

2) 定制模块策略,将视频语音流量优先发送,将BT流量限制速率为1M,将http,mail,ftp流量发往CSC防病毒模块检测,将所有流量送至AIP入侵检测模块进行检测。

3) 配置应用检测,对http,smtp,icmp,ftp流量设置应用检测。

pixfirewall(config)# url-server (inside) vendor n2h2 host 100.100.100.2 制定过滤服务器 pixfirewall(config)# filter url http 100.100.100.0 25 cvfderwazxcvv5.255.255.0 0 0 定义过滤策略

pixfirewall(config)# filter activex except 100.100.1 00.0 255.255.255.0 0 0 为过滤策略定制例

第 10 页 10

外的情况URL,Java,activex

pixfirewall(config)# filter java except 100.100.100.0 255.255.255.0 0 0 pixfirewall(config)# policy-map pri 定制策略表 pixfirewall(config-pmap)# class rtp pixfirewall(config-pmap-c)# priority pixfirewall(config-pmap-c)# exit pixfirewall(config)# priority-queue inside

pixfirewall(config-priority-queue)# tx-ring-limit 50 pixfirewall(config-priority-queue)# exit pixfirewall(config)# service-policy pri int inside pixfirewall(config)# class-map ftp

pixfirewall(config-cmap)# match port tcp eq ftp pixfirewall(config)# policy-map pri pixfirewall(config-pmap)# class ftp

pixfirewall(config-pmap-c)#police input 1000000 conform-action transmit exceed-action drop exceepixfirewall(config-pmap-c)# exit pixfirewall(config-pmap)# exit pixfirewall(config)# policy-map pri pixfirewall(config-pmap)# class ftp pixfirewall(config-pmap-c)# inspect ftp pixfirewall(config-pmap-c)# exit

pixfirewall(config-pmap)# exit

pixfirewall(config)# class-map inspect pixfirewall(config-cmap)# macth

pixfirewall(config-cmap)# match port tcp eq http pixfirewall(config-cmap)# exit pixfirewall(config)# policy-map pri pixfirewall(config-pmap)# class inspect pixfirewall(config-pmap-c)# inspect http pixfirewall(config)# class-map icmp pixfirewall(config-cmap)# match any pixfirewall(config-cmap)# exit pixfirewall(config)# policy-map pri pixfirewall(config-pmap)# class icmp pixfirewall(config-pmap-c)# inspect icmp pixfirewall(config-pmap)# class class-default pixfirewall(config-pmap-c)# inspect esmtp pixfirewall(config-pmap-c)# exit pixfirewall(config-pmap)# exit pixfirewall# sh service-policy

Interface inside:

Service-policy: pri

第 11 页 11

Class-map: rtp

Priority:

Interface inside: aggregate drop 0, aggregate transmit 0 Class-map: ftp

Input police Interface inside: cir 1000000 bps, bc 31250 bytes

conformed 0 packets, 0 bytes; actions: transmit exceeded 0 packets, 0 bytes; actions: drop conformed 0 bps, exceed 0 bps Inspect: ftp, packet 0, drop 0, reset-drop 0 Class-map: inspect

Inspect: http, packet 0, drop 0, reset-drop 0 Class-map: icmp

Inspect: icmp, packet 0, drop 0, reset-drop 0

Class-map: class-default

Inspect: esmtp _default_esmtp_map, packet 0, drop 0, reset-drop 0 pixfirewall#

五、 要求:

在第3题基础上,新购置一台同等型号防火墙,两台防火墙在不同楼层相距甚远。配置

故障切换,保障在故障切换时网络状态不中断。

pixfirewall(config)# no failover active pixfirewall(config)#

Switching to Standby

第 12 页 12

六、

要求:

在第3题基础上

1) 验证防火墙的连通性

2) 检查防火墙的生命特征。查看防火墙的cpu,memory,计算出防火墙每秒钟的数据吞

吐量,查看输入输出数据速率及丢包错误情况,查看故障切换情况,查看地址转换

表和连接表项。

检查防火墙的生命特征。查看防火墙的show cpu, show memory,计算出防火墙每秒钟的数据吞吐量,查看输入输出数据速率及丢包错误情况show interface,查看故障切换情况show failover,查看地址转换表show xlat和连接表项show conn。 3) 捕获内外网数据流量,下载后运用网络协议分析软件对数据包类型进行分析。 pixfirewall#ping

Interface: outside

Target IP address: 200.200.200.2 Repeat count: [5] Datagram size: [100] Timeout in seconds: [2] Extended commands [n]: Sweep range of sizes [n]:

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 200.200.200.2, timeout is 2 seconds: !!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms pixfirewall# debug icmp trace debug icmp trace enabled at level 1 pixfirewall# show cpu usage

CPU utilization for 5 seconds = 0%; 1 minute: 0%; 5 minutes: 0% pixfirewall# show memory

第 13 页 13

Free memory: 181719192 bytes (68%) Used memory: 86716264 bytes (32%) ------------- ----------------

Total memory: 268435456 bytes (100%) pixfirewall# show traffic outside:

received (in 6360.250 secs):

432 packets 46540 bytes 0 pkts/sec 7 bytes/sec transmitted (in 6360.250 secs): 441 packets 46748 bytes 0 pkts/sec 7 bytes/sec 1 minute input rate 0 pkts/sec, 52 bytes/sec 1 minute output rate 0 pkts/sec, 52 bytes/sec 1 minute drop rate, 0 pkts/sec

5 minute input rate 0 pkts/sec, 53 bytes/sec 5 minute output rate 0 pkts/sec, 53 bytes/sec 5 minute drop rate, 0 pkts/sec inside:

received (in 6360.300 secs):

437 packets 47040 bytes 0 pkts/sec 7 bytes/sec transmitted (in 6360.300 secs):

1759 packets 84012 bytes 0 pkts/sec 13 bytes/sec

<--- More --->

pixfirewall# sh int

Interface Ethernet0 \ Hardware is i82559, BW 100 Mbps, DLY 100 usec Auto-Duplex(Full-duplex), Auto-Speed(100 Mbps) MAC address 00aa.00b8.2b00, MTU 1500

IP address 200.200.200.3, subnet mask 255.255.255.0 365 packets input, 0 bytes, 0 no buffer

Received 7 broadcasts, 0 runts, 0 giants

0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 0 L2 decode drops

361 packets output, 0 bytes, 0 underruns

0 output errors, 0 collisions, 0 interface resets 0 babbles, 0 late collisions, 0 deferred 0 lost carrier, 0 no carrier

input queue (curr/max packets): hardware (0/1) software (0/1) output queue (curr/max packets): hardware (0/1) software (0/1)

第 14 页 14

Traffic Statistics for \

361 packets input, 38814 bytes 361 packets output, 38828 bytes 0 packets dropped

1 minute input rate 0 pkts/sec, 69 bytes/sec 1 minute output rate 0 pkts/sec, 68 bytes/sec 1 minute drop rate, 0 pkts/sec

5 minute input rate 0 pkts/sec, 48 bytes/sec 5 minute output rate 0 pkts/sec, 48 bytes/sec 5 minute drop rate, 0 pkts/sec pixfirewall# sh failover Failover On

Cable status: N/A - LAN-based failover enabled Failover unit Secondary

Failover LAN Interface: lin Ethernet3 (up)

Unit Poll frequency 200 milliseconds, holdtime 800 milliseconds Interface Poll frequency 5 seconds, holdtime 25 seconds Interface Policy 1

Monitored Interfaces 2 of 250 maximum failover replication http

Version: Ours 8.0(2), Mate 8.0(2)

Last Failover at: 04:16:11 UTC Dec 30 2012 This host: Secondary - Standby Ready Active time: 0 (sec)

Interface outside (200.200.200.3): Normal Interface inside (100.100.100.3): Normal Other host: Primary - Active

Active time: 6475 (sec)

Interface outside (200.200.200.2): Normal Interface inside (100.100.100.2): Normal

Stateful Failover Logical Update Statistics

Link : linli Ethernet2 (up)

Stateful Obj xmit xerr rcv rerr General 122 0 122 0 sys cmd 122 0 122 0 <--- More --->

pixfirewall# sh xlate interface inside 2 in use, 2 most used

pixfirewall# sh xlate interface dmz 2 in use, 2 most used

PAT Global 200.200.200.4(25) Local 10.10.10.2(25) PAT Global 200.200.200.4(80) Local 10.10.10.2(80)

第 15 页 15

本文来源:https://www.bwwdw.com/article/031v.html

Top