设为首页 收藏本站
查看: 1189|回复: 0

[经验分享] ASA系统管理与日志_02

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2016-7-4 10:36:00 | 显示全部楼层 |阅读模式


域名
DNS
ASA1(config)# hostname ASA1
ASA1(config)# domain-name java.local
ASA1(config)# show running-config dns
    dns domain-lookup DMZ              //dns解析都从DMZ口出去
    DNS server-group DefaultDNS
        name-server 192.168.15.200     //这两条可直接在全局下敲 dns + ....
        domain-name java.local
时间
ASA1(config)# clock timezone GMT +8    //设置时区 +8表示东8区
ASA1(config)# clock set 10:26:00 Jun 10 2016  //设置时间
ASA1(config)# show clock
    10:27:05.239 GMT Fri Jun 10 2016
NTP同步(client)
ASA1(config)# show running-config ntp
    ntp authentication-key 1 md5 cisco
    ntp authenticate
    ntp trusted-key 1
    ntp server 192.168.12.100 key 1 source DMZ
ASA文件系统
ASA1(config)# dir /all    //虚拟机只能看见asdm
    disk0:/asa842-k8.bin    //boot system 可选的系统
    disk0:/asdm-731.bin    //asdm image asdm镜像
    disk0:/boot.cfg        //cfg 启动配置文件  runningconfig 和start 不可见
ASA1(config)# boot system disk0:/asa842-k8.bin
ASA1(config)# asdm image disk0:/asdm-731.bin
ASA1(config)# copy running-config disk0:/boot.cfg //将running保存到指定文件
ASA1(config)# boot config disk0:/boot.cfg        //指定启动加载的配置文件

日志系统
可发送给:console;ASDM;Monitor;Buffer;Syslog;SNMP Trap;Email;NetFlow
日志的格式及消息等级:

wKioL1daMBqhHb_sAABhM8O0bSI325.jpg

wKiom1daL0aBjk3LAACUaSqxO2Q046.jpg
1
2
3
4
5
6
7
8
9
10
11
12
13
logging默认关闭
logging enable
logging console 7    //表示将等级7(全部信息)发送到console口 取消加no
logging buffered 7    //存入缓存
logging asdm informational //发给ASDM等级6的日志
ASA1(config)# show running-config logging
logging enable
logging trap debugging    // 发送指定日志级别(可自定义一个列表)
**logging  list  locketest  level information  class  ospf  //定义一个ospf的列表
**logging  trap  debugging         //发送locketest
logging  message  503001  level  alerts    //将来自503001的信息等级设置为1
no  logging  message  503001               //禁用日志503001
logging host DMZ 192.168.12.1  //指定出接口日志服务器(syslogserver)IP地址



排错工具Packet Tracer
Packet Tracer模拟一个数据包穿越ASA的数据通道,并跟踪ASA对该数据包的整个处理过程
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
ASA1(config)# packet-tracer input dmZ icmp 192.168.12.100 8 0 192.168.12.139

Phase: 1                //查看路由
Type: ROUTE-LOOKUP
Subtype: Resolve Egress Interface
Result: ALLOW
Config:
Additional Information:
in   192.168.12.139  255.255.255.255 identity

Phase: 2
Type: ACCESS-LIST
Subtype:
Result: ALLOW
Config:
Implicit Rule
Additional Information:

Phase: 3
Type: NAT
Subtype: per-session
Result: ALLOW
Config:
Additional Information:

Phase: 4                  //查看ip的options字段,防火墙默认不允许带options的ip包
Type: IP-OPTIONS
Subtype:      
Result: ALLOW
Config:
Additional Information:

Phase: 5
Type: CLUSTER-REDIRECT
Subtype: cluster-redirect
Result: ALLOW
Config:
Additional Information:

Phase: 6
Type: INSPECT
Subtype: np-inspect
Result: ALLOW
Config:
Additional Information:

Phase: 7
Type: INSPECT
Subtype: np-inspect
Result: ALLOW
Config:      
Additional Information:

Phase: 8
Type: FLOW-CREATION
Subtype:
Result: ALLOW
Config:
Additional Information:
New flow created with id 33, packet dispatched to next module

Result:
input-interface: DMZ
input-status: up
input-line-status: up
output-interface: NP Identity Ifc
output-status: up
output-line-status: up
Action: allow



抓包
1
2
3
4
5
6
7
8
9
10
11
ASA1(config)# capture test interface dmz
ASA1(config)# no capture test interface dmz  //停止抓包
ASA1(config)# no capture test                //删除包
ASA1(config)# show capture test
23 packets captured

   1: 13:34:41.259263       192.168.12.139.514 > 192.168.12.1.514:  udp 88
   2: 13:34:41.259340       192.168.12.139.514 > 192.168.12.1.514:  udp 107
   ..........................
  23: 13:35:17.952999       192.168.12.139.514 > 192.168.12.1.514:  udp 94
