防火墙使用及功能配置.ppt_第1页
防火墙使用及功能配置.ppt_第2页
防火墙使用及功能配置.ppt_第3页
防火墙使用及功能配置.ppt_第4页
防火墙使用及功能配置.ppt_第5页
已阅读5页,还剩105页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、防火墙使用及功能配置,荆 涛,科技网用户培训,2005-9-27,提纲,防火墙相关知识 Cisco PIX 515E Netscreen 500,防火墙介绍,防火墙的概念,防火墙是指设置在不同网络(如可信任的企业内部网和不可信的公共网)或网络安全域之间的一系列部件的组合。,防火墙术语,网关:在两个设备之间提供转发服务的系统。网关是互联网应用程序在两台主机之间处理流量的防火墙。这个术语是非常常见的。 DMZ非军事化区:为了配置管理方便,内部网中需要向外提供服务的服务器往往放在一个单独的网段,这个网段便是非军事化区。防火墙一般配备三块网卡,在配置时一般分别分别连接内部网,internet和DMZ。

2、 吞吐量:网络中的数据是由一个个数据包组成,防火墙对每个数据包的处理要耗费资源。吞吐量是指在不丢包的情况下单位时间内通过防火墙的数据包数量。这是测量防火墙性能的重要指标。 最大连接数:和吞吐量一样,数字越大越好。但是最大连接数更贴近实际网络情况,网络中大多数连接是指所建立的一个虚拟通道。防火墙对每个连接的处理也好耗费资源,因此最大连接数成为考验防火墙这方面能力的指标。 数据包转发率:是指在所有安全规则配置正确的情况下,防火墙对数据流量的处理速度。 并发连接数目:由于防火墙是针对连接进行处理报文的,并发连接数目是指的防火墙可以同时容纳的最大的连接数目,一个连接就是一个TCP/UDP的访问。,对防

3、火墙的需求,网络规模/流量增长的需求 可靠性的需求 DOS攻击防范的需求 蠕虫病毒防范的需求 日志性能需求,Finance,Business Partner,Regional Office,Telecommuter,DMZ,HR,Wireless Network,Internal attacks, malicious users,Intrusion over WLAN, Hijacked remote session,Compromised PC, U turn attacks,Worms, Trojan attacks,安全产品市场分析,数据来源:CNCERT/CC 2004年全国网络安全状

4、况调查报告,各行业对网络安全技术最高使用率对比,数据来源:CNCERT/CC 2004年全国网络安全状况调查报告,防火墙的发展,1st Generation,2nd Generation,3rd Generation,软件,软硬结合,硬件,Netscreen与一般硬件防火墙比较,Cisco PIX 520防火墙图片,CPU,RAM,Intel EtherExpress Pro/100+,Cisco PIX Firewall 515E,Cisco PIX515E 防火墙,为中小企业而设计 并发吞吐量188Mbps 168位3DES IPSec VPN吞吐量63Mbps Intel 赛扬 433

5、MHz 处理器 64 MB RAM 支持 6 interfaces,PIX:Private Internet eXchange,PIX 515 基本配件,PIX 515主机 接口转换头 链接线 固定角架 电源线 资料,Power LED,The PIX Firewall 515 前面版,Network LED,Active Failover Unit,PIX Firewall 515 模块,Using the quad card requires the PIX Firewall 515-UR license.,PIX Firewall 515双单口连接器,Using two single-p

6、ort connectors requires the PIX Firewall 515-UR license.,The PIX Firewall 515,Failoverconnector,FDXLED,LINKLED,100 MbpsLED,FDXLED,Consoleport (RJ-45),10/100BaseTXEthernet 1(RJ-45),Power switch,LINKLED,100 MbpsLED,10/100BaseTXEthernet 0(RJ-45),LINK LED,通常的连接方案,PIX防火墙通用维护命令,访问模式,PIX Firewall 有4种访问模式:

