Cisco ASA Firewall IOS recovery and ASDM connections

 Now all the files in the disk, including IOS have been emptied, has been unable to enter the system, Error 15: File not found, the system constantly repeated reboot

 

 Once the above error message appears, it represents the equipment of the operating system has hung up. Recovery methods:

 

A, IOS recovery

Console first prepared a cable to connect a computer, the screen started to press the ESC, enters monitor mode common

 

  Prepare a Mirror, and related tools.

The device from the Internet to download IOS image, and ASDM software. (Note that the system and software compatibility, and some low ASDM version can not run at high version of the system)

https://tdoas.de/Cisco/Firewall/ASA

IOS select asa962-smp-k8.bin

 

 ASDM choose asdm-771.bin

 

 Downloaded to the local computer, then download the software tftpd (Baidu lot, 64-bit and 32-bit version does not matter)

 

   Run tftpd software

 

 The connecting cable Management0 / 0 port to a local area network, to ensure that the port can communicate with the local computer

 

Set the IP address, and the mirror 

rommon #1> ADDRESS=10.6.6.249        //设置防火墙地址
rommon #2> GATEWAY=10.6.6.254        //网关
rommon #3> IMAGE=asa962-smp-k8.bin   //需要导入IOS的名称,注意别写错了,不然无法上传
rommon #4> SERVER=10.6.6.2           //设置服务器IP,也就是PC的IP
rommon #5> sync                      //保存

Updating NVRAM Parameters...
测试网络,确保连接畅通
rommon #6> ping 10.6.6.2
Sending 20, 100-byte ICMP Echoes to 10.6.6.2, timeout is 4 seconds:
?!!!!!!!!!!!!!!!!!!!
Success rate is 95 percent (19/20)

如果连接不通,可以使用set命令检查配置是否正确

 

一切准备就绪后,tftpdnld 命令开始导入:

rommon #8> tftpdnld

 

  主机端也会有导入进度提示

 

 等待几分钟导入完成后,系统将使用该镜像自动进入到操作系统。

进入后会有提示:Pre-configure Firewall now through interactive prompts [yes]?  是否要重新配置?这里选择是

 

虽然现在进入了系统,但是ios本身并不在设备中,我们要把ios通过tftp从主机传到设备中来,才能在关机后设备能正常启动,否则关机后设备仍然无法启动。

 

这路选择直接回车,是

Firewall Mode [Routed]:            指定防火墙模式,直接回车
Enable password [<use current password>]: admin 设置enable密码
Allow password recovery [yes]?        是否允许密码恢复
Clock (UTC):  时间设置
  Year [2020]: 
  Month [Jan]: 月份输入英文
  Day [3]:
  Time [06:45:11]: 14:52:33
Management IP address: 10.6.6.249      设置Management接口IP地址
Management network mask: 255.255.255.0    子网掩码
Host name: asa5525       设置防火墙名称
Domain name: cisco.com   域名
IP address of host running Device Manager: 10.6.6.2 运行管理软件的主机地址
Use this configuration and save to flash? [yes]yes  是否保存到flash

如果这里无法保存,会继续提示Pre-configure Firewall now through interactive prompts [yes]?no  如再次提示,输入no

初始化完成后,进入到了我们熟悉的界面

 

en,输入刚才设置的密码, conf t进入全局模式,第一次会有一个提示:

Would you like to enable anonymous error reporting to help improve  是否要启用匿名错误报告以帮助改进

这里随便选,启用后,代码会有提示信息

 

通过show version可以看到system image file不在flash中,我们需要将flash导入到设备。

 

有时候在导入设备可能会失败,报错:

%Error copying tftp://192.168.0.1/asa916-k8.bin (Not enough space on device) 提示没有空间

解决方法:将flash格式化一遍即可 

ciscoasa# format flash:

 

 测试与主机的连通性,准备就绪后开始导入镜像

 asa5525(config)# copy tftp: flash:

Address or name of remote host []? 10.6.6.2     主机IP地址

Source filename []? asa962-smp-k8.bin                  需要导入IOS的名称,同样注意别写错了

Destination filename [asa962-smp-k8.bin]?             这直接回车

 然后同样方法导入asdm软件

 

 使用dir查看文件已经导入成功

 

 设置启动文件

