0
点赞
收藏
分享

微信扫一扫

CISCO-SSL隧道的配置实验案例(路由器)


本文档涉及ssh、ssl隧道技术

Cisco-SSL隧道(无客户端)实验案例(路由器)

CISCO-SSL隧道的配置实验案例(路由器)_Server


背景说明:某公司为想实现员工在外地远程办公,并期望能够通过Internet随时随地的远程访问企业内部资源。选择了SSL VPN,同时为节约成本不想将原有出口路由器更换为ASA防火墙。于是通过思考路由器来构建SSL VPN。实现移动办公用户在通过验证后,可访问企业内网中管理员分配指定的服务器资源。

IP地址接口规划表

本端设备

接口

IP地址

对端设备

接口

IP地址

SSL_Server

G0/0

202.100.1.254/24

Internet

fa0/0

202.100.1.1/24

G0/1

10.1.1.254/24

S1

e0/0

(NULL)

S1

e0/0

(NULL)

Winserver

e0

10.1.1.100/24

e0/0

(NULL)

Web_Server

e0

10.1.1.1/24

Internet

fa0/1

61.128.1.254/24

win7

e0

DHCP分配

配置步骤:

  • 配置接口IP地址,配置基本服务搭建实验环境
  • 配置Gateway,关联公网地址
  • 配置context,对用户进行认证
  • 配置 policy group,限制或满足用户需求

项目实施

一、配置接口IP地址,配置基本服务搭建实验环境

SSL_SERVER(config)# interface GigabitEthernet0/0
SSL_SERVER(config)# ip address 202.100.1.254 255.255.255.0
SSL_SERVERt(config)# no shutdown
!
SSL_SERVER(config)# interface GigabitEthernet0/1
SSL_SERVER(config)# ip address 10.1.1.254 255.255.255.0
SSL_SERVER(config)# no shutdown
!
SSL_SERVER(config)# ip route 0.0.0.0 0.0.0.0 202.100.1.10
! #配置-AAA的线下保护,防止配置aaa用户时,本地用户被洗掉。
SSL_SERVER(config)# aaa new-model
SSL_SERVER(config)# aaa authentication login noacs line none
SSL_SERVER(config)# line console 0
SSL_SERVER(config-line)# login authentication noacs
SSL_SERVER(config)# line aux 0
SSL_SERVER(config-line)# login authentication noacs

Internet(config)# interface FastEthernet0/0
Internet(config-if)# ip address 202.100.1.10 255.255.255.0
Internet(config-if)# no shutdown
!
Internet(config)# interface FastEthernet0/1
Internet(config-if)# ip address 61.128.1.10 255.255.255.0
Internet(config-if)# no shutdown
!
Internet(dhcp-config)# service dhcp
Internet(dhcp-config)# ip dhcp pool 61.128.1.0/24
Internet(dhcp-config)# network 61.128.1.0 255.255.255.0
Internet(dhcp-config)# default-router 61.128.1.10
!
Internet(config)#ip route 0.0.0.0 0.0.0.0 202.100.1.254