7、非特权模式:PIX防火墙开机自检后,就处于该模式,系统提示为:pixfirewall 特权模式:enable进入特权模式,可改变当前配置,显示为:pixfirewall# 配置模式:输入configure terminal进入,绝大部分系统配置都在这里进行,显示为:pixfirewall(config)# 监视模式:PIX开机或重启过程中,按住esc键或发送一个break字符进入监视模式,可以在此更新操作系统镜像和口令回复,显示为:monitor,PIX 防火墙基本命令,enable, enable password, passwd write erase, write memory, wri

8、te terminal show interface, show ip address, show memory, show version, show xlate exit reload hostname, ping, telnet,enable 命令,pixfirewall enable password: pixfirewall# configure terminal pixfirewall(config)# pixfirewall(config)# exit pixfirewall#,enable,pixfirewall,Enables you to enter different a

9、ccess modes,enable password password,passwd password,pixfirewall#,enable password 和 passwd 命令,设置进入特权模式的访问密码.,passwd 设置telnet访问控制台口令,pixfirewall#,write 命令,The following are the write commands: write net:将存储当前配置的文件写入到TFTP服务器上 write erase:清除Flash中的配置 write floppy:将配置文件写入软盘 write memory:将配置文件写入到Flash wr

10、ite terminal:显示存储在Flash中的配置信息,show 命令,show history show memory-显示系统内存的使用情况,show memory16777216 bytes total, 5595136 bytes free,show version-浏览PIX防火墙操作信息 show xlate-查看地址转换信息 show cpu usage,pixfirewall# show interface interface ethernet0 “outside” is up, line protocol is up hardware is i82557 ethernet

11、, address is 0060.7380.2f16 ip address , subnet mask MTU 1500 bytes, BW 1000000 Kbit half duplex 1184342 packets input, 1222298001 bytes, 0 no buffer received 26 broadcasts, 27 runts, 0 giants 4 input errors, 0 crc, 4 frame, 0 overrun, 0 ignored, 0 abort 1310091 packets outp

12、ut, 547097270 bytes, 0 underruns 0 unicast rpf drops 0 output errors, 28075 collisions, 0 interface resets 0 babbles, 0 late collisions, 117573 deferred 0 lost carrier, 0 no carrier input queue (curr/max blocks): hardware (128/128) software (0/1) output queue (curr/max blocks): hardware (0/2) softwa

13、re (0/1),show interface 命令,pixfirewall# show ip address Building configuration System IP Addresses: ip address outside ip address inside ip address dmz Current IP Addresses: ip address outside ip addr

14、ess inside ip address dmz ,show ip address 命令,hostname and ping 命令,pixfirewall (config)# hostname proteusproteus(config)# hostname pixfirewall,hostname,hostname newname,pixfirewall(config)#,pixfirewall(config)# ping response received -

15、 0Ms response received - 0Ms response received - 0Ms,ping,ping if_name ip_address,pixfirewall(config)#,pixfirewall(config)# name bastionhost,name 命令,Bastion host,关联一个名称和一个IP地址,name ip_address name,pixfirewall(config)#,telnet 命令,指定可以telnet连接到控制台的主机地址,telnet ip_address net

16、mask if_name,pixfirewall(config)#,kill telnet_id,pixfirewall(config)#,中止一个Telnet 会话,当前通过telnet访问控制台的主机地址,who local_ip,pixfirewall(config)#,pixfirewall(config)# show who 2: From pixfirewall(config)# kill 2,http 命令,设定允许以http访问防火墙的地址范围,http ip_address netmask if_name,pixfirewall(config)#,htt

17、p server enable,pixfirewall(config)#,Enables the PIX Firewall HTTP server,PIX防火墙的6个常用命令,PIX防火墙常用命令,nameif interface ip address nat global route,nameif hardware_id if_name security_level,pixfirewall(config)#,pixfirewall(config)# nameif ethernet2 dmz sec50,nameif,nameif 命令用来命名接口并分配安全等级,interface hardw

