硬件防火墙
配置域名:全局下domain-name ×××××××
特权密码:全局下enable password ×××××××
远程登录密码:passwd ×××××××
配置接口名字:接口模式下nameif ××××××
inside
outside
DMZ
接口的安全级别:接口模式下security level ×××
inside 默认100
outside默认0
inside<DMZ<outside
asa5505只有虚拟接口
----------------------------------------------------------------------------
基本配置:
enable
config terminal
hostname ASATEST
enable password enasa ×enable密码×
passwd telasa ×远程登录密码×
------------------------
show 命令
#show interface ip brief ×路由器上是sh ip int br×
#sh int e0/0
-------------------------
接口配置
en
conf t
int e0/0
nameif outside
security-level 0
no shutdown
end
sh int ip br
------------------------
----------------------------------------------------------------
配置静态路由
route interface-name network mask next-hop-address
----------------------------------------------------------------
缺省路由
route outside 0.0.0.0 0.0.0.0 211.1.1.1
----------------------------------------------------------------
查看路由表
show route ×路由器上为show ip route×
----------------------------------------------------------------
配置telnet接入
telnet {network|ip-address} mask interface-name
例如:telnet 192.168.1.0 255.255.255.0 inside
从一台机器接入:
Telnet 192.168.1.1 255.255.255.255 inside
-----------
配置telnet50秒无操作及离开
telnet timeout 50
-----------
-------------------------------------------------------------------
配置ssh登陆
生成密钥对:
crypto key generate rsa modulus 1024
配置防火墙允许ssh登陆
ssh 0 0 outside ×允许任意的外部地址ssh登陆×
--------
例子:
crypto key generate rsa modulus 1024
ssh 0 0 outside
ssh timeout 30
sh version 2
--------
------------------------------------------------------------------
配置ASDM远程管理登入,即https
启用https访问
http server enable [port]
配置防火墙允许https接入
http {network|ip-address} mask interface_name
指定ASDM映像位置
asdm image disk0:/asdmfile
配置客户端登陆使用的用户名密码
Username password passwrd privilege 15
---------------------------------------------------------------
nat配置nat-control
nat命令指定内部接口
nat (interface_name) nat-id local-ip mask
global命令指定外部接口
global (interface_name) nat-id {global-ip [global-ip]|interface}
----------------------------------------------------------------
其他配置
write memory 或者copy running-config startup-config
清除所有配置
clear configure all
---------------------------------------------------------------