23 packets shown



配置带外网管口
1
2
3
接口下
ASA1(config-if)# security-level 100    //建议设安全级别最高
ASA1(config-if)# management-only        //只用于网管



  Telnet网管
1
2
3
4
5
6
7
8
启用Telnet网管
ASA1(config)# telnet 192.168.17.100 255.255.255.255 inside     //允许来着inside口的指定ipTelnet
ASA1(config)# telnet 0 0 DMZ         //允许来自DMZ口的所有Telnet连接
注:不允许接口级别最低的Telnet进入
ASA1(config)# passwd cisco            //登录需要密码
ASA1(config)# enable password 502
ASA1(config)# username admin password cisco privilege 15    //也可用本地用户认证
ASA1(config)# aaa authentication telnet console LOCAL    //在Telnet登录应用本地登入



SSH网管
1
2
3
4
5
6
7
8
9
10
11
ASA1(config)# show running-config dns        //先配好域名
dns domain-lookup DMZ
DNS server-group DefaultDNS
    name-server 192.168.12.100
    domain-name java.local

ASA1(config)# crypto key generate rsa modulus 1024     //为SSH加密会话产生加密密钥
ASA1(config)# ssh 192.168.17.100 255.255.255.255 inside    //允许接入
ASA1(config)# aaa authentication ssh console LOCAL          //ssh用aaa的本地认证
ASA1(config)# ssh 0 0 DMZ  
注:远程不能用Telnet,必须用ssh



创建本地管理账号
1
2
3
4
5
6
7
8
9
10
11
12
ASA1(config)# username admin attributes        //设置名为admin账户的属性
ASA1(config-username)# service-type ?           //设置服务类型(不设置的话什么都能用)

username mode commands/options:
  admin          User is allowed access to the configuration prompt.    //允许进config
  nas-prompt     User is allowed access to the exec prompt.    //低权限 不能进config
  remote-access  User is allowed network access.    //只能远程

aaa authentication enable console LOCAL        //这两句可让service-type生效
aaa authorization exec LOCAL

R3#ssh -l admin 192.168.12.100                //登录



HTTPS网管
1
2
3
4
5
6
7
8
9
ASA1(config)# http server enable
ASA1(config)# http 192.168.12.0 255.255.255.0 DMZ
ASA1(config)# aaa authentication http console LOCAL
ASA1(config)# username cisco password cisco privilege 15    //权限必须要15级
只能使用ASDM
ASA需要一个服务器的证书(缺省是ASA自签名证书——一般会报错)
客户认证:任何密码
          AAA的一次性密码
          证书认证+一次性密码




SNMP
    v1/v2c/v3    SNMPV3才有加密认证功能。认证包括MD5 or SHA,加密包括DES or RSA
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
ASA1(config)# snmp-server group group001 v3 priv       //创建组
ASA1(config)# snmp-server user admin group001 v3 auth md5 cisco privde des Cisco
    //账号admin 属于group001组 版本v3  认证md5密码是Cisco  加密des密码Cisco
ASA1(config)# snmp-server host dmZ 192.168.12.1 version 3 admin
    //v1 v2 把version 3 换成comunit   
ASA1(config)# snmp-server location beijing        //用于说明的(非必须)
ASA1(config)# snmp-server contact xiaoming
ASA1(config)# snmp-server enable traps snmp ?    //允许trap snmp一些信息
configure mode commands/options:
  authentication  Enable authentication trap
  coldstart       Enable coldStart trap
  linkdown        Enable linkDown trap
  linkup          Enable linkUp trap
  warmstart       Enable warmstart trap
  <cr>



认证管理访问
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
ASA1(config)# aaa-server aaaname protocol ?            //定义要用的协议和名字

configure mode commands/options:
  http-form  Protocol HTTP form-based
  kerberos   Protocol Kerberos
  ldap       Protocol LDAP
  radius     Protocol RADIUS
  sdi        Protocol SDI
  tacacs+    Protocol TACACS+
ASA1(config)# aaa-server aaaname (DMZ) host 192.168.12.100 cisco  //定义服务器位置和key—cisco

在ssh上用AAA
ASA1(config)# aaa authentication ssh console aaaname LOCAL

注:记得no aaa authentication exec LOCAL
    若要做本地授权则在本地设置一个和认证服务器上相同用户名密码的账号:
    ASA1(config)# username test1 password cisco privilege 15





自签名证书

   


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-239210-1-1.html 上篇帖子: OSPF P2MP基本实验 下篇帖子: ASA访问控制列表与穿越用户认证_03
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表