18、are_id hardware_speed,pixfirewall(config)#,interface,Interface命令用来标示网络接口的速度和双工属性,pixfirewall(config)# interface ethernet0 100full pixfirewall(config)# interface ethernet1 100full,将outside 和 inside 接口 设置为100兆全双工,ip address if_name ip_address netmask,pixfirewall(config)#,ip address,ip address 用来给每个物理接

19、口分配地址,pixfirewall(config)# ip address dmz ,nat (if_name) nat_id local_ip netmask,pixfirewall(config)#,nat,nat 命令用来联系一个网络和一个全局IP地址池,pixfirewall(config)# nat (inside) 1 ,23,NAT Example,,49090,Source port,Destination addr,Source addr,Destination port,200.2

20、00.200.10,49090,Source port,Destination addr,Source addr,Destination port,0,0,23,Inside,Outside,Internet,,,Translation table,,0,global,建立一个全局地址池,与nat联合使用,pixfirewall(config)# nat (inside) 1 pixfirewall(config)# global (outsid

21、e) 1 0-54,pixfirewall(config)#,global(if_name) nat_id global_ip-global_ipnetmask global_mask | interface,当内部主机访问外部网络时,他们所分配的地址范围是:054,网络地址转换(NAT)配置实例,Backbone, web, FTP, and TFTP server,Pod perimeter router,PIX Firewall,/24,.1, /24,e0 ou

22、tside .2 security level 0,0,Internet,e1 inside .1 security level 100, /24,pixfirewall(config)# nat(inside) 1 pixfirewall(config)# nat (inside) 2 pixfirewall(config)# global(outside) 1 -4 netmask 40 pi

23、xfirewall(config)# global(outside) 2 7-0 netmask 40,route if_name ip_address netmask gateway_ip metric,pixfirewall(config)#,route,route命令为指定的接口输入一条静态或缺省的路由,pixfirewall(config)# route outside 1,0,5,PAT Global,端口地址转换(P

24、AT),0,,49090,23,,0,2000,23,5,0,2001,23,5,Source port,Destination addr,Source addr,Destination port,Source port,Destination addr,Source addr,Destination port,,49090,Source port,Destination addr,Source addr,Destination port,23

25、,,Source port,Destination addr,Source addr,Destination port,Internet,PAT 配置实例,pixfirewall(config)# ip address (inside) pixfirewall(config)# ip address (outside) pixfirewall(config)# global (outside) 1 netmask pixfirew

26、all(config)# nat (inside) 1 ,分配一个 IP地址 () 到全局地址池 源地址网络 被转换到 ,多个网络的PAT转换,pixfirewall(config)# ip address (inside) pixfirewall(config)# ip address (outside) pixfirewall(config)# global (outside) 1 192.

27、168.0.8 netmask pixfirewall(config)# global (outside) 2 netmask pixfirewall(config)# nat (inside) 1 pixfirewall(config)# nat (inside) 2 ,将不同的内部网络转换到不同的地址上 的网络被转换到. 的网络被转换到,No

28、Network Address Translation (nat 0),pixfirewall(config)# nat (inside) 0 55 pixfirewall(config)# show nat nat 0 will be non-translated,nat 0 ensures that is not translated. ASA remains in effect with nat 0.,PIX防火墙的访问控制,访问控制列表(ACL),ACL 能够允许可靠的传输,拒绝非认可的传

29、输. ACL 可针对每一个interface 进行配置 ACL的配置命令:access-list, access-group,access-list,access-list acl_name deny | permit protocol src_addr | local_addr src_mask | local_mask operator port destination_addr | remote_addr destination_mask | remote_mask operator port,pixfirewall(config)#,创建一个 ACL,ACL “dmz1” 拒绝从 19

