ciscoasa# show version
? configure factory-default confreg 0x2040 relo
confreg 0x41 boot
ciscoasa(config)# config-register 0x1
enable password (password)
hostname (hostname)
enable configure terminal
(config)# clear configure call-home (config)# no service call-home
ciscoasa# show clock ciscoasa# clock set 07:29:00 May 06 2019 ciscoasa(config)# clock timezone UTC +3
ciscoasa(config)# clock summer-time MST recurring 1 Sunday April 2:00 last Sunday October 2:00
hostname(config)# ntp server 10.1.1.1 key 1 prefer sh ntp associations sh ntp status
hostname(config)# dns domain-lookup inside
hostname(config)# dns server-group DefaultDNS
hostname(config-dns-server-group)# name-server 10.1.1.5 192.168.1.67 209.165.201.6
ASA(config)# asdm image disk0:/asdm-647.bin
ASA(config)# http server enable
ASA(config)# http 10.10.10.0 255.255.255.0 inside
ASA(config)# username admin password adminpass
ciscoasa(config)# dhcpd address 192.168.1.101-192.168.1.110 inside
ciscoasa(config)# dhcpd dns 8.8.8.8 8.8.8.8
ciscoasa(config)# dhcpd enable inside
ciscoasa(config)# same-security-traffic permit inter-interface
ciscoasa(config)# same-security-traffic permit intra-interface
ciscoasa# show access-list OUTSIDE-IN Sample output: access-list OUTSIDE-IN line 1 extended permit tcp 100.100.100.0 255.255.255.0 10.10.10.0 255.255.255.0 eq telnet (hitcnt=15) 0xca10ca21
ciscoasa# show conn
ciscoasa# show conn all
ciscoasa# show conn state up,http_get,h323,sip
ciscoasa# show conn count 54 in use, 123 most used
ciscoasa# show cpu usage
ciscoasa# show disk
ciscoasa# show environment
ciscoasa# show memory
ciscoasa# show failover
ciscoasa# show interface
ciscoasa# show local-host
ciscoasa# show route
ciscoasa# show xlate
ciscoasa# show startup-config ciscoasa# show running-config
ciscoasa# copy run start Source filename [running-config] ?
ciscoasa# write memory
ASA(config)# logging enable ASA(config)# logging timestamp ASA(config)# logging buffer-size 65536 ASA(config)# logging buffered warnings ASA(config)# logging asdm errors
ASA(config)# logging host inside 192.168.1.30 ASA(config)# logging trap errors
hostname(config)# aaa authorization exec authentication-server
username (username) nopassword
username (username) password (password)
username (username) password (password) privilege 15 username (username) attributes ciscoasa(config-username)# service-type admin ciscoasa(config-username)# service-type nas-prompt ciscoasa(config-username)# service-type remote-access ciscoasa(config-username)# exit
ASA#configure terminal ASA(config)#domain-name local.local
ASA(config)#aaa authentication ssh console LOCAL
ciscoasa(config)#aaa authentication ssh console LOCAL
aaa authentication ssh console LOCAL
ciscoasa(config)#crypto key generate rsa modulus 2048
ASA(config)#crypto key generate rsa general-keys modulus 1024
ASA(config)#ssh 192.168.1.10 255.255.255.255 inside ASA(config)#ssh 0.0.0.0 0.0.0.0 OUTSIDE
show ssh
ciscoasa# copy tftp flash
ciscoasa(config)# boot system flash:/asa911-k8.bin
show interface ip brief show switch vlan
ciscoasa(config)# interface Vlan 10 ciscoasa(config-if)# nameif outside ciscoasa(config-if)# security-level 80 ciscoasa(config-if)# ip address 192.168.100.77 255.225.255.0 ciscoasa(config-if)# no shutdown ciscoasa(config-if)# exit
ciscoasa(config)# interface Vlan 20 ciscoasa(config-if)# nameif lab5 ciscoasa(config-if)# security-level 90 ciscoasa(config-if)# ip address 192.168.2.1 255.225.255.0 ciscoasa(config-if)# no shutdown ciscoasa(config-if)# exit
ciscoasa(config)# interface Ethernet 0/0 ciscoasa(config-if)# no nameif ciscoasa(config-if)# no security-level ciscoasa(config-if)# no ip address ciscoasa(config-if)# switchport access vlan 10 ciscoasa(config-if)# no shutdown ciscoasa(config-if)# exit
ciscoasa(config)# interface Ethernet 0/6
ASA5505(config)# global (outside) 1 interface ASA5505(config)# nat (inside) 1 0.0.0.0 0.0.0.0
object network obj_any subnet 0.0.0.0 0.0.0.0 nat (inside,outside) dynamic interface
show power inline
ciscoasa(config-if)# ip address dhcp setroute
show nameif
show interfaces trunk (config-if)#interface gigabitEthernet 0/23 (config-if)#description Trunk port to (host) (config-if)#switchport mode trunk (config-if)#switchport trunk allowed vlan all (config-if)#switchport trunk allowed vlan 2-4094 no shutdown
(config)#interface gigabitEthernet 0/23 (config-if)#description (host) (config-if)#switchport mode access (config-if)#switchport access vlan 128 (config-if)#no shutdown
ciscoasa(config)# interface Ethernet 0/1 ciscoasa(config-if)# no nameif ciscoasa(config-if)# no security-level ciscoasa(config-if)# no ip address ciscoasa(config-if)# switchport access 20 ciscoasa(config-if)# no shutdown ciscoasa(config-if)# exit
ciscoasa(config)# route outside 0.0.0.0 0.0.0.0 100.1.1.1
ciscoasa(config-if)# route outside 0.0.0.0 0.0.0.0 192.168.100.1 1
ciscoasa(config)# route inside 192.168.2.0 255.255.255.0 192.168.1.1
hostname(config)# same-security-traffic permit inter-interface
nameif “interface name”
ip address “ip_address” “subnet_mask”
security-level “number 0 to 100”
no shutdown
[Configure PAT for internal LAN (192.168.1.0/24) to access the Internet using the outside interface] ciscoasa(config)# object network internal_lan ciscoasa(config-network-object)# subnet 192.168.1.0 255.255.255.0 ciscoasa(config-network-object)# nat (inside,outside) dynamic interface
ciscoasa(config)# object network obj_any ciscoasa(config-network-object)# subnet 0.0.0.0 0.0.0.0 ciscoasa(config-network-object)# nat (any,outside) dynamic interface
ciscoasa(config)# object network web_server_static ciscoasa(config-network-object)# host 192.168.1.1 ciscoasa(config-network-object)# nat (DMZ , outside) static 100.1.1.1
ciscoasa(config)# object network web_server_static ciscoasa(config-network-object)# host 192.168.1.1 ciscoasa(config-network-object)# nat (DMZ , outside) static 100.1.1.1 service tcp 80 80
show run access-list (host) show access-list (host)
ciscoasa(config)# access-group OUTSIDE_IN in interface outside ciscoasa(config)# access-group INSIDE_IN in interface inside
ciscoasa(config)# access-list OUTSIDE_IN extended permit tcp any host 192.168.1.1 eq 80
ciscoasa(config)# access-list INSIDE_IN extended deny ip host 192.168.1.1 any ciscoasa(config)# access-list INSIDE_IN extended permit ip any any
ciscoasa(config)# object-group network WEB_SRV ciscoasa(config-network)# network-object host 192.168.1.1 ciscoasa(config-network)# network-object host 192.168.1.2
ciscoasa(config)# object-group network DMZ_SUBNETS ciscoasa(config-network)# network-object 10.1.1.0 255.255.255.0 ciscoasa(config-network)# network-object 10.2.2.0 255.255.255.0
ciscoasa(config)# object-group service DMZ_SERVICES tcp ciscoasa(config-service)# port-object eq http ciscoasa(config-service)# port-object eq https ciscoasa(config-service)# port-object range 21 23
ciscoasa(config)# access-list OUTSIDE-IN extended permit tcp any object-group DMZ_SUBNETS object-group DMZ_SERVICES
(config)# object-group network (hostgroup)
(config-network-object-group)# network-object object (newhost)
show object-group network exit
object network (newhost) host (ip)
https://www.opentechguides.com/how-to/article/cisco/39/Cisco-configure-ssh.html
show running-config | include (ip-from) show running-config | include (ip-to) show access-list outside_in show run | include (ip) show (ip)
show interfaces status
show configuration | include access-group ip access-group access-list-name {in | out} no ip access-group access-list-name {in | out}
access-list (zone) extended permit udp host (ip) host (ip) eq (port) access-list (zone) extended permit tcp host (ip) host (ip) eq (port) access-list (zone) extended permit tcp any4 host (ip) eq https
wr (copy running-config startup-config) wr write mem
capture capin interface outside match tcp host (host) host (host) eq (port) show capture show capture capin
show run | include route
service unsupported-transceiver no errdisable detect cause gbic-invalid
write mem
ciscoasa# show crypto ipsec sa
ciscoasa# show crypto isakmp sa
https://www.cisco.com/c/en/us/td/docs/security/asa/asa82/configuration/guide/config.html https://www.cisco.com/c/en/us/td/docs/security/asa/asa82/configuration/guide/config/access_aaa.html
https://www.cisco.com/c/en/us/td/docs/security/asa/asa92/configuration/general/asa-general-cli/interface-basic-5505.pdf https://www.cisco.com/c/en/us/td/docs/security/asa/asa91/configuration/general/asa_91_general_config/route_static.pdf
Books: