ASA基本命令_02

來源:互聯網
上載者:User

標籤:ccsp 思科安全 asa

網域名稱DNSASA1(config)# hostname ASA1ASA1(config)# domain-name java.localASA1(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 2016NTP同步(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 DMZASA檔案系統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.binASA1(config)# asdm image disk0:/asdm-731.binASA1(config)# copy running-config disk0:/boot.cfg //將running儲存到指定檔案ASA1(config)# boot config disk0:/boot.cfg        //指定啟動載入的設定檔

日誌系統

可發送給:console;ASDM;Monitor;Buffer;Syslog;SNMP Trap;Email;NetFlow

日誌的格式及訊息等級:

650) this.width=650;" src="http://s5.51cto.com/wyfs02/M00/82/8D/wKioL1daMBqhHb_sAABhM8O0bSI325.png" title="1616.PNG" alt="wKioL1daMBqhHb_sAABhM8O0bSI325.png" />

650) this.width=650;" src="http://s5.51cto.com/wyfs02/M00/82/8F/wKiom1daL0aBjk3LAACUaSqxO2Q046.png" title="等級.PNG" alt="wKiom1daL0aBjk3LAACUaSqxO2Q046.png" />

logging預設關閉logging enablelogging console 7    //表示將等級7(全部資訊)發送到console口 取消加nologging buffered 7    //存入緩衝logging asdm informational //發給ASDM等級6的日誌ASA1(config)# show running-config logging logging enablelogging trap debugging    // 發送指定記錄層級(可自訂一個列表)**logging  list  locketest  level information  class  ospf  //定義一個ospf的列表**logging  trap  debugging         //發送locketestlogging  message  503001  level  alerts    //將來自503001的資訊等級設定為1no  logging  message  503001               //禁用日誌503001logging host DMZ 192.168.12.1  //指定出介面Log Service器(syslogserver)IP地址

排錯工具Packet Tracer

Packet Tracer類比一個資料包穿越ASA的資料通道,並跟蹤ASA對該資料包的整個處理過程

ASA1(config)# packet-tracer input dmZ icmp 192.168.12.100 8 0 192.168.12.139 Phase: 1                //查看路由Type: ROUTE-LOOKUPSubtype: Resolve Egress InterfaceResult: ALLOWConfig:Additional Information:in   192.168.12.139  255.255.255.255 identityPhase: 2Type: ACCESS-LISTSubtype: Result: ALLOWConfig:Implicit RuleAdditional Information:Phase: 3Type: NATSubtype: per-sessionResult: ALLOWConfig:Additional Information:Phase: 4                  //查看ip的options欄位,防火牆預設不允許帶options的ip包Type: IP-OPTIONSSubtype:      Result: ALLOWConfig:Additional Information:Phase: 5Type: CLUSTER-REDIRECTSubtype: cluster-redirectResult: ALLOWConfig:Additional Information:Phase: 6Type: INSPECTSubtype: np-inspectResult: ALLOWConfig:Additional Information:Phase: 7Type: INSPECTSubtype: np-inspectResult: ALLOWConfig:       Additional Information:Phase: 8Type: FLOW-CREATIONSubtype: Result: ALLOWConfig:Additional Information:New flow created with id 33, packet dispatched to next moduleResult:input-interface: DMZinput-status: upinput-line-status: upoutput-interface: NP Identity Ifcoutput-status: upoutput-line-status: upAction: allow

抓包

ASA1(config)# capture test interface dmz ASA1(config)# no capture test interface dmz  //停止抓包ASA1(config)# no capture test                //刪除包ASA1(config)# show capture test23 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

配置帶外網管口

介面下ASA1(config-if)# security-level 100    //建議設安全層級最高ASA1(config-if)# management-only        //只用於網管

  Telnet網管

啟用Telnet網管ASA1(config)# telnet 192.168.17.100 255.255.255.255 inside     //允許來著inside口的指定ipTelnetASA1(config)# telnet 0 0 DMZ         //允許來自DMZ口的所有Telnet串連註:不允許介面層級最低的Telnet進入ASA1(config)# passwd cisco            //登入要求輸入密碼ASA1(config)# enable password 502ASA1(config)# username admin password cisco privilege 15    //也可用本機使用者認證ASA1(config)# aaa authentication telnet console LOCAL    //在Telnet登入應用本地登入

SSH網管

ASA1(config)# show running-config dns        //先配好網域名稱dns domain-lookup DMZDNS 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

建立本地管理帳號

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 LOCALR3#ssh -l admin 192.168.12.100                //登入

HTTPS網管

ASA1(config)# http server enableASA1(config)# http 192.168.12.0 255.255.255.0 DMZASA1(config)# aaa authentication http console LOCAL ASA1(config)# username cisco password cisco privilege 15    //許可權必須要15級只能使用ASDMASA需要一個伺服器的認證(預設是ASA自我簽署憑證——一般會報錯)客戶認證:任何密碼          AAA的單次密碼          認證認證+單次密碼


SNMP

    v1/v2c/v3    SNMPV3才有加密認證功能。認證包括MD5 or SHA,加密包括DES or RSA

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密碼CiscoASA1(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 xiaomingASA1(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>

認證管理訪問

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上用AAAASA1(config)# aaa authentication ssh console aaaname LOCAL 註:記得no aaa authentication exec LOCAL     若要做本地授權則在本地設定一個和證明伺服器上相同使用者名稱密碼的帳號:    ASA1(config)# username test1 password cisco privilege 15



自我簽署憑證

    



本文出自 “Try” 部落格,請務必保留此出處http://beening.blog.51cto.com/9079117/1787927

ASA基本命令_02

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.