WEB_Server(config)#interface FastEthernet0/0
WEB_Server(config-if)#ip address 10.1.1.1 255.255.255.0
!
WEB_Server(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.254
!
WEB_Server(config)#ip domain name Chinagd44.com
WEB_Server(config)#crypto key generate rsa general-keys modulus 1024
!
WEB_Server(config)#username WEB_USER privilege 15 password 0 cisco
!
WEB_Server(config)#ip http server
WEB_Server(config)#ip http authentication local
WEB_Server(config)#ip http secure-server
WEB_Server(config)#line vty 5 15
WEB_SERVER(config-line)#login local

二、配置Gateway,关联公网地址,使得用户通过地址访问协商SSL

SSL_SERVER(config)#webvpn gateway SSL_GW
SSL_SERVER(config-webvpn-gateway)# ip address 202.100.1.254 port 443 #定义Gateway地址和端口号(地址必须静态地址)
SSL_SERVER(config-webvpn-gateway)# http-redirect port 80 #启用 重定向 http 的流量到 https
SSL_SERVER(config-webvpn-gateway)# inservice #激活gateway

三、配置context,对用户进行认证

SSL_SERVER(config)#aaa authentication login sslvpn local    #配置认证策略,使用本地数据库认证
!
SSL_Server(config)#username SSL_USER password cisco
!
SSL_SERVER(config)#webvpn context CONTEXT-WIN7 # 创建context,命名为 CONTEXT-WIN7
SSL_SERVER(config-webvpn-context)#aaa authentication list sslvpn #配置认证策略为 “sslvpn”
SSL_SERVER(config-webvpn-context)#gateway SSL_GW #关联Gateway网关 “SSL_GW”
SSL_SERVER(config-webvpn-context)#inservice #激活context

四、配置 policy group,限制或满足用户需求

SSL_Server(config-webvpn-context)#policy group DefaulGP         # 创建组策略
SSL_Server(config-webvpn-group)#exit
!
SSL_Server(config-webvpn-context)#url-list Inside.HTTP.Name # 创建URL列表
SSL_Server(config-webvpn-url)#heading Inside.HTTP.Heading # 编写列表标题
SSL_Server(config-webvpn-url)#$url-text "Inside.HTTP.label" url-value "http://10.1.1.1 # 添加URL链接
!
SSL_Server(config-webvpn-url)# policy group DefaulGP # 进入组策略
SSL_Server(config-webvpn-group)#url-list Inside.HTTP.Name # 应用URL列表
!
SSL_Server(config-webvpn-context)#default-group-policy DefaulGP # 添加组策略,为默认组策略
!
SSL_Server(config-webvpn-group)#hide-url-bar # 在门户网站上禁用URL搜索栏

(进阶)五、配置瘦客户端,端口转发-port-forward(需要JAVA环境)

SSL_Server(config-webvpn-context)#port-forward Inside.Telnet.Name 
SSL_Server(config-webvpn-port-fwd)#local-port 55555 remote-server 10.1.1.1
remote-port 23 description "Inside.Telnet.Description"
!
SSL_Server(config-webvpn-context)#policy group DefaulGP
SSL_Server(config-webvpn-group)# port-forward Inside.Telnet.Name

项目验证:

WIN7客户端验证:

CISCO-SSL隧道的配置实验案例(路由器)_Internet_02


CISCO-SSL隧道的配置实验案例(路由器)_SSL_03


CISCO-SSL隧道的配置实验案例(路由器)_CISCO_04


CISCO-SSL隧道的配置实验案例(路由器)_CISCO_05


CISCO-SSL隧道的配置实验案例(路由器)_CISCO_06


CISCO-SSL隧道的配置实验案例(路由器)_Server_07


CISCO-SSL隧道的配置实验案例(路由器)_Server_08

SSL_Server服务端验证:

show webvpn session context all

SSL_SERVER#show webvpn session context all 
WebVPN context name: CONTEXT-WIN7
Client_Login_Name Client_IP_Address No_of_Connections Created Last_Used
SSL_USER 61.128.1.1 10 00:01:06 00:01:01

show webvpn session user 用户名 Context 策略名

SSL_Server#show webvpn session user SSL_USER context CONTEXT-WIN7
Session Type : Clientless
Client User-Agent : Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) li

Username : SSL_USER Num Connection : 2
Public IP : 61.128.1.1 VRF Name : None
Context : CONTEXT-WIN7 Policy Group : DefaulGP
Last-Used : 00:16:11 Created : *14:24:38.388 UTC Fri Jul 15 2022
Session Timeout : Disabled Idle Timeout : 2100
PortFwList : Inside.Telnet.Name
Citrix : Disabled Citrix Filter : None
Url List : Inside.HTTP.Name
Capabilites : hide-urlbar
Client Ports : 49264 49265



举报

相关推荐

0 条评论