asa5525(config)# boot system disk0:/asa962-smp-k8.bin             设置IOS

asa5525(config)# asdm image disk0:/asdm-771.bin               设置asdm

asa5525(config)# wr                                                                    保存

asa5525(config)# reload                                                             重新启动,配置生效

 

二、写入license

默认安装的系统是没有授权的,许多功能需要授权后才能使用

使用show version查看激活状态

 

 如上,很多功能都是Disabled状态

需要自己从Cisco官网申请license, http://www.cisco.com/go/license

或者下载Cisco ASA Keygen软件破解,

官网申请太麻烦,而且不一定能申请到,所以这里就使用Cisco ASA Keygen破解

 

 

 

 说明:

  • Serial Number:系统的序列号,show version可以查看系统序列号;
  • Licensed Cores:选择Premium,为系统永久授权。

 使用步骤:

填写序列号,点击【Greedy 】--【Licensed Cores】选择【Premium】,即永久授权。点击【Etis atis animatis】…得到图片最下面的授权码。直接复制即可。

 

 

最后别忘了 保存。再次show version 查看激活状态:

 

 

三、配置asdm图形化管理界面

开启http服务并设置允许连接的远程主机

asa5525# conf t        进入全局模式
asa5525(config)# webvpn   进入webvpn模式
asa5525(config-webvpn)#  username admin password admin  新建一个用户名/密码
asa5525(config)# inte m0/0  进入管理接口
asa5525(config-if)# ip add 10.6.6.249 255.255.255.0  设置IP地址
asa5525(config-if)# nameif management  给端口命名
asa5525(config-if)# no sh  激活端口
asa5525(config-if)# q     退出管理接口
asa5525(config)# http server enable  开启http服务
asa5525(config)# http 0 0 management 设置管理口可连接的IP地址
asa5525(config)# wr m 保存

添加SSL加密算法

asa5525(config)# ssl encryption 3des-sha1 des-sha1 aes128-sha1 aes256-sha1

注:虽然是http服务,但是web连接使用的是https协议。安全产品的web登录都是https协议。

检查http配置

asa5525(config)# show run http
http server enable
http 0.0.0.0 0.0.0.0 management

检查ASDM调用image的情况

asa5525(config)# show run asdm
asdm image disk0:/asdm-771.bin
no asdm history enable

查看对应接口是否存在监听443端口

asa5525(config)# show asp table socket

Protocol     Socket     State       Local Address       Foreign Address
SSL         00004638    LISTEN     10.6.6.249:443       0.0.0.0:*     

查看当前SSL配置

asa5525(config)# show run all ssl                                         
ssl server-version tlsv1
ssl client-version tlsv1
ssl cipher default custom "DES-CBC3-SHA:DES-CBC-SHA:AES128-SHA:AES256-SHA"
ssl cipher tlsv1 custom "DES-CBC3-SHA:DES-CBC-SHA:AES128-SHA:AES256-SHA"
ssl cipher tlsv1.1 low
ssl cipher tlsv1.2 low
ssl cipher dtlsv1 custom "DES-CBC3-SHA:DES-CBC-SHA:AES128-SHA:AES256-SHA"
ssl dh-group group2
ssl ecdh-group group19
ssl certificate-authentication fca-timeout 2

 一切确定OK,打开浏览器访问ASA虚拟机

 

 

 

 

  如图:图形化管理界面要安装两个软件:ASDM Launcher、JAVA软件

 

 ASDM的安装,必须是基于JAVA环境的,所以需要安装JAVA。

首先安装准备好的JAVA软件,安装过程略。

 

Jdk下载地址: https://pan.baidu.com/s/1YoVOPHFG92BQMb4U9I8Nqw 提取码: uvjg

然后点击安装ASDM Launcher,点击后输入ASA上创建的账户登陆

 

登录后会下载或安装dm插件,安装

 

 安装完成后会在桌面上生成一个图标,直接打开,如下:

 

  输入ASAv的地址及账户,点击OK登录即可

安全警告勾选 始终信任

 

 登录后的界面如下:

 

  以后的登录就是使用此软件,不在使用web登录。如需登录,直接点击桌面上的图标即可。

Guess you like

Origin www.cnblogs.com/lewsuy/p/12146218.html