(ASA) Cisco Web *** 配置详解 [三部曲之一]注意:本文仅对Web***特性和配置作介绍,不包含SSL ***配置,SSL ***配置将在本版的后续文章中进行介绍。 首先,先来谈一谈ASA7.X系统中的默认隧道组和组策略。 ASA/PIX 7.x系统默认在show run时不显示默认组策略和默认隧道组,只有使用ASDM才能看到。(感慨就两个字: BT) 下面列出在ASDM中看到的默认值: 默认IPSec-l2l隧道组: DefaultL2LGroup 默认IPSec-ra隧道组: DefaultRAGroup 默认Web***隧道组: DefaultWEB***Group 默认组策略: DfltGrpPolicy 默认组策略的默认隧道协议: IPSec-l2l 可以在命令行中直接对以上隧道组和组策略进行编辑,ASA在加载Web***时默认采用DefaultWEB***Group,用户自定义的Web***组必须在启动 “tunnel-group-list”和“group-alias” 后才会出现。 在下面的例子中,我没有使用ASA的默认隧道组,所以会有tunel-group-list和group-alias配置出现。 1、Web***服务基本配置。 ----------------------------------------- ciscoasa(config)# int e0/0 ciscoasa(config-if)# ip address 198.1.1.1 255.255.255.0 ciscoasa(config-if)# nameif outside INFO: Security level for "outside" set to 0 by default. ciscoasa(config-if)# no shut ciscoasa(config-if)# exit ! ciscoasa(config)# int e0/1 ciscoasa(config-if)# ip add 10.10.1.1 255.255.255.0 ciscoasa(config-if)# nameif inside INFO: Security level for "inside" set to 100 by default. ciscoasa(config-if)# no sh ciscoasa(config-if)# exit ! ciscoasa(config)# web*** ciscoasa(config-web***)# enable outside !在外网接口上启动Web*** ! ----------------------------------------- ciscoasa(config)# group-policy myweb***-group-policy ? configure mode commands/options: external Enter this keyword to specify an external group policy internal Enter this keyword to specify an internal group policy !此处需要选择组策略的类型,因为我们是将策略配置在ASA本地的,所以选择Internal。 ! ciscoasa(config)# group-policy myweb***-group-policy internal !创建了一个名为myweb***-group-policy的Internal类型Policy。 ----------------------------------------- ! ciscoasa(config)# group-policy myweb***-group-policy ? configure mode commands/options: attributes Enter the attributes sub-command mode external Enter this keyword to specify an external group policy internal Enter this keyword to specify an internal group policy !组策略一旦创建,命令行参数中就会多出attributes选项,这是用于后面定义具体的组策略用的,目前可以保留为空。 ----------------------------------------- ! ciscoasa(config)# username steve6307 password cisco !创建一个本地用户 ciscoasa(config)# username steve6307 attributes ciscoasa(config-username)# ***-group-policy myweb***-group-policy !将用户加入刚才创建的***策略组中 注意:ASA也支持为每用户定义单独的策略,即不用将用户加入特定的***策略组,直接赋予策略(俗曰“权限”)。 注意:不过这是不推荐的,因为这样配置的可扩展性太差。 ----------------------------------------- ! ciscoasa(config)# tunnel-group myweb***-group type web*** !创建一个名为myweb***-group的web***隧道组。 ! ciscoasa(config)# tunnel-group myweb***-group general-attributes ciscoasa(config-tunnel-general)# authentication-server-group LOCAL !定义该隧道组用户使用的认证服务器,这里为本地认证 ----------------------------------------- ciscoasa(config)# web*** ciscoasa(config-web***)# tunnel-group-list enable !启动组列表,让用户在登陆的时候可以选择使用哪个组进行登陆 ! ciscoasa(config)# tunnel-group myweb***-group web***-attributes ciscoasa(config-tunnel-web***)# group-alias group1 enable !为改组定义别名,用于显示给用户进行选择。 ----------------------------------------- ! !到此为止,Web***基本配置完毕,可以开始让外网用户使用浏览器测试了。 2、Web***测试。 本例中使用FireFox浏览器进行测试(测试功能嘛,最好不要用IE)。 在浏览器中输入[url]https://198.1.1.1[/url]即可访问到Web***主页。 由于只定义了一个Web***隧道组,因此,在group列表的下拉菜单中只有一个选择:group1。 Web***扩展功能在实现Web***的基本功能以后,我们来看看Web***的扩展功能。主要包含以下三部分: 1、文件服务器浏览 2、自定义url-list 3、port-forward 1、文件服务器浏览 File-access功能可以让Web***用户使用windows共享来访问内网的Windows文件服务器。 用户要使用File-access功能,必须具备file-access file-entry file-browsing权限。 注意:用户默认具备url-entry权限,即可以用url访问内网的web网页。 ciscoasa(config)# group-policy myweb***-group-policy attributes ciscoasa(config-group-policy)# web*** ciscoasa(config-group-web***)# functions url-entry file-access file-entry file-browsing 测试: 重新登陆Web***,可以看到以下界面: 输入\\10.10.1.2以后可以访问到内网的共享资源。 2、自定义url-list ciscoasa(config)# url-list mylist "Test Home Page" [url]http://10.10.1.2[/url] ciscoasa(config)# url-list mylist "Test Site 2" [url]http://10.10.1.3[/url] ! ciscoasa(config)# group-policy myweb***-group-policy attributes ciscoasa(config-group-web***)# url-list value mylist 测试: 重新登陆Web***,可以在首页上看到预定义的url列表。 3、自定义port-forward port-forward可以让Web***用户在外网通过Web***使用内网的非HTTP服务。 ciscoasa(config)# port-forward port-forward-list 2323 10.10.1.2 23 ciscoasa(config)# group-policy myweb***-group-policy attributes ciscoasa(config-group-policy)# web*** ciscoasa(config-group-web***)# functions url-entry file-access file-entry file-browsing port-forward ciscoasa(config-group-web***)# port-forward value port-forward-list 经过上面的配置以后,Web***用户加载Web***提供的JAVA App,就可以通过telnet到自身的2323端口登陆到内网服务器的23端口。 测试: 重新登陆Web***,界面如下: 最后给出show run,全文完。 ciscoasa# sh run : Saved : ASA Version 7.2(1)24 ! hostname ciscoasa enable password 8Ry2YjIyt7RRXU24 encrypted names ! interface Ethernet0/0 nameif outside security-level 0 ip address 198.1.1.1 255.255.255.0 ! interface Ethernet0/1 nameif inside security-level 100 ip address 10.10.1.1 255.255.255.0 ! interface Ethernet0/2 shutdown no nameif no security-level no ip address ! interface Management0/0 shutdown no nameif no security-level no ip address ! passwd 2KFQnbNIdI.2KYOU encrypted ftp mode passive pager lines 24 mtu outside 1500 mtu inside 1500 asdm image disk0:/asdm521-54.bin no asdm history enable arp timeout 14400 timeout xlate 3:00:00 timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02 timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00 timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00 timeout uauth 0:05:00 absolute port-forward port-forward-list 2323 10.10.1.2 telnet group-policy myweb***-group-policy internal group-policy myweb***-group-policy attributes web*** functions url-entry file-access file-entry file-browsing port-forward url-list value mylist port-forward value port-forward-list username steve6307 password Dt4qNrv3ojM/D.Cn encrypted username steve6307 attributes ***-group-policy myweb***-group-policy no snmp-server location no snmp-server contact snmp-server enable traps snmp authentication linkup linkdown coldstart tunnel-group myweb***-group type web*** tunnel-group myweb***-group web***-attributes group-alias group1 enable telnet timeout 5 ssh timeout 5 console timeout 0 ! ! web*** enable outside url-list mylist "Test Home Page" [url]http://10.10.1.2[/url] 1 url-list mylist "Test Site 2" [url]http://10.10.1.3[/url] 2 port-forward port-forward-list 2323 10.10.1.2 telnet tunnel-group-list enable prompt hostname context Cryptochecksum:00000000000000000000000000000000 |
(ASA) Cisco Web *** 配置详解 [三部曲之一]
(ASA) Cisco Web *** 配置详解 [三部曲之一]注意:本文仅对Web***特性和配置作介绍,不包含SSL ***配置,SSL ***配置将在本版的后续文章中进行介绍。 |
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.