配置ASA
- 格式:doc
- 大小:50.50 KB
- 文档页数:4
1、ASA基本配置静态路由:route outside 192.168.100.0 255.255.255.0 192.168.1.99配置允许telnet:telnet 192.168.10.0 255.255.255.0 inside配置telnet超时时间:telnet timeout 5配置本地认证telnet与console:aaa authentication telnet console LOCAL配置SSH生成密钥对:aaa authentication ssh console LOCALciscoasa(config)# crypto key generate rsaINFO: The name for the keys will be: <Default-RSA-Key>Keypair generation process begin. Please wait...ciscoasa(config)#配置允许SSH:ssh 192.168.10.0 255.255.255.0 inside配置允许ASDM管理:http server enablehttp 192.168.10.0 255.255.255.0 insideasdm image disk0:/asdm-602.binusername cisco password cisco privilege 15配置PAT:nat (inside) 1 192.168.10.0 255.255.255.0global (outside) 1 interface配置端口映射:access-list to_server extended permit tcp any host 192.168.1.99 eq wwwaccess-group to_server in interface outsidestatic (inside,outside) tcp interface www 192.168.10.98 www netmask 255.255.255.255配置ACL:access-list to_server extended permit tcp any host 192.168.1.99 eq wwwaccess-group to_server in interface outside配置允许ICMP穿越:policy-map global_policyclass inspection_defaultinspect icmp配置URL过滤:url-server (outside) vendor websense host 192.168.1.100 timeout 30 protocol TCP version 1 connections 5filter url http 192.168.10.0 255.255.255.0 0.0.0.0 0.0.0.0 allow日志管理:开启logging:logging enable开启console日志:logging console 7将日志发送到日志服务器:logging trap 7logging host inside 192.168.10.98配置IPS:ip audit name zxd info action alarmip audit name cisco attack action alarmip audit interface outside zxdip audit interface outside cisco2、VPN配置ASA IPSec L2L配置:access-list nonat extended permit ip 192.168.10.0 255.255.255.0 192.168.100.0 255.255.255.0 nat (inside) 0 access-list nonatcrypto ipsec transform-set cisco esp-des esp-nonecrypto map cisco 10 match address nonatcrypto map cisco 10 set peer 192.168.1.96crypto map cisco 10 set transform-set ciscocrypto map cisco interface outsidecrypto isakmp enable outsidecrypto isakmp policy 1authentication pre-shareencryption deshash shagroup 1tunnel-group 192.168.1.96 type ipsec-l2ltunnel-group 192.168.1.96 ipsec-attributespre-shared-key ciscoASA Remote VPN Server配置:ip local pool vpnpool 192.168.2.250-192.168.2.254group-policy vpntest internalgroup-policy vpntest attributesvpn-tunnel-protocol IPSecusername zhong password xiaodongtunnel-group vpntest type remote-accesstunnel-group vpntest general-attributesaddress-pool vpnpooldefault-group-policy vpntesttunnel-group vpntest ipsec-attributespre-shared-key ciscocrypto ipsec transform-set cisco esp-des esp-md5-hmac crypto dynamic-map vpntest 1 set transform-set cisco crypto dynamic-map vpntest 1 set reverse-route crypto map cisco 1 ipsec-isakmp dynamic vpntest crypto map cisco interface outsidecrypto isakmp enable outsidecrypto isakmp policy 10authentication pre-shareencryption aeshash shagroup 2RADIUS认证用户:aaa-server vpntest protocol radiusaaa-server vpntest (outside) host 192.168.1.100key ciscotunnel-group vpntest general-attributes authentication-server-group (outside) vpntestASA SSL VPN配置ip local pool vpnpool 192.168.2.200-192.168.2.210 username zhong password xiaodongwebvpnenable outsidesvc image disk0:/sslclient-win-1.1.3.173.pkgsvc enabletunnel-group-list enablegroup-policy webvpn internalgroup-policy webvpn attributesvpn-tunnel-protocol svc webvpnwebvpnsvc ask enabletunnel-group webvpn type remote-accesstunnel-group webvpn general-attributesaddress-pool vpnpooldefault-group-policy webvpntunnel-group webvpn webvpn-attributesgroup-alias hnebony enableIOS SSL VPN配置aaa new-modelaaa authentication login vpnauthen localusername zhong password xiaodongip local pool vpnpool 192.168.20.200 192.168.20.254interface loopback 0ip address 192.168.20.1 255.255.255.0exitwebvpn install svc disk0:/webvpn/svc.pkgwebvpn gateway outip address 192.168.1.99inservicewebvpn context vpntestpolicy group vpntestfunctions svc-enabledsvc address-pool vpnpoolsvc split include 192.168.0.0 255.255.0.0exitdefault-group-policy vpntestaaa authentication list vpnauthengateway outinserviceIOS Easy VPN Server配置:aaa new-modelaaa authentication login vpnauthen localaaa authorization network vpnauthor localusername zhong password xiaodongip local pool vpnpool 192.168.20.200 192.168.20.254ip access-list extended splitpermit ip 192.168.0.0 0.0.255.255 192.168.20.0 0.0.0.255 crypto isakmp policy 1authentication pre-sharehash md5group 2crypto isakmp client configuration group vpntestkey ciscopool vpnpoolacl splitcrypto ipsec transform-set cisco esp-aes esp-sha-hmac crypto dynamic-map vpndymap 1set transform-set ciscoreverse-routecrypto map vpntest client authentication list vpnauthen crypto map vpntest client configuration address respond crypto map vpntest isakmp authorization list vpnauthor crypto map vpntest 10 ipsec-isakmp dynamic vpndymap inter f0/0crypto map vpntest使用ACS认证与授权:aaa authentication login vpnauthen group radiusaaa authorization network vpnauthor group radiusradius-server host 192.168.1.100 auth-port 1645 acct-port 1646 key ciscoRADIUS (IETF)选中6、64、65、69、81.建立用户:vpntest(vpn组路由器配置crypto isakmp client configuration group vpntest可以取消)然后建立用户IOS Easy VPN Client配置:crypto ipsec client ezvpn vpntestmode clientconnect autopeer 192.168.10.1group vpntest key ciscousername zhong password xiaodonginterface f0/0crypto ipsec client ezvpn vpntestinterface f1/0crypto ipsec client ezvpn vpntest inside R1#crypto ipsec client ezvpn xauthUsername: zhongPassword:3、802.1X认证aaa new-modelaaa authentication dot1x default group radius aaa authorization network default group radius radius-server host 192.168.1.100 key cisco dot1x system-auth-controlinterface f0/1dot1x port-control auto指定VLAN:4、RSTPAlternate port—Offers an alternate path toward the root switch to that provided by the current root port.Backup port—Acts as a backup for the path provided by a designated port toward the leaves of the spanning tree. A backup port can exist only when two ports are connected in a loopback by a point-to-point link or when a switch has two or more connections to a shared LAN segment.Edge ports—If you configure a port as an edge port on an RSTP switch by using the spanning-tree portfast interface configuration command, the edge port immediately transitions to the forwarding state. An edge port is the same as a Port Fast-enabled port, and you should enable it only on ports that connect to a single end station.Root ports—If the RSTP selects a new root port, it blocks the old root port and immediately transitions the new root port to the forwarding state.Point-to-point links—If you connect a port to another port through a point-to-point link and the local port becomes a designated port, it negotiates a rapid transition with the other port by using the proposal-agreement handshake to ensure a loop-free topology. As shown in Figure 18-4, Switch A is connected to Switch B through a point-to-point link, and all of the ports are in the blocking state. Assume that the priority of Switch A is a smaller numerical value than the priority of Switch B. Switch A sends a proposal message (a configuration BPDU with the proposal flag set) to Switch B, proposing itself as the designated switch. After receiving theproposal message, Switch B selects as its new root port the port from which the proposalmessage was received, forces all nonedge ports to the blocking state, and sends an agreement message (a BPDU with the agreement flag set) through its new root port. After receiving Switch B’s agreement message, Switch A also immediately transitions its designated port to the forwarding state. No loops in the network are formed because Switch B blocked all of its nonedge ports and because there is a point-to-point link between Switches A and B. When Switch C is connected to Switch B, a similar set of handshaking messages are exchanged.Switch C selects the port connected to Switch B as its root port, and both ends immediately transition to the forwarding state. With each iteration of this handshaking process, one more switch joins the active topology. As the network converges, this proposal-agreement handshaking progresses from the root toward the leaves of the spanning tree. The switch learns the link type from the port duplex mode: a full-duplex port is considered to have a point-to-point connection; a half-duplex port is considered to have a shared connection. You can override the default setting that is controlled by the duplex setting by using the spanning-tree link-type interface configuration command.5、时间访问列表time-range zxdabsolute start 08:30 24 August 2009 end 18:00 01 September 2009time-range ciscoperiodic daily 8:00 to 18:00access-list 110 permit ip any any time-range cisco6、QOSCAR:rate-limit input access-group 101 1000000 3000 4000 conform-action transmit exceed-action dropGTS:class-map match-all ciscomatch access-group 101!!policy-map ciscoclass ciscopolice cir 500000 bc 10000 pir 1000000 be 10000conform-action transmitexceed-action set-prec-transmit 2violate-action dropinterface f1/0service-policy output ciscoCBWFQ:class-map match-all cbwfqmatch access-group 101policy-map cbwfqclass cbwfqpriority percent 60interface f1/0service-policy output cbwfq7、NA T-T8、标准化产品特色:1定位准确,以就业为导向。
印象网络--工作室群号:300309792实验名称: 配置ASA(三个区域) 实验人:lun0yellow(ylxl) 实验目的: Inside、outside、dmz:R1、R2和R3用来模拟PC:实验拓扑:实验环境: GNS3实验器材: GNS3实验步骤://配置路由器和ASA的接口、路由、实现网络互通:ciscoasa(config)# int e0/1ciscoasa(config-if)# nameif insideINFO: Security level for "inside" set to 100 by default.ciscoasa(config-if)# ip add 10.1.1.254 255.255.255.0ciscoasa(config-if)# no shciscoasa(config-if)# int e0/0ciscoasa(config-if)# nameif outsideINFO: Security level for "outside" set to 0 by default.ciscoasa(config-if)# ip add 172.16.1.254 255.255.255.0ciscoasa(config-if)# no shciscoasa(config-if)# int e0/2ciscoasa(config-if)# nameif dmzINFO: Security level for "dmz" set to 0 by default.ciscoasa(config-if)# security-level 50ciscoasa(config-if)# ip add 192.168.1.254 255.255.255.0ciscoasa(config-if)# no shciscoasa(config-if)# exitciscoasa(config)# route outside 172.16.2.0 255.255.255.0 172.16.1.1//在R1、R2、R3、R4上配置:R1(config)#int f0/0R1(config-if)#ip add 10.1.1.1 255.255.255.0R1(config-if)#no shR1(config-if)#exitR1(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.254R1(config)#do wrR2(config)#int f0/0R2(config-if)#ip add 172.16.1.1 255.255.255.0R2(config-if)#no shR2(config-if)#int f0/1R2(config-if)#int f0/1R2(config-if)#ip add 172.16.2.2 255.255.255.0R2(config-if)#no shR2(config-if)#exitR2(config)#ip route 10.1.1.0 255.255.255.0 172.16.1.254R2(config)#ip route 192.168.1.0 255.255.255.0 172.16.1.254 R2(config)#do wrR3(config)#int f0/0R3(config-if)#ip add 172.16.2.1 255.255.255.0R3(config-if)#no shR3(config-if)#exitR3(config)#ip route 0.0.0.0 0.0.0.0 172.16.2.2R3(config)#do wrR4(config)#int f0/0R4(config-if)#ip add 192.168.1.1 255.255.255.0R4(config-if)#no shR4(config-if)#exitR4(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.254R4(config)#do wr//配置R1/R2/R3/R4的vty密码。
防火墙技术实验报告实验名称:防火墙技术实验内容一、拓扑图:二、实验步骤:1.分别在ASA1和ASA2上配置ip地址和命名。
ASA1:ciscoasa(config)# host ASA1ASA1(config)# int e0/0ASA1(config-if)# ip add 192.168.1.3 255.255.255.0 ASA1(config-if)# no shASA1(config-if)# nameif insideASA1(config-if)# int e0/1ASA1(config-if)# ip add 120.3.2.21 255.255.255.252 ASA1(config-if)# no shASA1(config-if)# nameif outsideASA1(config-if)# exitASA2:ASA2(config)# int e0/0ASA2(config-if)# ip add 192.168.1.3 255.255.255.0 ASA2(config-if)# no shASA2(config-if)# nameif insideASA2(config-if)# exitASA2(config)# int e0/1ASA2(config-if)# ip address 120.3.2.22 255.255.255.252ASA2(config-if)# no shASA2(config-if)# nameif outsideASA2(config-if)# exit2.分别在ASA1和ASA2上配置NAT和映射,还有ACL。
ASA1:ASA1(config)# nat (inside) 1 0.0.0.0 0.0.0.0ASA1(config)# global (outside) 1 interfaceASA1(config)# route outside 0.0.0.0 0.0.0.0 120.3.2.22ASA1(config)# route inside 192.168.0.0 255.255.0.0 192.168.1.3ASA1(config)# access-list 101 extended permit icmp any anyASA1(config)# access-list 101 extended permit ip any anyASA1(config)# access-group 101 in interface outsideASA2:ASA2(config)# nat (inside) 1 0.0.0.0 0.0.0.0ASA2(config)# global (outside) 1 interfaceASA2(config)# route inside 192.168.0.0 255.255.0.0 192.168.1.1ASA2(config)# route outside 0.0.0.0 0.0.0.0 120.3.2.21ASA2(config)# access-list 101 extended permit icmp any anyASA2(config)# access-list 101 extended permit ip any anyASA2(config)# access-group 101 in interface outsideASA2(config)# static (inside,outside) tcp 120.3.2.22 www 192.168.140.254 www 3.在SW1和SW2上配置ip地址后配置默认路由。
asa配置手册一些基础配置,个人工作学习中的一点整理,如有错误请指正,谢谢。
#设置主机名:(config)#hostname dust#设置时区:dust(config)#clock timezone EST 7#设置时钟:dust#clock set 15:45:30 28 FEB 2008#配置内接口 IPdust(config)#int Ethernet 0/0dust(config-if)#nameif insidedust(config-if)#security-level 100dust(config-if)#ip address 192.168.88.254 255.255.255.0#配置外部接口IPdust(config)#int Ethernet 0/1dust(config-if)#nameif outsidedust(config-if)#security-level 0dust(config-if)#ip address 210.X.X.X 255.255.255.248#配置用户名和密码dust(config)#username admin password ********* privilege 15 注:15 表示有最高权限#配置HTTP 和TELNETdust(config)#aaa authentication telnet console LOCALdust(config)#http server enabledust(config)#http 192.168.88.0 255.255.255.0 insidedust(config)#telnet 192.168.88.0 255.255.255.0 inside#配置SSH接入:dust(config)#crypto key generate rsa modulus 1024dust(config)#aaa authentication ssh console LOCALdust(config)#ssh 192.168.88.0 255.255.255.0 insidedust(config)#ssh 0 0 outsidedust(config)#ssh timeout 30dust(config)#ssh version 2#配置ASDM(自适应安全设备管理器)接入:dust(config)#http server enable 8080dust(config)#http 192.168.88.0 255.255.255.0 insidedust(config)#http 0 0 outsidedust(config)#asdm image disk0:/asdm-621.bindust(config)#username dust password ccie privilege 15#动态NAT:dust(config)#nat-controldust(config)#nat (inside) 1 192.168.10.0 255.255.255.0dust(config)#nat (inside) 1 0 0dust(config)#global (outside) 1 interfacedust(config)#global (dmz) 1 192.168.202.100-192.168.202.110#静态NATdust(config)#static (dmz.outside) 210.10.10.253 192.168.202.1dust(config)#access-list ccie extended permit tcp any host 210.10.10.253 eq wwww dust(config)#access-group ccie in interface outside#配置ACLdust(config)#access-list ccie extended deny ip 192.168.201.0 255.255.255.240 any dust(config)#access-list ccie extended permit ip any anydust(config)#access-group ccie in interface inside#ICMP协议dust(config)#icmp deny any echo outsidedust(config)#icmp permit any outsidedust(config)#access-list 111 permit icmp any any echo-reply dust(config)#access-list 111 permit icmp any any unrechable dust(config)#access-list 111 permit icmp any any time-exceededdust(config)#access-group 111 in interface outside#配置默认路由dust(config)#route ouside 0.0.0.0 0.0.0.0 220.1.1.1 1#配置DHCP服务器dust(config)#dhcpd address 192.168.10.50-192.168.10.100 insidedust(config)#dhcpd enable insidedust(config)#dhcpd dns 202.102.192.68 insidedust(config)#dhcpd lease 86400 interface insidedust(config)#dhcpd option xx ip 192.168.10.10#保存配置dust#write memory 或copy running-config startup-config #清除配置dust(config)#clear configure alldust(config)#clear configure xxx xxxasa remote vpn#在outside接口上启用isakampdust#configure terminaldust(config)#crypto isakmp enable outside#创建一个isakmp策略dust(config)#crypto isakmp policy 1dust(config-isakmp-policy)#authentication pre-sharedust(config-isakmp-policy)#encryption desdust(config-isakmp-policy)#hash md5dust(config-isakmp-policy)#group 2dust(config-isakmp-policy)#lifetime 86400#配置组策略dust(config)#group-policy mypolicy internaldust(config)#group-policy mypolicy attributesdust(config-group-policy)#vpn-tunnel-protocol ipsecdust(config-group-policy)#split-tunnel-policy tunnelspecifieddust(config-group-policy)#nem enable#定义地址池dust(config)#ip local pool vpn-pool 192.168.88.110-192.168.88.120#定义隧道组dust(config)#tunnel-group cisco type remote-accessdust(config)#tunnel-group cisco general-attributesdust(config-tunnel-general)#address-pool vpn-pooldust(config-tunnel-general)#authentication-server-group (outside) LOCAL dust(config-tunnel-general)#default-group-policy mypolicydust(config-tunnel-general)#tunnel-group cisco ipsec-attributesdust(config-tunnel-ipsec)#pre-shared-key cisco#配置转换集dust(config)#crypto ipsec transform-set ccsp esp-des esp-md5-hmacdust(config)#crypto ipsec transform-set cisco esp-des esp-md5-hmac#添加本地帐户dust(config)#username user01 password adminabcdust(config)#username user02 password admindec#定义映射集,并应用到外部接口dust(config)#crypto dynamic-map dyn-map 10 set transform-set ccsp ciscodust(config)#crypto dynamic-map dyn-map 10 set reverse-routedust(config)#crypto map cisco 60001 ipsec-isakmp dynamic dyn-mapdust(config)#crypto map cisco interface outside#配置分离隧道dust(config)#access-list split_list standard permit 192.168.88.0 255.255.255.0 dust(config)#group-policy mypolicy attributesdust(config-group-policy)#split-tunnel-policy tunnelspecifieddust(config-group-policy)#split-tunnel-network-list value split_listdust(config-group-policy)#dns-server value 202.102.192.68 8.8.8.8#放行访问列表dust(config)#access-list 100 extended permit ip 192.168.88.0 255.255.255.0 192.168.88.0 255.255.255.0dust(config)#access-list 111 extended permit icmp any any echo-replydust(config)#access-list 111 extended permit icmp any any unreachabledust(config)#access-list 111 extended permit icmp any any time-exceededdust(config)#nat (inside) 0 access-list split_listdust(config)#access-group 111 in interface outsidedust(config)#access-group 100 in interface outsidedust(config)#access-group 100 in interface inside#查看被asp和acl drop的包dust(config)# show asp drop frame acl-drop客户端连接时,地址为outside的IP,组名为cisco 密码为cisco。
思科防火墙已经从PIX发展到ASA了,IOS也已经从早期的6.0发展到7.2。
但总体的配置思路并没有多少变化。
只是更加人性化,更加容易配置和管理了。
下面是我工作以来的配置总结,有些东西是6.3版本的,但不影响在7.*版本的配置。
一:6个基本命令: nameif、 interface、 ip address 、nat、 global、 route。
二:基本配置步骤:step1: 命名接口名字nameif ethernet0 outside security0nameif ethernet1 inside security100nameif ethernet2 dmz security50**7版本的配置是先进入接口再命名。
step2:配置接口速率interface ethernet0 10full autointerface ethernet1 10full autointerface ethernet2 10fullstep3:配置接口地址ip address outside 218.106.185.82ip address inside 192.168.100.1 255.255.255.0ip address dmz 192.168.200.1 255.255.255.0step4:地址转换(必须)* 安全高的区域访问安全低的区域(即内部到外部)需NAT和global;nat(inside) 1 192.168.1.1 255.255.255.0global(outside) 1 222.240.254.193 255.255.255.248*** nat (inside) 0 192.168.1.1 255.255.255.255 表示192.168.1.1这个地址不需要转换。
直接转发出去。
* 如果内部有服务器需要映射到公网地址(外网访问内网)则需要static和conduit或者acl.static (inside, outside) 222.240.254.194 192.168.1.240static (inside, outside) 222.240.254.194 192.168.1.240 10000 10后面的10000为限制连接数,10为限制的半开连接数。
第二章ASA防火墙实验案例一ASA防火墙基本配置一、实验目的:熟悉ASA基本配置二、实验环境和需求在WEB上建立站点.,在Out上建立站点,并配置DNS服务,负责解析(202.0.0.253/29)和(IP为202.2.2.1),PC1的DNS 指向200.2.2.1只能从PC1通过SSH访问ASA从PC1可以访问outside和dmz区的网站,从Out主机可以访问DMZ区的Web站点从PC1可以ping通Out主三、实验拓扑图四、配置步骤(一)路由器配置int f1/0ip add 200.0.0.1 255.255.255.252no shint f0/0ip add 200.2.2.254 255.255.255.0no shexitip route 0.0.0.0 0.0.0.0 200.0.0.2end(二) ASA基本属性配置1、接口配置Interface E 0/0Ip address 192.168.0.254 255.255.255.0Nameif inside //设置内接口名字Security-level 100 //设置内接口安全级别No shutdownInterface E 0/1Ip add 192.168.1.254 255.255.255.0Nameif dmz //设置接口为DMZSecurity-level 50 //设置DMZ接口的安全级别No shutdownInterface E 0/2Ip address 200.0.0.2 255.255.255.252Nameif outside //设置外接口名字Security-level 0 //设置外接口安全级别No shutdown2、ASA路由配置:静态路由方式(config)#Route outside 0.0.0.0 0.0.0.0 200.0.0.13、从PC1上可以PING通OUT主机默认情况下不允许ICMP流量穿过,从内Ping外网是不通的,因为ICMP应答的报文返回时不能穿越防火墙,可以配置允许几种报文通过,(Config)# Access-list 111 permit icmp any any(config)# Access-group 111 in interface outside此时在PC1上就可台PING通OUT主机了。
一、基本配置#hostname name //名字的设置#interface gigabitethernet0/0 //进入接口0/0#nameif outside //配置接口名为outside#security-level 0 //设置安全级别。
级别从0--100,级别越高安全级别越高#ip address 218.xxx.xxx.xxx 255.255.255.248 //设置外部ip地址#no shutdown#interface ethernet0/1 //进入接口0/1#nameif inside //配置接口名为inside#security-level 100 //设置安全级别。
级别从0--100,级别越高安全级别越高#ip address 192.168.10.1 255.255.255.0 //设置ip地址#duplex full //全双工#speed 100 //速率#no shutdown#interface ethernet0/2 //进入接口0/2#nameif dmz //配置接口名为dmz#security-level 50 //设置安全级别。
级别从0--100,级别越高安全级别越高#ip address 192.168.9.1 255.255.255.0 //设置dmz接口ip地址#no shutdown#interface Management0/0 //进入管理接口# nameif guanli //接口名# security-level 100 //安全级别#ip address 192.168.1.1 255.255.255.0 //IP地址注意:security-level 配置安全级别。
默认外网接口为0/0 安全级别默认为0内网接口为0/1 安全级别默认为100dmz 接口为0/2 安全级别默认为50默认情况下,相同安全级别接口之间不允许通信,可以使用以下命令:#same-security-traffic permit interface //允许相同安全级别接口之间互相通信。
ASA型号及配置命令asa复习笔记一、cisco防火墙1.软件防火墙它用于基于IOS软件的设备。
一般来说,客户端上具有应用层智能的状态检测防火墙引擎占CPU和内存资源的2.5%(可以定期欣赏)硬件防火墙(更多优势)应用在一般企业外部网络:pix500系列安全设备、asa5500系列自适应安全设备、catalyst6500系列交换机和cisco7600系列路由器的防火墙服务模块(不可以定期升值)二、 Ciscosa1常见型号:型号asa5505asa5510asa5520asa5540asa5550asa5580规模作用交换机接小型企业、分公司和企业设备成本低,易于部署、集成8个10/100端口快速口远程办公环境以太网交换机中型企业、分公司企业环设备成本低,易于部署,具有高级安全和网络服务境中型企业具有模块化、高性能网络中的高可用性主动/主动服路(小凡模拟器)务,并能连接千兆以太网设备由大中型企业,服务提供商提供高密度,主动/主动高可用性服务和千兆以太网连器接,设备具有高可靠性和高性能接大型企业、服务提供商网千兆级提供高达1.2gb/s的防火墙吞吐量,具有主动口络的高性能设备/主动高可用性服务、光纤和千兆位以太网连接性大型企业、数据中心、和提供王兆位以太网连接运营商网络型号为asa5580-20、asa5580-402.基本配置配置主机名:ciscoasa>enciscoasa#cinft思科ASA(配置)#主机名ASA802域名:asa802(config)#enablepassword123telnet或ssh密码:Asa802(配置)#passwdciscoasa接口名称和安全级别asa802(config-if)#nameifinside(不起名,ping不通)Asa802(如果配置)#安全级别100(值为0-100,值越大,安全级别越高)//默认情况下,outside口安全级别为0,inside口安全级别为100,防火墙允许数据从高安全级别流向低安全级别的接口,但不允许流量从低安全级别流向高安全级别的接口,若要放行,必须做策略,acl放行;若接口的安全级别相同,那么它们之间不允许通信,绝对不允许,但有时有这个需要,故意把它们设成一样。
要想配置思科的防火墙得先了解这些命令:常用命令有:nameif、interface、ip address、nat、global、route、static等。
global指定公网地址范围:定义地址池。
Global命令的配置语法:global (if_name) nat_id ip_address-ip_address [netmarkglobal_mask]其中:(if_name):表示外网接口名称,一般为outside。
nat_id:建立的地址池标识(nat要引用)。
ip_address-ip_address:表示一段ip地址范围。
[netmark global_mask]:表示全局ip地址的网络掩码。
nat地址转换命令,将内网的私有ip转换为外网公网ip。
nat命令配置语法:nat (if_name) nat_id local_ip [netmark]其中:(if_name):表示接口名称,一般为inside.nat_id:表示地址池,由global命令定义。
local_ip:表示内网的ip地址。
对于0.0.0.0表示内网所有主机。
[netmark]:表示内网ip地址的子网掩码。
routeroute命令定义静态路由。
语法:route (if_name) 0 0 gateway_ip [metric]其中:(if_name):表示接口名称。
0 0 :表示所有主机Gateway_ip:表示网关路由器的ip地址或下一跳。
[metric]:路由花费。
缺省值是1。
static配置静态IP地址翻译,使内部地址与外部地址一一对应。
语法:static(internal_if_name,external_if_name) outside_ip_addr inside_ ip_address其中:internal_if_name表示内部网络接口,安全级别较高,如inside。
external_if_name表示外部网络接口,安全级别较低,如outside。
配置ASA笔记1. 常用技巧Sh ru ntp查看与ntp有关的Sh ru crypto 查看与vpn有关的Sh ru | inc crypto 只是关健字过滤而已2. 故障倒换failoverfailover lan unit primaryfailover lan interface testint Ethernet0/3failover link testint Ethernet0/3failover mac address Ethernet0/1 0018.1900.5000 0018.1900.5001 failover mac address Ethernet0/0 0018.1900.4000 0018.1900.4001 failover mac address Ethernet0/2 0018.1900.6000 0018.1900.6001 failover mac address Management0/0 0018.1900.7000 0018.1900.7001 failover interface ip testint 10.3.3.1 255.255.255.0 standby 10.3.3.2 注:最好配置虚拟MAC地址sh failover显示配置信息write standby写入到备用的防火墙中failover命令集如下:configure mode commands/options:interface Configure the IP address and mask to be used for failover and/or stateful update informationinterface-policy Set the policy for failover due to interface failureskey Configure the failover shared secret or keylan Specify the unit as primary or secondary or configure the interface and vlan to be used for failover communicationlink Configure the interface and vlan to be used as a link forstateful update informationmac Specify the virtual mac address for a physical interfacepolltime Configure failover poll intervalreplication Enable HTTP (port 80) connection replicationtimeout Specify the failover reconnect timeout value forasymmetrically routed sessionssh failover 命令集如下:history Show failover switching historyinterface Show failover command interface informationstate Show failover internal state informationstatistics Show failover command interface statistics information| Output modifiers<cr>3. 配置telnet、ssh及http管理username jiang password Csmep3VzvPQPCbkx encrypted privilege 15 aaa authentication enable console LOCALaaa authentication telnet console LOCALaaa authentication ssh console LOCALaaa authorization command LOCALhttp 192.168.40.0 255.255.255.0 managementssh 192.168.40.0 255.255.255.0 inside4. vpn常用管理命令sh vpn-sessiondb full l2l 显示site to site 之vpn通道情况sh ipsec stats 显示ipsec通道情况sh vpn-sessiondb summary 显示vpn汇总信息sh vpn-sessiondb detail l2l 显示ipsec详细信sh vpn-sessiondb detail svc 查看ssl client信息sh vpn-sessiondb detail webvpn 查看webvpn信息sh vpn-sessiondb detail full l2l 相当于linux下的ipsec whack ?Cstatus 如果没有建立连接,则表示ipsec通道还没有建立起来。
5. 配置访问权限可以建立对象组,设定不同的权限,如object-group network testgroupdescription testnetwork-object 192.168.100.34 255.255.255.255access-list inside_access_in line 2 extended permit ip object-group all anyaccess-group inside_access_in in interface inside6. 配置sitetosite之VPNcrypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmaccrypto map outside_map 20 match address outside_cryptomap_20_1crypto map outside_map 20 set pfscrypto map outside_map 20 set peer 218.16.105.48crypto map outside_map 20 set transform-set ESP-3DES-SHAcrypto map outside_map interface outsideisakmp identity addressisakmp enable outsideisakmp policy 10 authentication pre-shareisakmp policy 10 encryption 3desisakmp policy 10 hash shaisakmp policy 10 group 2isakmp policy 10 lifetime 86400tunnel-group 218.16.105.48 type ipsec-l2ltunnel-group 218.16.105.48 ipsec-attributespre-shared-key *peer-id-validate nochecktunnel-group-map enable rules注:打打PFS并设定以IP地址作为peer名,一个接口只能有一个加密图7. webvpn配置(ssl vpn)webvpnenable outsidecharacter-encoding gb2312csd image disk0:/securedesktop-asa-3.1.1.16.pkgsvc image disk0:/sslclient-win-1.1.0.154.pkg 1svc enablecustomization customization1title text TEST WebVPN systemtitle style background-color:white;color: rgb(51,153,0);border-bottom:5px groove #669999;font-size:larger;vertical-align:middle;text-align:left;font-weight:boldtunnel-group-list enable注:也可通过ASDM图形界面进行配置登录后,可访问内部资源,如下例:(客户端首先要安装Java插件jre-1_5_0-windows-i586.exe,并打开浏览器的ActiveX)1) https:// 输入用户名和密码2) 出现工具条3) 在Enter Web Address内输入192.168.40.8即可访问内部网站4)在browse network输入192.168.40.8即可访问共享文件5)点击application access,即可查看端口转发设置,如使用putty访问本机的2023端口,则即可通过ssh登录192.168.40.88. 远程拨入VPN相关的ASA配置命令如下:access-list inside_access_in extended permit ip object-group remotegroup anyaccess-list inside_access_in extended permit icmp object-group remotegroup anyaccess-list remotevpn_splitTunnelAcl standard permit 192.168.100.0 255.255.255.0 access-list vpnclient_splitTunnelAcl standard permit 192.168.100.0 255.255.255.0ip local pool dialuserIP 192.168.101.1-192.168.101.254 mask 255.255.255.0group-policy remotevpn attributesdns-server value 202.96.128.68 192.168.40.16default-domain value username jiang password Csmep3VzvPQPCbkx encrypted privilege 15crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmaccrypto ipsec transform-set ESP-DES-MD5 esp-des esp-md5-hmaccrypto ipsec transform-set ESP-DES-SHA esp-des esp-sha-hmaccrypto dynamic-map outside_dyn_map 20 set pfscrypto dynamic-map outside_dyn_map 20 set transform-set ESP-3DES-SHAcrypto dynamic-map outside_dyn_map 20 set reverse-routecrypto map outside_map 65535 ipsec-isakmp dynamic outside_dyn_mapcrypto map outside_map interface outsidetunnel-group remotevpn type ipsec-ratunnel-group remotevpn general-attributesaddress-pool dialuserIPdefault-group-policy remotevpntunnel-group remotevpn ipsec-attributespre-shared-key *客户端设置如下:9. 日志服务器配置logging enablelogging timestamplogging emblemlogging trap informationallogging asdm warningslogging host inside 192.168.40.115 format emblemlogging permit-hostdownvpn-simultaneous-logins 310. Snmp网管配置snmp-server host inside 192.168.40.47 community testsnmpsnmp-server location DG-GTESTsnmp-server contact jiangdaoyou:6162snmp-server community testsnmpsnmp-server enable traps snmp authentication linkup linkdown coldstart注:指定主机后,192.168.40.47才可能进行管理11. ACS配置安装后管理:http://ip:2002 通过ACS可以进行授权、认证等等很多功能因内容太多,暂省略12. AAA配置Aaa服务器配置:aaa-server radius_dg host key dfdfdfdf146**Uauthentication-port 1812accounting-port 1813radius-common-pw dfdfdfdf146**U对于拨入vpn的配置tunnel-group vg_testerp general-attributesaddress-pool ciscovpnuserauthentication-server-group radius_dgdefault-group-policy vg_testerp13. 升级IOScopy tftp://192.168.40.180/asa/asa721-k8.bin disk0:/asa721-k8.binboot system disk0:/asa721-k8.bin (多个Image时使用)14. 疑难杂症1) 在远程子网不能ping通过对方的网关,如在无锡格兰不能ping 192.168.40.251 输入命令:management-access inside (通过ASDM不能设置这一项)2) NAT有时不能快速启作用使用命令:clear xlate即可。