防火墙系列---- 初始化状态的基本实验

2019/6/23 - - -

本文章关于防火墙默认设置的实验,用Telnet远程来测试防火墙的管理机制。

实验开始

实验环境:
eve-ng模拟器下已经有思科防火墙ASA系列的安装,详细请点击此文章查看《思科防火墙ASA》

实验拓扑:
在这里插入图片描述
实验配置:

路由器的配置

inside配置

enable 进入特权模式
configure terminal 进入配置模式
interface e0/0 进入e0/0接口
ip address 192.168.100.100 255.255.255.0 配置ip地址
no shutdown 开启端口
exit 退回到配置模式
ip route 0.0.0.0 0.0.0.0 192.168.100.1 添加默认路由
line vty 0 4 进入远程管理接口
no login 不需要认证(在实验环境允许使用)
transport input all 允许通过所有协议

outside配置

enable 进入特权模式
configure terminal 进入配置模式
interface e0/0 进入e0/0接口
ip address 200.1.1.100 255.255.255.0 配置ip地址
no shutdown 开启端口
exit 退回到配置模式
ip route 0.0.0.0 0.0.0.0 200.1.1.1 添加默认路由
line vty 0 4 进入远程管理接口
no login 不需要认证(在实验环境允许使用)
transport input all 允许通过所有协议

DMZ配置

enable 进入特权模式
configure terminal 进入配置模式
interface e0/0 进入e0/0接口
ip address 172.16.10.100 255.255.255.0 配置ip地址
no shutdown 开启端口
exit 退回到配置模式
ip route 0.0.0.0 0.0.0.0 172.16.10.1 添加默认路由
line vty 0 4 进入远程管理接口
no login 不需要认证(在实验环境允许使用)
transport input all 允许通过所有协议

防火墙的配置

ASA配置

enable 进入特权模式
configure terminal 进入配置模式
enable password 密码 配置特权模式密码
show run enable 查看配置特权模式的密码,是密文存储

G0/0接口的配置:
interface gigabitEthernet 0/0 进入e0/0接口
ip address 192.168.100.1 255.255.255.0 配置ip地址
no shutdown 开启端口
nameif inside 配置接口的名称
inside —内部网络(信任区域)
outside —外部网络(非信任区域)
DMZ —非军事化区域
security-level 100 配置接口的安全级别

G0/1接口的配置:
interface gigabitEthernet 0/1 进入e0/0接口
ip address 200.1.1.1 255.255.255.0 配置ip地址
no shutdown 开启端口
nameif outside 配置接口的名称
inside —内部网络(信任区域)
outside —外部网络(非信任区域)
DMZ —非军事化区域
security-level 0 配置接口的安全级别

G0/2接口的配置:
interface gigabitEthernet 0/2 进入e0/0接口
ip address 172.16.10.1 255.255.255.0 配置ip地址
no shutdown 开启端口
nameif DMZ 配置接口的名称
inside —内部网络(信任区域)
outside —外部网络(非信任区域)
DMZ —非军事化区域
security-level 50 配置接口的安全级别

测试:

inside:

ping 200.1.1.100
telnet 200.1.1.100 (远程outside区域)
发现Ping不同,却能远程上。
原因是:默认情况下,ASA对TCP和UDP协议提供状态化连接,但ICMP协议是非状态化的。
在这里插入图片描述
telnet 172.16.10.100 (远程DMZ区域)
在这里插入图片描述
DMZ:

telnet 200.1.1.100 (远程outside区域)
telnet 192.168.100.100 (远程inside区域)

在这里插入图片描述
发现可以远程outside区域,但不能远程inside区域。
原因是:

1、出站接口的流量默认允许穿越ASA。
	出站接口就是从高安全级别接口访问低安全级别接口的流量。
2、入站接口的流量默认不允许穿越ASA。但是可以使用ACL来放行流量通过。
	入站接口就是从低安全级别接口访问高安全级别接口的流量。

outside:

