您好,登錄后才能下訂單哦!
域名 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 時(shí)間 ASA1(config)# clock timezone GMT +8 //設(shè)置時(shí)區(qū) +8表示東8區(qū) ASA1(config)# clock set 10:26:00 Jun 10 2016 //設(shè)置時(shí)間 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文件系統(tǒng) ASA1(config)# dir /all //虛擬機(jī)只能看見asdm disk0:/asa842-k8.bin //boot system 可選的系統(tǒng) disk0:/asdm-731.bin //asdm p_w_picpath asdm鏡像 disk0:/boot.cfg //cfg 啟動(dòng)配置文件 runningconfig 和start 不可見 ASA1(config)# boot system disk0:/asa842-k8.bin ASA1(config)# asdm p_w_picpath disk0:/asdm-731.bin ASA1(config)# copy running-config disk0:/boot.cfg //將running保存到指定文件 ASA1(config)# boot config disk0:/boot.cfg //指定啟動(dòng)加載的配置文件
日志系統(tǒng)
可發(fā)送給:console;ASDM;Monitor;Buffer;Syslog;SNMP Trap;Email;NetFlow
日志的格式及消息等級(jí):
logging默認(rèn)關(guān)閉 logging enable logging console 7 //表示將等級(jí)7(全部信息)發(fā)送到console口 取消加no logging buffered 7 //存入緩存 logging asdm informational //發(fā)給ASDM等級(jí)6的日志 ASA1(config)# show running-config logging logging enable logging trap debugging // 發(fā)送指定日志級(jí)別(可自定義一個(gè)列表) **logging list locketest level information class ospf //定義一個(gè)ospf的列表 **logging trap debugging //發(fā)送locketest logging message 503001 level alerts //將來自503001的信息等級(jí)設(shè)置為1 no logging message 503001 //禁用日志503001 logging host DMZ 192.168.12.1 //指定出接口日志服務(wù)器(syslogserver)IP地址
排錯(cuò)工具Packet Tracer
Packet Tracer模擬一個(gè)數(shù)據(jù)包穿越ASA的數(shù)據(jù)通道,并跟蹤ASA對(duì)該數(shù)據(jù)包的整個(gè)處理過程
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字段,防火墻默認(rèn)不允許帶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
抓包
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
配置帶外網(wǎng)管口
接口下 ASA1(config-if)# security-level 100 //建議設(shè)安全級(jí)別最高 ASA1(config-if)# management-only //只用于網(wǎng)管
Telnet網(wǎng)管
啟用Telnet網(wǎng)管 ASA1(config)# telnet 192.168.17.100 255.255.255.255 inside //允許來著inside口的指定ipTelnet ASA1(config)# telnet 0 0 DMZ //允許來自DMZ口的所有Telnet連接 注:不允許接口級(jí)別最低的Telnet進(jìn)入 ASA1(config)# passwd cisco //登錄需要密碼 ASA1(config)# enable password 502 ASA1(config)# username admin password cisco privilege 15 //也可用本地用戶認(rèn)證 ASA1(config)# aaa authentication telnet console LOCAL //在Telnet登錄應(yīng)用本地登入
SSH網(wǎng)管
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加密會(huì)話產(chǎn)生加密密鑰 ASA1(config)# ssh 192.168.17.100 255.255.255.255 inside //允許接入 ASA1(config)# aaa authentication ssh console LOCAL //ssh用aaa的本地認(rèn)證 ASA1(config)# ssh 0 0 DMZ 注:遠(yuǎn)程不能用Telnet,必須用ssh
創(chuàng)建本地管理賬號(hào)
ASA1(config)# username admin attributes //設(shè)置名為admin賬戶的屬性 ASA1(config-username)# service-type ? //設(shè)置服務(wù)類型(不設(shè)置的話什么都能用) username mode commands/options: admin User is allowed access to the configuration prompt. //允許進(jìn)config nas-prompt User is allowed access to the exec prompt. //低權(quán)限 不能進(jìn)config remote-access User is allowed network access. //只能遠(yuǎn)程 aaa authentication enable console LOCAL //這兩句可讓service-type生效 aaa authorization exec LOCAL R3#ssh -l admin 192.168.12.100 //登錄
HTTPS網(wǎng)管
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 //權(quán)限必須要15級(jí) 只能使用ASDM ASA需要一個(gè)服務(wù)器的證書(缺省是ASA自簽名證書——一般會(huì)報(bào)錯(cuò)) 客戶認(rèn)證:任何密碼 AAA的一次性密碼 證書認(rèn)證+一次性密碼
SNMP
v1/v2c/v3 SNMPV3才有加密認(rèn)證功能。認(rèn)證包括MD5 or SHA,加密包括DES or RSA
ASA1(config)# snmp-server group group001 v3 priv //創(chuàng)建組 ASA1(config)# snmp-server user admin group001 v3 auth md5 cisco privde des Cisco //賬號(hào)admin 屬于group001組 版本v3 認(rèn)證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>
認(rèn)證管理訪問
ASA1(config)# aaa-server aaaname protocol ? //定義要用的協(xié)議和名字 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 //定義服務(wù)器位置和key—cisco 在ssh上用AAA ASA1(config)# aaa authentication ssh console aaaname LOCAL 注:記得no aaa authentication exec LOCAL 若要做本地授權(quán)則在本地設(shè)置一個(gè)和認(rèn)證服務(wù)器上相同用戶名密碼的賬號(hào): ASA1(config)# username test1 password cisco privilege 15
自簽名證書
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。