30、 网络向主机的小于1025端口的TCP连接,pixfirewall(config)# access-list dmz1 deny tcp host lt 1025,附:比较运算符,不指定运算符和端口就相当于指定了所有的端口 Eq和一个端口号表示只对当前端口操作 It(less than)和一个端口号表示对小于指定端口的所有端口操作 Gt(greater than)和一个端口号表示对大于指定端口的所有端口进行操作 Neq(non-eq)和一个端口号表示对除了指定端口之外的所有端口进

31、行操作 Range和一个端口范围表示只对在指定端口范围内的端口进行操作,access-group,pixfirewall(config)#,access-group acl_name in interface interface_name,将访问列表名绑定到接口名以允许或拒绝IP信息包进入接口,ACL “dmz1” 绑定到 interface “dmz”,pixfirewall(config)# access-group dmz1 in interface dmz,ACL实例,static (inside, outside) access-list

32、 acl_out permit tcp any host eq 80 access-group acl_out in interface outside,允许内网的所有主机访问的80端口,关于static和conduit,static (local_ifc,global_ifc) global_ip | interface local_ip netmask mask | access-listacl_name dns norandomseq max_conns emb_limit,static的作用是:将局部地址映射为全局地址通常也与con

33、duit合用,Conduit permit|deny protocol global_ip global_mask operator portport foreign_ip foreign_mask operator portport,conduit:为向内连接添加、删除或显示通过防火墙的管道,Static (inside, outside) tcp 9 telnet telnet netmask 55 0 0,实例,*外部用户向9的主机发出Telnet请求时,重定向到。*外部用户向17

34、9的主机发出FTP请求时,重定向到。*外部用户向08的端口发出Telnet请求时,重定向到。*外部用户向防火墙的外部地址16发出Telnet请求时,重定向到。*外部用户向防火墙的外部地址16发出HTTP请求时,重定向到。*外部用户向防火墙的外部地址08的8080端口发出HTTP请求时,重定向到的80号端口。,static (inside,outside) tcp 9 telne

35、t telnet netmask 55 0 0static (inside,outside) tcp 9 ftp ftp netmask 55 0 0static (inside,outside) tcp 08 telnet telnet netmask 55 0 0static (inside,outside) tcp interface telnet telnet netmask 255.255

36、.255.255 0 0static (inside,outside) tcp interface www www netmask 55 0 0static (inside,outside) tcp 08 8080 www netmask 55 0 0 conduit permit tcp host 9 eq telnet any conduit permit tcp host 9 eq ftp any conduit permit t

37、cp host 08 telnet any conduit permit tcp interface telnet any conduit permit tcp interface www any conduit permit tcp host 08 eq 8080 any,pixfirewall(config)# write terminal . nameif ethernet0 outside sec0 nameif ethernet1 inside sec100 access-list acl_out deny tcp any any eq

38、 www access-list acl_out permit ip any any access-group acl_out in interface inside nat (inside) 1 global (outside) 1 0-54 netmask .,拒绝 Web 访问,拒绝内部网络对外部网络的80端口访问 允许其他IP协议的数据传送,www,Internet,允许DMZ中的web主机访问,pixfirewall(config)# write terminal .

39、 nameif ethernet0 outside sec0 nameif ethernet1 inside sec100 nameif ethernet2 dmz sec50 ip address outside ip address inside ip address dmz static (dmz,outside) 1 access-list acl_in_dmz permit tcp any ho

40、st 1 eq www access-list acl_in_dmz deny ip any any access-group acl_in_dmz in interface outside .,Web server,.2,.1,.1,.2,/24,/24,/24,Internet,ACL acl_in_dmz 允许internet主机访问非军事区的web 主机 ACL acl_in_dmz 禁止该web主机与外部主机间其他任何协议的通信 注意:access-list和conduit的区别,前者是主机间直接的通信,

41、后者是通过防火墙做中间的代理,PIX防火墙的其他配置,filter,进行URL,FTP,HTTPS,JAVA,ActiveX的过滤操作,no filter activex port | except local_ip mask foreign_ip mask no filter ftp dest-port | except local_ip local_mask foreign_ip foreign_mask allow interact-block no filter java port-port| except local_ip mask foreign_ip mask no filter