telent 192.168.100.100 (远程inside区域)
telnet 172.16.10.100 (远程DMZ区域)
发现都不能远程,原因如上,低安全级别访问高安全级别默认是拒绝的。
在这里插入图片描述

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ASA 防火墙flash 被删 防火墙不断启动 Use BREAK or ESC to interrupt boot. Use SPACE to begin boot immediately. 按下ESC进入监控模式 监控模式下的显示和交换机路由器没有什么区别。命令格式也大同小异只要大家变通一下就不难恢复。 rommon #1> ? Variables: Use "sync" to store in NVRAM ADDRESS= local IP address CONFIG= config file path/name GATEWAY= gateway IP address IMAGE= image file path/name LINKTIMEOUT= Link UP timeout (seconds) PKTTIMEOUT= packet timeout (seconds) PORT= ethernet interface port RETRY= Packet Retry Count (Ping/TFTP) SERVER= server IP address VLAN= enable/disable DOT1Q tagging on the selected port rommon #2> ADDRESS=192.168.0.2 (因为是TFFP上传,所以防火墙设置为客户机) rommon #3> GATEWAY=192.168.0.1 (网关) rommon #4> IMAGE=asa802-k8.bin (导入IOS的名称) rommon #5> SERVER=192.168.0.1 (服务器IP,也就是你的PC) rommon #6> sync (保存) Updating NVRAM Parameters... rommon #7> ping 192.168.0.1 Sending 20, 100-byte ICMP Echoes to 192.168.0.1, timeout is 4 seconds: ?!!!!!!!!!!!!!!!!!!! Success rate is 95 percent (19/20) 确认线路是否连通,开启TFTP软件 (这里说明下我测试是ASA5505 所以接的E0/0口。不知道设备该接什么口可以用set看“PORT=Ethernet0/0”) rommon #8> tftpdnld (上传) ROMMON Variable Settings: ADDRESS=192.168.0.2 SERVER=192.168.0.1 GATEWAY=192.168.0.1 PORT=Ethernet0/0 VLAN=untagged IMAGE=asa802-k8.bin CONFIG= LINKTIMEOUT=20 PKTTIMEOUT=4 RETRY=20 tftp asa802-k8.bin@192.168.0.1 via 192.168.0.1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 导入后设备重启,现在有了IOS 能进去 Type help or '?' for a list of available commands. ciscoasa> en 但现在IOS也没有装入设备,而是从tftp引导启动设备,断开TFTP服务器就会从新进入监控模式。这一点当设备启动完毕后可以用show version命令看到: System image file is "tftp://192.168.0.1/asa802-k8.bin" 现在需要把IOS存入设备,但是现在防火墙和PC已经不能通信 ciscoasa# ping 192.168.0.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.0.1, timeout is 2 seconds: No route to host 192.168.0.1 Success rate is 0 percent (0/1) 因为刚才是在监控模式下,现在需要配置让PC和防火墙从新通信(具体型号具体设置,下面已我手上的5505为例) interface Vlan1 nameif inside security-level 100 ip address 192.168.1.1 255.255.255.0 ! interface Vlan2 nameif outside security-level 0 ip address 192.168.0.2 255.255.255.0 ! interface Ethernet0/0 switchport access vlan 2 现在测试 ciscoasa# ping 192.168.0.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms 已经能通信,下面拷贝IOS和ASDM存入设备 ciscoasa# copy tftp://192.168.0.1/asa802-k8.bin disk0:/asa802-k8.bin Address or name of remote host [192.168.0.1]? Source filename [asa802-k8.bin]? Destination filename [asa802-k8.bin]? Accessing tftp://192.168.0.1/asa802-k8.bin. ... !!!!!!!!!!!!!!!!!!! 因为删除的是flash 现在还需要导入ASDM (注意ASDM和IOS的兼容,不兼容如下图) ciscoasa# copy tftp://192.168.0.1/asdm-602.bin disk0://asdm-602.bin Address or name of remote host [192.168.0.1]? Source filename [asdm-602.bin]? Destination filename [asdm-602.bin]? Accessing tftp://192.168.0.1/asdm-602.bin.. ... !!!!!!!!!!!!!!!!!!! 现在可以看见IOS以后在设备上 ciscoasa# show version Cisco Adaptive Security Appliance Software Version 8.2(1) Compiled on Tue 05-May-09 22:45 by builders System image file is "disk0:/asa821-k8.bin" Config file at boot was "startup-config" ciscoasa# show flash: --#-- --length-- -----date/time------ path 3 4096 Aug 26 2009 17:41:50 log 10 4096 Aug 26 2009 17:41:56 crypto_archive 11 4096 Aug 26 2009 17:59:06 coredumpinfo 12 43 Aug 27 2009 09:13:02 coredumpinfo/coredump.cfg 78 16275456 Aug 26 2009 18:07:50 asa802-k8.bin 80 7598456 Aug 27 2009 09:05:54 asdm-602.bin 设置启动文件 ciscoasa (config)# boot system disk0:/asa802-k8.bin 设置IOS ciscoasa (config)# asdm image disk0:/asdm602.bin 设置ASDM ciscoasa (config)# reload 重新启动,配置生效 备份上面dir的文件 ciscoasa (config)# copy disk0:/asa802-k8.bin tftp://192.168.1.1/asa802-k8.bin ciscoasa (config)# copy disk0:/asdm602.bin tftp://192.168.1.1/asdm602.bin

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值