42、 https dest-port | except local_ip local_mask foreign_ip foreign_mask allow no filter url http | port-port except local_ip local_mask foreign_ip foreign_mask allow proxy-block longurl-truncate | longurl-deny cgi-truncate no filter url except local_ip local_mask foreign_ip foreign_mask no filter url

43、port | except local_ip mask foreign_ip mask allow proxy-block longurl-truncate | longurl-deny cgi-truncate,Filter的例子,过滤activeX filter activex 80 0 0 0 0 过滤java applets filter java 80 0 0 0 0 过滤url url-server (perimeter) host filter url 80 0 0 0 0 filter url except 4 55

44、0 0 过滤所有8080端口代理服务的流量 filter url 8080 0 0 0 0 proxy-block,fixup protocol,改变、允许、禁止或列出一个PIX防火墙应用的特性,打开防火墙的邮件保护 fixup protocol smtp port-port 关闭邮件保护 no fixup protocol smtp port-port,fixup protocol ctiqbe 2748 no fixup protocol dns maximum-length length fixup protocol esp-ike fixup protocol ftp strict p

45、ort fixup protocol h323 h225 | ras port -port fixup protocol http port-port fixup protocol icmp error fixup protocol ils port-port no fixup protocol mgcp port-port fixup protocol pptp 1723 fixup protocol rsh 514 fixup protocol rtsp port fixup protocol sip port-port no fixup protocol sip udp 5060 fix

46、up protocol skinny port-port fixup protocol smtp port-port fixup protocol snmp 161-162 fixup protocol sqlnet port-port fixup protocol tftp port-port no fixup protocol protocol_name port,参考资料, ,Netscreen 防火墙,Netscreen防火墙,真正意义的硬件防火墙 采用将软件运算硬件化的做法,同时采用专门设计的网络芯片。 自主研发的Screen OS和ASIC芯片,避免传统操作系统本身的漏洞 不基于传

47、统的PC架构 在高端市场占有较大的份额,NetScreen-500,高可靠性 ICSA-认证的 firewall和 VPN FIPS 140 ready 高性能 250 Mbps 3DES IPSec VPN 700 Mbps stateful firewall 高吞吐量 10,000 IPSec 通道 250,000 同时的会话 22,000 会话/秒,冗余特性 HA特性 内部系统冗余 (swappable fans, power) 独立的流量和管理总线Separate traffic and management bus 扩展性 多IO接口 AC/DC 电源 虚拟系统,NetScreen-

48、500实物图(1),NetScreen-500实物图(2),NetScreen-500接口,接口模块插槽,热插拔 AC 或DC 电源模块,风扇模块,双冗余HA接口,管理口,Modem,Console,LCD,Netscreen-500连线实例,Netscreen防火墙的应用模式,透明模式 透明模式: 看上去与基于TCP/IP协议二层的设备类似,防火墙的端口上没有IP地址,只有一个用于管理的VLAN IP。 适用的环境: 一般用于处于相同网段的不同网络之间的隔离。 优点: 设置实现的方式比较简单,相关网络的设备不必进行调整,简化网管人员的工作量。 NAT模式 类似于基于TCP/IP第三层协议的设

49、备,通过协议端口或ip替换的方式实现地址转发和访问。 适用的网络环境: 公网地址数量不能满足网络中的设备每个都拥有一个公共IP地址的情况。 优点: 针对内网对互联网的访问,可以大量节省公共IP地址。 路由模式 类似于基于TCP/IP第三层协议的设备,在通过防火墙设备时,IP地址信息不发生替换,以源地址的方式访问互联网。 适用的网络环境: 内部网络同样使用公共IP地址的客户环境。 优点: 路由关系清晰。,命令行下的一些操作,Netscreen一些通用命令,ns500- ? clear clear dynamic system info exec exec system commands exit

50、 exit command console get get system information ping ping other host reset reset system save save system parameters set configure system parameters trace-route trace route unset unconfigure system parameters,命令行形式下显示状态信息,ns500- get system Serial Number: 0043042002000034, Control Number: 00000000 Ha

51、rdware Version: 0110(0)-(11), FPGA checksum: 00000000, VLAN1 IP () Software Version: 5.0.0r10.0, Type: Firewall+VPN Base Mac: 0010.db1d.1c30 File Name: ns200b3.0, Checksum: 317204e0 Date 08/23/2005 16:19:13, Daylight Saving Time enabled The Network Time Protocol is Disabled Up 0 hours

52、37 minutes 12 seconds Since 11 July 2002 15:42:01 Total Device Resets: 0 System in NAT/route mode. Use interface IP, Config Port: 80 User Name: netscreen Interface ethernet1: number 4, if_info 3200, if_index 0, mode nat link up, phy-link up/full-duplex vsys Root, zone Trust, vr trust-vr *ip /

53、24 mac 0010.db1d.1c34 *manage ip , mac 0010.db1d.1c34 - more -,相关的信息: 系统序列号 软件版本 管理信息 操作模式 接口状态 接口地址,命令行下的配置信息,ns500(M)- get config Total Config size 4852: set clock timezone 8 set vrouter trust-vr sharable unset vrouter trust-vr auto-route-export set service 2022 protocol tcp src-port 0-6553

54、5 dst-port 2022-2022 set service 9900 protocol tcp src-port 0-65535 dst-port 9900-9900 set service httpssl protocol tcp src-port 1-65535 dst-port 443-443 set service imapssl protocol tcp src-port 1-65535 dst-port 996-996 set service popssl protocol tcp src-port 1-65535 dst-port 995-995 set service s

55、mtpssl protocol tcp src-port 1-65535 dst-port 994-994 set service tcp445 protocol tcp src-port 0-65535 dst-port 445-445 set auth-server Local id 0 set auth-server Local server-name Local set auth default auth server Local“ set interface ethernet1/1 zone Untrust set interface ethernet1/2 zone Untrust

56、 set interface ethernet2/2 zone DMZ“ set hostname ns500 set address Trust 12/32 12 55 set address Trust 6/28 6 40 set address Untrust 6/28 6 40 ,显示基本信息的命令,命令行基本信息收集:ns500get syst (得到系

57、统信息)ns500get config (得到config信息)ns500get log event (得到日志)功能问题需收集下列信息:ns500set ffiliter ? (设置过滤器)ns500debug flow basic 是开启基本的debug功能ns500clear db 是清除debug的缓冲区 ns500get dbuf stream就可以看到debug的信息了性能问题需收集下列信息:得到下列信息前,请不要重新启动机器,否则信息都会丢失,我们无法判定问题所在。ns500Get per cpu detail (得到CPU使用率)ns500Get session info (得

58、到会话信息 )ns500Get per session detail (得到会话详细信息)ns500Get mac-learn (透明方式下使用,获取MAC硬件地址)ns500Get alarm event (得到告警日志)ns500Get tech tftp 6 tech.txt (导出系统信息)ns500Get log system (得到系统日志信息)ns500Get log system saved (得到系统出错后,系统自动记录信息,该记录重启后不会丢失),设置接口-带宽,网关,Set interface interface bandwidth number

59、unset interface interface bandwidth,设置所指定的各个端口的带宽速率,单位为kb/s,set interface ethernet4 bandwidth 10000,例如:我们设置ethernet4接口的带宽为10M,设置接口的网关,set interface interface gateway ip_addr unset interface interface gateway,例如:设置网关地址为:0,set interface ethernet4 gateway 0,设置接口的接口的区域,IP地址,set interface interface ip ip_addr/mask set interface interface ip unnumbered interface interface2 unset interface interface ip ip_addr,例如:我们要绑定一个子接口到trust上,并设

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论